Ask Your Question

lgs's profile - activity

2018-04-06 15:51:39 +0200 received badge  Famous Question (source)
2018-04-06 15:51:39 +0200 received badge  Notable Question (source)
2018-04-06 15:51:39 +0200 received badge  Popular Question (source)
2016-09-29 12:58:50 +0200 answered a question SDK API bootstrap call after xDesktop.terminate()

Hi all,

the reason seems to be that I had a 32-bit libreoffice installation on a 64-bit machine. I installed 64-bit libreoffice (and sdk) and it works.

Regards

lgs

2016-09-28 15:34:38 +0200 asked a question SDK API bootstrap call after xDesktop.terminate()

Hi all,

I am trying to re-connect to libreoffice after a call to xDesktop.terminate() or BootstrapConnector.disconnect():

BootstrapSocketConnector bootstrapSocketConnector = new BootstrapSocketConnector(OOOEXEFOLDER);

XComponentContext xContext = bootstrapSocketConnector.connect();
        XMultiComponentFactory xRemoteServiceManager = xContext.getServiceManager();
Object desktop = xRemoteServiceManager.createInstanceWithContext(
                "com.sun.star.frame.Desktop", xContext);

XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, desktop);
......
......
xDesktop.terminate(); //or bootstrapSocketConnector.disconnect()

and then:

xContext = bootstrapSocketConnector.connect();

Then, whatever I try to do with xDesktop, xContext I keep getting an

com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge

or

java.io.IOException: EOF reached - socket,host=localhost,port=8100,localHost=127.0.0.1,localPort=63519,peerHost=localhost,peerPort=8100

exception. Any ideas what am I doing wrong?

Regards, lgs

2016-09-28 14:28:34 +0200 received badge  Famous Question (source)
2016-09-28 11:12:27 +0200 commented answer SDK API view state

Thanks!

lgs

2016-09-28 11:11:53 +0200 received badge  Notable Question (source)
2016-09-21 15:19:28 +0200 received badge  Popular Question (source)
2016-09-21 10:37:52 +0200 asked a question SDK API view state

Hi all,

I am trying to build a simple application in order to access the current document's properties and state. I have managed to get the current document:

com.sun.star.lang.XComponent currentComponent = xDesktop.getCurrentComponent();
XTextDocument temp = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, currentComponent);

and get some properties (com.sun.star.document.XDocumentProperties, com.sun.star.beans.XPropertySet. Then, at some point I call:

com.sun.star.frame.XController xController = temp.getCurrentController();
System.out.println(xController.getViewData());

This returns strings like "1418;1418;200;0;0;12143;6555;0;0" or "5894;1658;80;0;0;19163;12300;0;0".

Any ideas about where I can find documentation about what property each number refers to?

Regards,

lgs