summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-28 18:14:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-28 20:50:40 +0200
commit9ae3863f2afaa07abda6af11daf34bf6b808c3af (patch)
treea6ac827f983b24f2995c5883a6f4687b43cbcd17 /editeng
parent8f3e12b7a918935eae4e98c47cdc3b575e8bf089 (diff)
add ClearItem to the SfxItemSet iterators
to speed up operations when iterating over SfxItemSets Change-Id: Ie40327ffaf7faa801ccc12d2b05c546a7fe49802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135079 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/rtf/svxrtf.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index bb07beae826c..b06337a143b1 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -654,7 +654,7 @@ void SvxRTFParser::ClearStyleAttr_( SvxRTFItemStackType& rStkType )
if (SfxItemPool::IsWhich(nWhich) &&
SfxItemState::SET == aIter.GetItemState( false, &pItem ) &&
rPool.GetDefaultItem( nWhich ) == *pItem )
- rSet.ClearItem( nWhich ); // delete
+ aIter.ClearItem(); // delete
}
}
else
@@ -707,7 +707,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
if( SfxItemState::SET == pCurrent->aAttrSet.GetItemState(
pItem->Which(), false, &pGet ) &&
*pItem == *pGet )
- pOld->aAttrSet.ClearItem( pItem->Which() );
+ aIter.ClearItem();
pItem = aIter.NextItem();
} while (pItem);
@@ -1109,7 +1109,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser )
sal_uInt16 nWhich = pIterItem->Which();
if( SfxItemState::SET != pTmp->aAttrSet.GetItemState( nWhich,
false, &pItem ) || *pItem != *pIterItem)
- aMrgSet.ClearItem( nWhich );
+ aIter.ClearItem();
pIterItem = aIter.NextItem();
} while(pIterItem);