Although it is possible from Basic script to get the version of LibrOffice it is running under, the way to do so is rather baroque and (worse!) undocumented. It should just be a call to a utility function, like e.g. getOfficeVersion getOfficeProductName ... For reference, that's how one can do it now: Sub Main Dim cfgProv As Object Set cfgProv = CreateUnoService("com.sun.star.configuration.ConfigurationProvider") Dim arg1 as new "com.sun.star.beans.PropertyValue" Dim args(1) as new "com.sun.star.beans.PropertyValue" arg1.Name = "nodepath" arg1.Value="/org.openoffice.Setup/Product" args(0) = arg1 Dim cfgAccess As Object Set cfgAccess = cfgProv.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args) MsgBox cfgAccess.ooName & " version " & cfgAccess.ooSetupVersion & ", provided by """ & cfgAccess.ooVendor & """" End Sub This provides a string; it would be better if the version were provided as a (set of) _number_s.
Hello I completely agree with this request. Only slight attenuation: the current procedure for obtaining this information is a *little* documented (see GetRegistryKeyContent and GetProductname examples in the Misc module of Tools library). I also agree with the "type" request for ooSetupxxx properties(Extension, Version, ooSetupVersionAboutBox...). Could we not add to request a getBuildID utility function equivalent to: sub GetBuildID dim sID as string FA = createunoservice("com.sun.star.sheet.FunctionAccess") sID = FA.callFunction("INFO", array("Release") msgbox "Build ID: " & sID end sub Regards Pierre-Yves
Hi, While I also greatly support the above requests, I would to comment it further: With regards to LibreOffice Basic coding consistency, I may object that Basic may end up with dozens of getThis() & getThat() functions all over the place. They may possibly collide with hundreds of existing Basic code modules already produced. In order to limit the number of Basic language reserved statement to a reasonable amount, may I recommend we are provided with a class/service, named 'myLibreOffice' per se or anything else, that holds the requested attributes & that can be extended at will to any new properties/methods/.. of of future taste. Furthermore, a built-in class/service paradigm would be distributable to Python, JavaScript & BeanShell all together. Regards Alain
As Pierre-Yves remarked, LibreOffice Macros -> Tools -> Misc -> GetProductname provides the information called for, both the product name and the version. Starting from this you can write your own routine providing the information fitting to your taste in less than five minutes. So why should someone bother to do this for you?
I would say this bug has been fixed indirectly by the introduction of the Platform service of the ScriptForge library since LO 7.1 IIRC. Here's the help page for the Platform service: https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03/sf_platform.html?DbPAR=BASIC#bm_id501600788076381
Then lets close it with WFM since all the information can be retrieved using the platform service using the scriptforge library pointed out by comment 4.