Hi Tobias,

after testing, I wrote this little test method:
-----%<-----
public void test() {
        XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
                this.xComponent);
        com.sun.star.frame.XController xController =
                xModel.getCurrentController();
                
        System.out.println(this.xComponent);
                
        System.out.println(xController);
                
        XComponent myComp = (XComponent)
                UnoRuntime.queryInterface(XComponent.class,
                        xController);
                
        System.out.println(myComp.equals(this.xComponent));
}
-----%<-----

In my Opinion the last line should return true. Am I right? But for me,
it prints false...

Nope ... the java method equals won't work properly with UNO-Objects and as far as I remember always return false.

Beside this you seem to compare the XComponent gained from the document with the one gained from the document view which are unlikely to be equal anyway.

Regards

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to