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.
For reference, that's how one can do it now:
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"
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 & """"
This provides a string; it would be better if the version were provided as a (set of) _number_s.
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:
dim sID as string
FA = createunoservice("com.sun.star.sheet.FunctionAccess")
sID = FA.callFunction("INFO", array("Release")
msgbox "Build ID: " & sID
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.
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?