diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-08-28 02:51:40 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-08-30 13:07:47 +0000 |
commit | c9493b344a9bd104d0a882f5e9407880c0c63c20 (patch) | |
tree | a984f282763eb00038de2aeb88b92e090e91503c | |
parent | 1ae5c5ea82207d90b556e8139ad48ca4ceff9311 (diff) |
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@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | svl/source/items/itempool.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 4cb9ccebabbd..2b3d9ff4685f 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); |