On 09.03.2005, at 13:20, Aidan Butler wrote:

Hello,
The URL of the document is stored as a property of the document component. The following python code will print the URL


#ctx is the current context

desktop = ctx.ServiceManager.createInstanceWithContext( \
           "com.sun.star.frame.Desktop", ctx )
document = desktop.getCurrentComponent()
print document.URL
Alternatively a document.getPropertyValue("URL") should do the trick

Maybe I so something wrong but this does not work, when I try to convert it to java.


I can understand the whole thing unto here:

// XComponentContext ctx ...
// XMultiComponentFactory f ...
XDesktop desktop = (XDesktop)f.createInstanceWithContext("com.sun.star.frame.Desktop", ctx);
XComponent document = (XComponent)desktop.getCurrentComponent();


But a document.getPropertyValue("URL") method does not exist.
Please help me.

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



Reply via email to