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


Hi Christina,

On Mon, 28 Mar 2011 12:45:49 +0200
Christina Roßmanith <ChrRossmanith@web.de> wrote:

Hi,

during patch reviewing I came across the following:

file: sfx2/source/view/frame.cxx

int SfxUsrAnyItem::operator==( const SfxPoolItem& /*rItem*/ ) const
{
     return sal_False;
}


I'm not an c++ expert, but an operator== which is always false can't
be of much use?!?

SfxPoolItems are held in SfxItemSets, which in turn store them in a
SfxItemPool. Some items are "pooled" that is, if you put them in a
SfxItemSet, it looks for the item in the SfxItemPool and if it is found
there, it just uses a reference to that one instead of keeping its own
copy. A weird form of refcounting in a way. An operator== returning
always false is thus claiming "never try to pool me". Why? Dunno, but
there might be reasons. ;)

Best Regards,

Bjoern


-- 
https://launchpad.net/~bjoern-michaelsen



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.