summaryrefslogtreecommitdiff
path: root/svx/source/engine3d/scene3d.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/engine3d/scene3d.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/engine3d/scene3d.cxx')
-rw-r--r--svx/source/engine3d/scene3d.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index afd73e744780..5e55fa7c81c8 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -645,9 +645,9 @@ void E3dScene::RecalcSnapRect()
// call parent
E3dObject::RecalcSnapRect();
- for(size_t a = 0; a < GetObjCount(); ++a)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate(DynCastE3dObject(GetObj(a)));
+ E3dObject* pCandidate(DynCastE3dObject(pObj.get()));
if(pCandidate)
{
@@ -723,9 +723,9 @@ void E3dScene::SetSelected(bool bNew)
// call parent
E3dObject::SetSelected(bNew);
- for(size_t a(0); a < GetObjCount(); a++)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate(DynCastE3dObject(GetObj(a)));
+ E3dObject* pCandidate(DynCastE3dObject(pObj.get()));
if(pCandidate)
{
@@ -799,9 +799,9 @@ void E3dScene::SetBoundAndSnapRectsDirty(bool bNotMyself, bool bRecursive)
// call parent
E3dObject::SetBoundAndSnapRectsDirty(bNotMyself, bRecursive);
- for(size_t a = 0; a < GetObjCount(); ++a)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate = DynCastE3dObject(GetObj(a));
+ E3dObject* pCandidate = DynCastE3dObject(pObj.get());
if(pCandidate)
{
@@ -815,9 +815,9 @@ void E3dScene::NbcSetLayer(SdrLayerID nLayer)
// call parent
E3dObject::NbcSetLayer(nLayer);
- for(size_t a = 0; a < GetObjCount(); ++a)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate = DynCastE3dObject(GetObj(a));
+ E3dObject* pCandidate = DynCastE3dObject(pObj.get());
if(pCandidate)
{
@@ -834,9 +834,9 @@ void E3dScene::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
// call parent
E3dObject::handlePageChange(pOldPage, pNewPage);
- for(size_t a(0); a < GetObjCount(); a++)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate = DynCastE3dObject(GetObj(a));
+ E3dObject* pCandidate = DynCastE3dObject(pObj.get());
if(pCandidate)
{
@@ -857,11 +857,10 @@ SdrObjList* E3dScene::GetSubList() const
basegfx::B3DRange E3dScene::RecalcBoundVolume() const
{
basegfx::B3DRange aRetval;
- const size_t nObjCnt(GetObjCount());
- for(size_t a = 0; a < nObjCnt; ++a)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- const E3dObject* p3DObject = DynCastE3dObject(GetObj(a));
+ const E3dObject* p3DObject = DynCastE3dObject(pObj.get());
if(p3DObject)
{
@@ -879,9 +878,9 @@ void E3dScene::SetTransformChanged()
// call parent
E3dObject::SetTransformChanged();
- for(size_t a = 0; a < GetObjCount(); ++a)
+ for (const rtl::Reference<SdrObject>& pObj : *this)
{
- E3dObject* pCandidate = DynCastE3dObject(GetObj(a));
+ E3dObject* pCandidate = DynCastE3dObject(pObj.get());
if(pCandidate)
{