summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews1.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-01 10:31:04 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-11-03 07:26:12 +0100
commitc5857a0371dcc7977e68d48f08f2a3ecefb67b89 (patch)
treedcdacd2d49024e64bc94cbab7f43a01f5d347b8c /sd/source/ui/view/drviews1.cxx
parentaa5f6764bd29939f6543c0afa02b21319f2c7c6e (diff)
A first step to refactor ShapeList (sd)
Change-Id: I5b036a9e2ba2b4c5eb784d7264adaa525fd4c08d Reviewed-on: https://gerrit.libreoffice.org/44156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sd/source/ui/view/drviews1.cxx')
-rw-r--r--sd/source/ui/view/drviews1.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 976d8dd1cb7b..8c322a76ff99 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1063,16 +1063,13 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
// set pages for all available handout presentation objects
sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList();
- SdrObject* pObj = nullptr;
- rShapeList.seekShape(0);
-
- while( (pObj = rShapeList.getNextShape()) )
+ for (auto const& shape : rShapeList.getList())
{
- if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT )
+ if( pMaster->GetPresObjKind(shape) == PRESOBJ_HANDOUT )
{
// #i105146# We want no content to be displayed for PageKind::Handout,
// so just never set a page as content
- static_cast<SdrPageObj*>(pObj)->SetReferencedPage(nullptr);
+ static_cast<SdrPageObj*>(shape)->SetReferencedPage(nullptr);
}
}
}