summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 18:21:31 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:54 +0100
commit63ef826b08623ff3cdd8f9692544fcb87bb16206 (patch)
tree075fbec6014839bdf568f39e36e0a1350903f25d
parent65bc59b22c8c1eab0cc56baf4987f6af384a6808 (diff)
use C++11 iteration
Change-Id: Ic43c07b1530595980794f89f94dfad28771fc155
-rw-r--r--sw/source/core/layout/pagechg.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 2d93441ead59..e562a8d9b04a 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1658,25 +1658,22 @@ void SwRootFrm::StartAllAction()
void SwRootFrm::EndAllAction( bool bVirDev )
{
- SwViewShell *pSh = GetCurrShell();
- if ( pSh )
- do
+ if ( GetCurrShell() )
+ for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
{
- const bool bOldEndActionByVirDev = pSh->IsEndActionByVirDev();
- pSh->SetEndActionByVirDev( bVirDev );
- if ( pSh->ISA( SwCrsrShell ) )
+ const bool bOldEndActionByVirDev = rSh.IsEndActionByVirDev();
+ rSh.SetEndActionByVirDev( bVirDev );
+ if ( rSh.ISA( SwCrsrShell ) )
{
- static_cast<SwCrsrShell*>(pSh)->EndAction();
- static_cast<SwCrsrShell*>(pSh)->CallChgLnk();
- if ( pSh->ISA( SwFEShell ) )
- static_cast<SwFEShell*>(pSh)->SetChainMarker();
+ static_cast<SwCrsrShell*>(&rSh)->EndAction();
+ static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
+ if ( rSh.ISA( SwFEShell ) )
+ static_cast<SwFEShell*>(&rSh)->SetChainMarker();
}
else
- pSh->EndAction();
- pSh->SetEndActionByVirDev( bOldEndActionByVirDev );
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
-
- } while ( pSh != GetCurrShell() );
+ rSh.EndAction();
+ rSh.SetEndActionByVirDev( bOldEndActionByVirDev );
+ }
}
void SwRootFrm::UnoRemoveAllActions()