sd/source/core/drawdoc.cxx | 5 ++++- sd/source/core/sdpage.cxx | 9 ++++++--- sd/source/ui/view/drviews1.cxx | 9 ++++++--- 3 files changed, 16 insertions(+), 7 deletions(-)
New commits: commit 127b828766b31cf7f69acd8eb80e0a3cbb4f7ca6 Author: Julien Nabet <serval2...@yahoo.fr> Date: Fri Nov 3 19:18:20 2017 +0100 Revert "A first step to refactor ShapeList (sd)" This reverts commit c5857a0371dcc7977e68d48f08f2a3ecefb67b89. Change-Id: I59326867bdf71dcf20a86e03499884452675c557 Reviewed-on: https://gerrit.libreoffice.org/44284 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 393bc68c2e3e..948bba6dc85d 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -732,9 +732,12 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool SfxStyleSheet* pTitleSheet = static_cast<SfxStyleSheet*>(pSPool->GetTitleSheet(aName)); + SdrObject* pObj = nullptr; + rPresentationShapes.seekShape(0); + // Now look for title and outline text objects, then make those objects // listeners. - for (auto const& pObj : rPresentationShapes.getList()) + while( (pObj = rPresentationShapes.getNextShape()) ) { if (pObj->GetObjInventor() == SdrInventor::Default) { diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 3ac3b29568de..6d7358947ca6 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -199,9 +199,12 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc // first sort all matching shapes with z-order std::vector< SdrObject* > aMatches; - for (auto const& shape : maPresentationShapeList.getList()) + SdrObject* pObj = nullptr; + maPresentationShapeList.seekShape(0); + + while( (pObj = maPresentationShapeList.getNextShape()) ) { - SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*shape); + SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj); if( pInfo ) { bool bFound = false; @@ -228,7 +231,7 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc } if( bFound ) { - aMatches.push_back( shape ); + aMatches.push_back( pObj ); } } } diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 8c322a76ff99..976d8dd1cb7b 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1063,13 +1063,16 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) { // set pages for all available handout presentation objects sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList(); - for (auto const& shape : rShapeList.getList()) + SdrObject* pObj = nullptr; + rShapeList.seekShape(0); + + while( (pObj = rShapeList.getNextShape()) ) { - if( pMaster->GetPresObjKind(shape) == PRESOBJ_HANDOUT ) + if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT ) { // #i105146# We want no content to be displayed for PageKind::Handout, // so just never set a page as content - static_cast<SdrPageObj*>(shape)->SetReferencedPage(nullptr); + static_cast<SdrPageObj*>(pObj)->SetReferencedPage(nullptr); } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits