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 .

https://bugs.freedesktop.org/show_bug.cgi?id=70947#c5

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("com.sun.star.reflection.CoreReflection")
    Dim gD as Object
    Set gD = 
OOoReflection.forName("com.sun.star.awt.XDateField").getMethod("getDate").ReturnType
    if gD.TypeClass = com.sun.star.uno.TypeClass.LONG then
        gbDateIsStruct = false
    elseif gD.TypeClass = com.sun.star.uno.TypeClass.STRUCT And gD.Name = 
"com.sun.star.util.Date" then
        gbDateIsStruct = true
    else
        MsgBox "Unknown situation"
    end if

-- 
Lionel
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to