diff options
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 |