diff options
Diffstat (limited to 'svl/source/items/itemset.cxx')
-rw-r--r-- | svl/source/items/itemset.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index b9e3a9b310ec..f275a55d529b 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -457,7 +457,23 @@ void SfxItemSet::ClearInvalidItems( sal_Bool bHardDefault ) } } +void SfxItemSet::InvalidateDefaultItems() +{ + DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); + sal_uInt16* pPtr = _pWhichRanges; + SfxItemArray ppFnd = _aItems; + while( *pPtr ) + { + for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd ) + if ( *ppFnd && *ppFnd != (SfxPoolItem *)-1 && **ppFnd == _pPool->GetDefaultItem( nWhich ) ) + { + _pPool->Remove( **ppFnd ); + *ppFnd = (SfxPoolItem*)-1; + } + pPtr += 2; + } +} void SfxItemSet::InvalidateAllItems() { |