svx/source/sdr/properties/itemsettools.cxx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)
New commits: commit adab4f4ddca5dcf76e9049fb6d2b2b26146cb0d3 Author: Noel Grandin <[email protected]> AuthorDate: Mon Feb 23 09:23:40 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Feb 23 10:14:10 2026 +0100 use more SfxItemIter which is more efficient when all we want is the SET items Change-Id: Ie2aa290a4546f408a58b74423acd54351282d179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200009 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index 11431d367d12..c1d694aa2739 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -20,7 +20,7 @@ #include <sdr/properties/itemsettools.hxx> #include <tools/fract.hxx> #include <svl/itemset.hxx> -#include <svl/whiter.hxx> +#include <svl/itemiter.hxx> #include <svx/svdogrp.hxx> #include <svx/svditer.hxx> #include <memory> @@ -64,22 +64,15 @@ namespace sdr::properties return; } - SfxWhichIter aIter(rSet); - sal_uInt16 nWhich(aIter.FirstWhich()); - const SfxPoolItem *pItem = nullptr; - - while(nWhich) + for (SfxItemIter aIter(rSet); !aIter.IsAtEnd(); aIter.Next()) { - if(SfxItemState::SET == aIter.GetItemState(false, &pItem)) + const SfxPoolItem *pItem = aIter.GetCurItem(); + if(!IsDisabledItem(pItem) && pItem->HasMetrics()) { - if(pItem->HasMetrics()) - { - std::unique_ptr<SfxPoolItem> pNewItem(pItem->Clone()); - pNewItem->ScaleMetrics(nMul, nDiv); - rSet.Put(std::move(pNewItem)); - } + std::unique_ptr<SfxPoolItem> pNewItem(pItem->Clone()); + pNewItem->ScaleMetrics(nMul, nDiv); + rSet.Put(std::move(pNewItem)); } - nWhich = aIter.NextWhich(); } } } // end of namespace
