diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-18 12:28:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-18 20:08:31 +0200 |
commit | 6dc53be7d2eabc23e3d96bae94d38e56d37b2bb5 (patch) | |
tree | f7768e3336fc245a2d0522735d3555f658b0f956 /sw/source/core/access/accmap.cxx | |
parent | baa67b2d7037bc5e289a144a81014f1fb42e68ed (diff) |
use more SdrObjList::begin/end in sw
Change-Id: If882c1c7863618a313b2e06abacdbfa756dfff3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158114
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/access/accmap.cxx')
-rw-r--r-- | sw/source/core/access/accmap.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 3babe9e879d0..9b3ac84876eb 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1998,13 +1998,12 @@ void SwAccessibleMap::RemoveGroupContext(const SdrObject *pParentObj) // but also by visibility checks in svx, then it doesn't return children. if (mpShapeMap && pParentObj && pParentObj->IsGroupObject()) { - SdrObjList *const pChildren(pParentObj->GetSubList()); - for (size_t i = 0; pChildren && i < pChildren->GetObjCount(); ++i) - { - SdrObject *const pChild(pChildren->GetObj(i)); - assert(pChild); - RemoveContext(pChild); - } + if (SdrObjList *const pChildren = pParentObj->GetSubList()) + for (const rtl::Reference<SdrObject>& pChild : *pChildren) + { + assert(pChild); + RemoveContext(pChild.get()); + } } } //End |