diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-18 13:59:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-19 08:09:38 +0200 |
commit | f3e010829ab9d6b0b0ef48b67661774dd19f6de0 (patch) | |
tree | 4eb61dfc0c6cf4a2f9109b1f537d80f9cc928a80 /sd/source/ui/view/outlview.cxx | |
parent | 1c15934170341bbcfb4671fdbb01c2259265b3e1 (diff) |
use more SdrObjList::begin/end in sd
Change-Id: If39b6c561525bbf66d34edfbff0f1a3ef4531f85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/outlview.cxx')
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 8ce0a5dcb874..ab994e235813 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -857,16 +857,14 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner, void ) */ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage const * pPage) { - const size_t nObjectCount = pPage->GetObjCount(); SdrTextObj* pResult = nullptr; - for (size_t nObject = 0; nObject < nObjectCount; ++nObject) + for (const rtl::Reference<SdrObject>& pObject : *pPage) { - SdrObject* pObject = pPage->GetObj(nObject); if (pObject->GetObjInventor() == SdrInventor::Default && pObject->GetObjIdentifier() == SdrObjKind::TitleText) { - pResult = static_cast<SdrTextObj*>(pObject); + pResult = static_cast<SdrTextObj*>(pObject.get()); break; } } @@ -878,16 +876,14 @@ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage const * pPage) */ SdrTextObj* OutlineView::GetOutlineTextObject(SdrPage const * pPage) { - const size_t nObjectCount = pPage->GetObjCount(); SdrTextObj* pResult = nullptr; - for (size_t nObject = 0; nObject < nObjectCount; ++nObject) + for (const rtl::Reference<SdrObject>& pObject : *pPage) { - SdrObject* pObject = pPage->GetObj(nObject); if (pObject->GetObjInventor() == SdrInventor::Default && pObject->GetObjIdentifier() == SdrObjKind::OutlineText) { - pResult = static_cast<SdrTextObj*>(pObject); + pResult = static_cast<SdrTextObj*>(pObject.get()); break; } } |