Hi,
I have a Frame-Controller-Model structure built through a XDesktop
created through xServiceManager.createInstanceWithContext
( "com.sun.star.frame.Desktop", xComponentContext )
and loadComponentFromUrl
( "private:factory/swriter", "_blank", 0, openProperties )
with the only openProperty being "Hidden" which delivers a
XComponent that supports the XModel interface (call this xModel_A).
I try to retrieve the XFrame from the XDesktop and it returns null.
I try to retrieve the XController from the XModel with success.
I try to retrieve the XFrame from the XController with success.
Q1: Why can't I retieve the XFrame starting from the top (XDesktop)
while I can get it starting from the bottom (XModel)?
I sucessfully create a second XModel through the service manager
xServiceManager.createInstanceWithContext
( "com.sun.star.text.TextDocument", xComponentContext )
Call this xModel_B
Now what I would like to do is replace xModel_A with xModel_B.
I tried calling the XController.attachModel( xModel_B ) which returns
False meaning the new model was not attached.
Q2: How to I replace xModel_A with xModel_B in the
Frame-Controller-Model Structure?
Thank you,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]