Hi Daniel,

> With regards to getting the frame from the desktop I used the
> xDesktop.getCurrentFrame() API. This returned null.

getCurrentFrame is almost always a bad idea. It denotes the "currently
active" frame, and this is a term which cannot be reliably defined,
really, for instance because the "current frame" heavily depends on the
Window manager you use, and its focusing behavior.

Also, since you load the document hidden, I doubt that the CurrentFrame
would point to it, anyway.

>         XController xController = xModel_A.getCurrentController();
>         if ( xController.attachModel( xModel_B ) )
>             lbaLogger.info(  "Sucessfully attached xModel_B to desktop
> controller" );
>         else
>             lbaLogger.info(  "Did not sucessfully attach xModel_B to desktop
> controller" );
>     } // oooTest
> 
> This returned: Did not sucessfully attach xModel_B to desktop controller
> Meaning the xModel_B was not attached. Any reason why?

http://svn.services.openoffice.org/opengrok/xref/Current%20(trunk)/sfx2/source/view/sfxbasecontroller.cxx#717

As I said: I doubt this is really properly implemented .... In the SFX
application framework (used by Writer, Calc, Draw, Impress), the UNO API
really is only a facade on top of a non-UNO implementation, which
obviously was never prepared to exchange the document of a given view.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to