summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdundo.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-18 12:28:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-18 20:08:21 +0200
commitbaa67b2d7037bc5e289a144a81014f1fb42e68ed (patch)
treed0334d4a2257c6680662fdc4064289fdea8720d7 /svx/source/svdraw/svdundo.cxx
parentca58f649196ed6b4ce15d0db3935f7de4cb0f2ea (diff)
use more SdrObjList::begin/end in svx
Change-Id: I362a2e12492391338b63708e4b329fc77ac363c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdundo.cxx')
-rw-r--r--svx/source/svdraw/svdundo.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 3788f8d7154c..51e6268d9fbc 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -263,12 +263,11 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSave
{
// it's a group object!
pUndoGroup.reset(new SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
- const size_t nObjCount(pOL->GetObjCount());
- for(size_t nObjNum = 0; nObjNum < nObjCount; ++nObjNum)
+ for (const rtl::Reference<SdrObject>& pObj : *pOL)
{
pUndoGroup->AddAction(
- std::make_unique<SdrUndoAttrObj>(*pOL->GetObj(nObjNum), bStyleSheet1));
+ std::make_unique<SdrUndoAttrObj>(*pObj, bStyleSheet1));
}
}
@@ -566,10 +565,8 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj)
// If this were 3D scene, we'd only add an Undo for the scene itself
// (which we do elsewhere).
pUndoGroup.reset(new SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
- const size_t nObjCount = pOL->GetObjCount();
- for (size_t nObjNum = 0; nObjNum<nObjCount; ++nObjNum) {
- pUndoGroup->AddAction(std::make_unique<SdrUndoGeoObj>(*pOL->GetObj(nObjNum)));
- }
+ for (const rtl::Reference<SdrObject>& pObj : *pOL)
+ pUndoGroup->AddAction(std::make_unique<SdrUndoGeoObj>(*pObj));
}
else
{