Kaydet (Commit) c9493b34 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Michael Stahl

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/28429Tested-by: 's avatarJochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 1ae5c5ea
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment