https://bugs.freedesktop.org/show_bug.cgi?id=70949

          Priority: medium
            Bug ID: 70949
          Assignee: [email protected]
            Blocks: 70947
           Summary: Please provide utility functions to get the current
                    product (Office Suite) name, version, etc.
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: 4.2.0.0.alpha0+ Master
         Component: BASIC
           Product: LibreOffice

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to