[Libreoffice] cppu::OPropertySetHelper ABI backwards compatibility

Stephan Bergmann stephan.bergmann.secondary at googlemail.com
Tue Aug 23 10:49:16 PDT 2011


On Aug 23, 2011, at 5:16 PM, Kohei Yoshida wrote:
> On Tue, 2011-08-23 at 17:09 +0200, Lionel Elie Mamane wrote:
>> On Mon, Aug 22, 2011 at 11:53:59PM +0200, Eike Rathke wrote:
>>> Maybe due to some overzealous introduction of such helper
>>> implementations into the UDK. Sure, it eases development of
>>> applications, but at the costs we're facing now.
>> 
>> The more helper we give to extensions, the less bugs they will have
>> and the more they will conform to interfaces we want them to conform
>> to. Looks like it can be worth the cost. 
> 
> No, that's a wrong way to put it.  The whole purpose of having common
> interfaces is to give implementation a freedom to implement as long as
> it conforms to the agreed-upon interfaces.  Exposing the
> *implementation* of the interface to the extensions basically throws
> away that freedom, and we are paying for that now.

Think of OPropertySetHelper as a helper to get your implementation of the abstract interfaces XPropertySet etc. done.  That makes it necessary to expose its implementation to its clients, which in turn makes it problematic to extend it.  I think what we pay here is OK, and largely understood.  I still think it is good to re-use OPropertySetHelper in the implementation of OPropertySetHelper2 as DRY-ly as possible (and thanks to m_pReserve it appears to indeed be possible in not too inelegant a way).

-Stephan


More information about the LibreOffice mailing list