summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 14:51:08 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 17:46:19 +0100
commit4942573a9efadb7986e9daae3db2ea4d28eb6ac1 (patch)
tree8445174f14887abdd64fe303afb64bc14d074053 /sw
parent798ffd674b26666d0ada967f144bfdd54821e79f (diff)
use C++11 iteration
Change-Id: I07de79fd793051efef717b7c44c88812cefc59d5
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index d76b5946fa69..6d0761d3149a 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -150,12 +150,12 @@ void DocumentDrawModelManager::InitDrawModel()
mpDrawModel->SetRefDevice( pRefDev );
mpDrawModel->SetNotifyUndoActionHdl( LINK( &m_rDoc, SwDoc, AddDrawUndo ));
- if ( m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() )
+ SwViewShell* const pSh = m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell();
+ if ( pSh )
{
- SwViewShell* pViewSh = m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell();
- do
+ for(SwViewShell& rViewSh : pSh->GetRingContainer())
{
- SwRootFrm* pRoot = pViewSh->GetLayout();
+ SwRootFrm* pRoot = rViewSh.GetLayout();
if( pRoot && !pRoot->GetDrawPage() )
{
// Disable "multiple layout" for the moment:
@@ -166,8 +166,7 @@ void DocumentDrawModelManager::InitDrawModel()
pRoot->SetDrawPage( pDrawPage );
pDrawPage->SetSize( pRoot->Frm().SSize() );
}
- pViewSh = static_cast<SwViewShell*>(pViewSh->GetNext());
- }while( pViewSh != m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() );
+ }
}
}