Vendors Name via UNO API / Basic Macros

Lionel Elie Mamane lionel at
Thu Nov 21 08:06:26 PST 2013

On Mon, Nov 18, 2013 at 10:47:57PM +0100, Cor Nouws wrote:
> Thomas Krumbein wrote (14-11-13 09:21)

>> Because in LO 4.1 we have some API-changes, macros should now have a
>> version-switch.
>> There are different methods to get the internal version-number - that is
>> not a problem.

>> But: The version number itself is not suffcient because AOO 4.1.0 will
>> start soon and this version-number is identical to LO 4.1.0.

> I've not yet been looking into details to possibly distinct between
> pré and after 4.1.0 for the Date .

As a matter of example, here is how to detect the alluded to
change. 't would be nice if someone posted it on some documentation /
FAQ / code snippets website.

    Dim OOoReflection As Object
    Set OOoReflection = CreateUnoService("")
    Dim gD as Object
    Set gD = OOoReflection.forName("").getMethod("getDate").ReturnType
    if gD.TypeClass = then
        gbDateIsStruct = false
    elseif gD.TypeClass = And gD.Name = "" then
        gbDateIsStruct = true
        MsgBox "Unknown situation"
    end if


More information about the LibreOffice mailing list