[Libreoffice-commits] core.git: svl/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Tue Aug 30 13:08:10 UTC 2016
svl/source/items/itempool.cxx | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
New commits:
commit c9493b344a9bd104d0a882f5e9407880c0c63c20
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Sun Aug 28 02:51:40 2016 +0200
tdf#96248 delete SfxPoolItems with Which Id >= 4000
Which Ids > 4999 (SFX_WHICH_MAX) are Slot Ids and handled above.
Which Ids >= 4000 and <= 4999 are used by EditEngineItemPool,
defined in eeitem.hxx (values 3994 to 4048).
the former hack prevented that some of PoolItems got deleted
when RefCount dropped to 0. when trying to Remove the PoolItem again,
an earlier assert hits.
hack and comment are in source since initial commit,
other referenced comment is nowhere to be found.
Change-Id: I299b2ae4aed088d4ee438397d0bb91ca8d055cef
Reviewed-on: https://gerrit.libreoffice.org/28429
Tested-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 4cb9cce..2b3d9ff 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -812,16 +812,9 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
SfxPoolItem*& p = (*pItemArr)[nIdx];
assert(p == &rItem);
- if ( p->GetRefCount() ) //!
- ReleaseRef( *p );
- else
- {
- assert(false && "removing Item without ref");
- }
+ assert(p->GetRefCount() && "removing Item without ref");
- // FIXME: Hack, for as long as we have problems with the Outliner
- // See other MI-REF
- if ( 0 == p->GetRefCount() && nWhich < 4000 )
+ if (0 == ReleaseRef(*p))
{
DELETEZ(p);
More information about the Libreoffice-commits
mailing list