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


Hi Lionel,

On Sunday, 2011-08-21 01:54:17 +0200, Lionel Elie Mamane wrote:

From the second (later) commit log message, you intended to preserve
ABI, but I get the impressions ABI backwards compatibility is still
broken in a different way by the addition of

    virtual void SAL_CALL enableChangeListenerNotification( sal_Bool bEnable )
        throw(::com::sun::star::uno::RuntimeException);

From what I observe, at least with GNU GCC/g++ on Debian GNU/Linux
amd64 (I wouldn't know about MSVC++ and g++ on MS Windows, but
possibly it is the same), it seems all the virtual functions that are
declared *after* that one in the header are shifted one position in
the virtual function table, and that lookups in the virtual function
table are by position, not by name/signature.

That's just normal behavior, inserting a virtual function shifts all
following functions in the vtable, so code compiled against the old
header calling into the new library calls a function by offset -1, and
code compiled against the new header calling into the old library calls
a function by offset +1.

This is why API marked as published shall not be changed after a release
and you see all the XName2 derived from XName and so on.

So I'm not sure what to do... Maybe put OPropertySetHelper back like
it was, and have:


class OPropertySetHelper2 : public OPropertySetHelper
{
public:
(...)
    virtual void SAL_CALL enableChangeListenerNotification( sal_Bool bEnable )
        throw(::com::sun::star::uno::RuntimeException);
}

So that new code that wants to have the ability to enable/disable
change listener notifications can derive from OPropertySetHelper2
instead, but old code still works?

Yes.

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

Attachment: signature.asc
Description: Digital signature


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.