List Info

Thread: Getting the XComponent out of a XFrame in a UNO Component




Getting the XComponent out of a XFrame in a UNO Component
user name
2006-12-18 12:24:53
Hi Frank

>>> So, I assume "the component" for you
is the XComponent of the controller.
>> Yes. But how to get it? I know how to get the
XController and the
>> XModel. But how to get the XComponent?
> 
> analogous to how you get the XComponent interface of
the frame, or how
> you get any interface for any object:
> 
> XController xController = xFrame.getController();
> XComponent xControllerComponent = (XComponent)
> 	UnoRuntime.queryInterface(XComponent.class,
xController);

OK. But that does not work...

Here my xFrame:
-----%<-----
CO> com.sun.star.bridges.jni_uno.JNI_proxydd87b2
[oid=867a494;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
type=com.sun.star.frame.XFrame]
-----%<-----

Here my xController
-----%<-----
CO> com.sun.star.bridges.jni_uno.JNI_proxy1f7d134
[oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
type=com.sun.star.frame.XController]
-----%<-----

And then I query for the xControllerComponent as you
described above:
-----%<-----
CO> com.sun.star.bridges.jni_uno.JNI_proxy1f7d134
[oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
type=com.sun.star.frame.XController]
-----%<-----

?!?! Do you know, what I can do now?

Greetings, Tobias

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

Getting the XComponent out of a XFrame in a UNO Component
user name
2006-12-18 13:33:04
Hi Tobias,

> OK. But that does not work...
> 
> Here my xFrame:
> -----%<-----
> CO> com.sun.star.bridges.jni_uno.JNI_proxydd87b2
> [oid=867a494;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
> type=com.sun.star.frame.XFrame]
> -----%<-----
> 
> Here my xController
> -----%<-----
> CO> com.sun.star.bridges.jni_uno.JNI_proxy1f7d134
> [oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
> type=com.sun.star.frame.XController]
> -----%<-----
> 
> And then I query for the xControllerComponent as you
described above:
> -----%<-----
> CO> com.sun.star.bridges.jni_uno.JNI_proxy1f7d134
> [oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
> type=com.sun.star.frame.XController]
> -----%<-----
> 
> ?!?! Do you know, what I can do now?

How did you produce those lines?
"xControllerComponent.toString()"? In
this case it in fact looks like the queryInterface somehow
was
unsuccessful, but I do not know enough about our Java-UNO
language
binding here ... Sorry, no idea :(

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )