diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-05-28 13:36:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-28 17:36:49 +0200 |
commit | bcd27039eec660fce2abd7604cdb8cd36ae4cdba (patch) | |
tree | 66aaecdf872ac6ee80142e2141b490b5d1a49880 /sw/source/filter/ww8 | |
parent | 9896f330cdb3df67b74b16a2c2177a8505fd2485 (diff) |
use the new SfxWhichIter::GetItemState feature
to speed up other places that are iterating over
SfxItemSets
Change-Id: I646bae12420d15e67effdd279e071cdf8a8afffd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 446d26b459de..181fbfac0508 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1377,7 +1377,7 @@ void lcl_writeParagraphMarkerProperties(DocxAttributeOutput& rAttributeOutput, c bool bFontSizeWritten = false; while (nWhichId) { - if (rParagraphMarkerProperties.GetItemState(nWhichId, true, &pItem) == SfxItemState::SET) + if (aIter.GetItemState(true, &pItem) == SfxItemState::SET) { if (isCHRATR(nWhichId) || nWhichId == RES_TXTATR_CHARFMT) { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index f776fdc10d2f..a1193999f59c 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1246,7 +1246,7 @@ void MSWord_SdrAttrIter::SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemS SfxWhichIter aWhichIter(rSet); for (sal_uInt16 nEEWhich = aWhichIter.FirstWhich(); nEEWhich; nEEWhich = aWhichIter.NextWhich()) { - if (SfxItemState::SET != rSet.GetItemState(nEEWhich, false)) + if (SfxItemState::SET != aWhichIter.GetItemState(false)) { sal_uInt16 nSwWhich = sw::hack::TransformWhichBetweenPools(m_rExport.m_rDoc.GetAttrPool(), *m_pEditPool, nEEWhich); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index da9c73099dae..7bd841d727b5 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -447,7 +447,7 @@ void SwWW8AttrIter::OutAttr(sal_Int32 nSwPos, bool bWriteCombChars) sal_uInt16 nWhichId = aIter.FirstWhich(); while( nWhichId ) { - if( SfxItemState::SET == pSet->GetItemState( nWhichId, false, &pItem )) + if( SfxItemState::SET == aIter.GetItemState( false, &pItem )) { if (nWhichId == nFontId) pFont = &(item_cast<SvxFontItem>(*pItem)); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 78bbb5219e57..c8f147e05763 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5640,7 +5640,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, bool bTest sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - if ( SfxItemState::SET == pSet->GetItemState( nWhich, true/*bDeep*/, &pItem ) && + if ( SfxItemState::SET == aIter.GetItemState( true/*bDeep*/, &pItem ) && ( !bTestForDefault || nWhich == RES_UL_SPACE || nWhich == RES_LR_SPACE || |