Morten Omholt Alver schrieb:
There is only one problem remaining - when trying the technique of
using a hidden window, it seems like I lose connection to OpenOffice
when calling the
xComponentLoader.loadComponentFromURL("private:factory/swriter",
"_blank", 0, props);
method. I Acquired the xComponentLoader instance using:
Object desktop =
xServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",
xContext);
xComponentLoader =
(XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,
desktop);
after bootstrapping. The XModel I refer in props is aquired from
mxDoc.getCurrentController().getModel(), where mxDoc is the
XTextDocument I'm connected with. Have I used the wrong XModel
somehow, or did I do something else wrong?
The XTextDocument has only one model, but can have more than one
controller. Because XModel is a base interface for XTextDocument, I
think you can omit the whole queryInterface stuff and cast directly:
XModel model = (XModel) mxDoc.
(Guys please correct me if I'm wrong).
Did try the loadComponentFromURL with an empty props Array or with only
one propertyValue (XModel)? Why do you think you lose the connection?
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]