Hi Stephan,

> You could query the Interface com.sun.star.frame.XModel from you document.
> This has a method "getCurrentController()" which returns a
> com.sun.star.frame.XController.
> Now you could use the method "getFrame()" of this interface and so get
> the XFrame your document resides in.

That helps a lot! Thanks. Here is the Code:
-----%<-----
// Getting the frame the loaded document resides in
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
        this.xComponent);
XController xController = xModel.getCurrentController();
        
// Getting the properties of the frame
XPropertySet xps = (XPropertySet)
        UnoRuntime.queryInterface(XPropertySet.class,
                xController.getFrame());
-----%<-----

Thanks again for you help!

Greetings, Tobias

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

Reply via email to