Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.