summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 18:18:45 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:53 +0100
commit65bc59b22c8c1eab0cc56baf4987f6af384a6808 (patch)
treeea4d1f85cc827260a8df202d753fa82eb47fb933 /sw
parente132165bc4b17eb154c729507bd6cbb1b5724e6f (diff)
use C++11 iteration
Change-Id: Ie7f7b7125029b1e0e2935b061d454cd5b6719543
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/pagechg.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8b2c8c678e14..2d93441ead59 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1646,16 +1646,14 @@ void SwRootFrm::ImplCalcBrowseWidth()
void SwRootFrm::StartAllAction()
{
- SwViewShell *pSh = GetCurrShell();
- if ( pSh )
- do
- { if ( pSh->ISA( SwCrsrShell ) )
- static_cast<SwCrsrShell*>(pSh)->StartAction();
+ if ( GetCurrShell() )
+ for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
+ {
+ if ( rSh.ISA( SwCrsrShell ) )
+ static_cast<SwCrsrShell*>(&rSh)->StartAction();
else
- pSh->StartAction();
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
-
- } while ( pSh != GetCurrShell() );
+ rSh.StartAction();
+ }
}
void SwRootFrm::EndAllAction( bool bVirDev )