diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-11-03 19:18:20 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-11-03 19:40:45 +0100 |
commit | 127b828766b31cf7f69acd8eb80e0a3cbb4f7ca6 (patch) | |
tree | 51d745abf27f231ac237b8b671ddddf82832a412 /sd/source | |
parent | 6f29841acb201b118bbf5815163fb50d83929e9f (diff) |
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 <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 5 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 9 |
3 files changed, 16 insertions, 7 deletions
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); } } } |