From f3e010829ab9d6b0b0ef48b67661774dd19f6de0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 18 Oct 2023 13:59:22 +0200 Subject: 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 --- sd/source/ui/docshell/docshel3.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sd/source/ui/docshell/docshel3.cxx') diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 19ae6796841c..f286cd3fc189 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -118,13 +118,9 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, std::u16string_view rLa for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ ) { const SdrPage *pPage = pDoc->GetPage( nPage ); - const size_t nObjCount = pPage->GetObjCount(); - for( size_t nObj = 0; nObj < nObjCount; ++nObj ) - { - SdrObject *pObj = pPage->GetObj( nObj ); + for (const rtl::Reference& pObj : *pPage) if (pObj->GetObjIdentifier() != SdrObjKind::Page) - lcl_setLanguageForObj( pObj, nLang, bLanguageNone ); - } + lcl_setLanguageForObj( pObj.get(), nLang, bLanguageNone ); } } -- cgit