Hi Laurent,
On Mon, 16 May 2011 16:53:05 +0200, Laurent Godard <oooconv@free.fr>
wrote:
Hi Christophe
perharps not perfect (and in fact surely ;) )
here is how i quickly solved this using macros
can be implemented in java
Thanks a lot.
I managed to create a Java version that I can use in an extension.
btw, perharps not the right mailing list
I thought it was a developer question...
What is the right mailing list for this kind of question?
Best regards,
Christophe
HTH
laurent
'-----
function isLibreOffice
dim aSettings, nom
aSettings = getConfigSetting("/org.openoffice.Setup/Product", false)
nom = aSettings.ooName
isLibreOffice = (nom = "LibreOffice")
end function
function getConfigSetting(target as string, forUpdate as boolean)
dim service as String ' nom du service d'acces à la configuration
dim aSettings, aConfigProvider
dim aParams(0) As new com.sun.star.beans.PropertyValue
dim varEmpty
if forUpdate then
service = "com.sun.star.configuration.ConfigurationUpdateAccess"
else
service = "com.sun.star.configuration.ConfigurationAccess"
endif
aConfigProvider = createUnoService(
"com.sun.star.configuration.ConfigurationProvider" )
aParams(0).Name = "nodepath"
aParams(0).Value = target
aSettings = aConfigProvider.createInstanceWithArguments(service,
aParams() )
getConfigSetting = aSettings
end function
--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
www.docarch.be
Twitter: @RabelaisA11y
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.