Alberto González Palomo wrote on 21/09/16 at 19:45:
I have a working Java application that uses UNO with LibreOffice 5.
I'm using createInstanceWithContext for com.sun.star.frame.Desktop,
but in the documentation it says that this interface is deprecated and
we should use the "theDesktop singleton" instead:
http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1frame_1_1Desktop.html#details
However I haven't found any information on how to do that.
[...]
Is this documented anywhere, or is there any example that uses
theDesktop instead of Desktop?
Ok, I got it working.
None of the Java examples in the SDK uses theDesktop, all use the
"deprecated" Desktop.
Now instead of:
serviceManager.createInstanceWithContext
("com.sun.star.frame.Desktop", componentContext)
I use:
com.sun.star.frame.theDesktop.get(componentContext)
Cheers,
--
Alberto González Palomo
Toledo, España / Saarbrücken, Deutschland
http://www.matracas.org
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.