From aa822c44b758fe312a3a052f890f53418adc5f6b Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Tue, 10 Dec 2013 17:20:34 +0530 Subject: n#753460: Copying slides having same master page name. Has part feature of getting hashes of SdPages. (Misses hashing text, images, etc). --- svl/source/items/itemset.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'svl/source') 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() { -- cgit