Hi Laurent, On Mon, 16 May 2011 16:53:05 +0200, Laurent Godard <oooc...@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 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice