summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-28 13:36:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-28 17:36:49 +0200
commitbcd27039eec660fce2abd7604cdb8cd36ae4cdba (patch)
tree66aaecdf872ac6ee80142e2141b490b5d1a49880 /chart2
parent9896f330cdb3df67b74b16a2c2177a8505fd2485 (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 'chart2')
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index e90fad016cfd..9ca38f4919e6 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -198,7 +198,8 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem
while (nWhich)
{
- if ((rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET) &&
+ SfxItemState nSourceItemState = aIter.GetItemState(true, &pPoolItem);
+ if ((nSourceItemState == SfxItemState::SET) &&
(rDestSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::SET))
{
if (rSourceSet.Get(nWhich) != rDestSet.Get(nWhich))
@@ -209,7 +210,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem
}
}
}
- else if( rSourceSet.GetItemState(nWhich, true, &pPoolItem) == SfxItemState::DONTCARE )
+ else if( nSourceItemState == SfxItemState::DONTCARE )
rDestSet.InvalidateItem(nWhich);
nWhich = aIter.NextWhich ();