summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()