diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 18:24:01 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:09:55 +0100 |
commit | 0dcdbefaf9a7ac2c1d632d0246fca3f9d55b1f85 (patch) | |
tree | 6ff8670f0ff4918a108733e38e14641f33c852bb /sw | |
parent | d14ab0133c683409dcf6287006d9c62dfa445f7a (diff) |
use C++11 iteration
Change-Id: Ifc64a7e301e9ecaa59890d0363d699eb9ff5812d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 09f6ad047fce..d4e54088943c 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1711,23 +1711,20 @@ void SwRootFrm::UnoRemoveAllActions() void SwRootFrm::UnoRestoreAllActions() { - SwViewShell *pSh = GetCurrShell(); - if ( pSh ) - do + if ( GetCurrShell() ) + for(SwViewShell& rSh : GetCurrShell()->GetRingContainer()) { - sal_uInt16 nActions = pSh->GetRestoreActions(); + sal_uInt16 nActions = rSh.GetRestoreActions(); while( nActions-- ) { - if ( pSh->ISA( SwCrsrShell ) ) - static_cast<SwCrsrShell*>(pSh)->StartAction(); + if ( rSh.ISA( SwCrsrShell ) ) + static_cast<SwCrsrShell*>(&rSh)->StartAction(); else - pSh->StartAction(); + rSh.StartAction(); } - pSh->SetRestoreActions(0); - pSh->LockView(false); - pSh = static_cast<SwViewShell*>(pSh->GetNext()); - - } while ( pSh != GetCurrShell() ); + rSh.SetRestoreActions(0); + rSh.LockView(false); + } } // Helper functions for SwRootFrm::CheckViewLayout |