Tobias Krais wrote:
Hi Stephan,

I did not follow this thread too closely.  You should not worry about
what toString() on a UNO proxy gives you, as those are implementation
details, anyway.  What is important is that those proxy objects offer
the expected functionality.  What exactly is your problem with the Java
references you obtain (via queryInterface etc.)?

please test the code below. Just take any xComponent in any of your
applications:
-----%<-----
System.out.println(this.xComponent);

XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
        this.xComponent);
System.out.println(xModel);

XController xController = xModel.getCurrentController();
System.out.println(xController);

XComponent myComp = (XComponent)
        UnoRuntime.queryInterface(XComponent.class,
             xController);
System.out.println(myComp);
this.xComponent = myComp;
-----%<-----

The System.out.println() output of the code above is:
-----%<-----
[Proxy:11403277,87cf260;gcc3[0];32c...,Type[com.sun.star.lang.XComponent]]
[Proxy:25527824,87cf260;gcc3[0];32c...,Type[com.sun.star.frame.XModel]]
[Proxy:27338224,88d6754;gcc3[0];32c...,Type[com.sun.star.frame.XController]]
[Proxy:27338224,88d6754;gcc3[0];32c...,Type[com.sun.star.frame.XController]]
-----%<-----

And now I quote you again:

What is important is that those proxy objects offer
the expected functionality.

The object that is returned when I query for an XComponent does NOT
offer the functionality of an XComponent. Please test the example above.

Excuse my ignorance, but in how far does myComp not offer the functionality of an XComponent? The functionality of XComponent is to offer a protocol (see the UNOIDL documentation of XComponent for details) involving the three methods dispose, addEventListener, removeEventListener. Your above code does not make any use of myComp that would back your claim that myComp "does NOT offer the functionality of an XComponent."

-Stephan

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

Reply via email to