Kaydet (Commit) 63ef826b authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

use C++11 iteration

Change-Id: Ic43c07b1530595980794f89f94dfad28771fc155
üst 65bc59b2
...@@ -1658,25 +1658,22 @@ void SwRootFrm::StartAllAction() ...@@ -1658,25 +1658,22 @@ void SwRootFrm::StartAllAction()
void SwRootFrm::EndAllAction( bool bVirDev ) void SwRootFrm::EndAllAction( bool bVirDev )
{ {
SwViewShell *pSh = GetCurrShell(); if ( GetCurrShell() )
if ( pSh ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
do
{ {
const bool bOldEndActionByVirDev = pSh->IsEndActionByVirDev(); const bool bOldEndActionByVirDev = rSh.IsEndActionByVirDev();
pSh->SetEndActionByVirDev( bVirDev ); rSh.SetEndActionByVirDev( bVirDev );
if ( pSh->ISA( SwCrsrShell ) ) if ( rSh.ISA( SwCrsrShell ) )
{ {
static_cast<SwCrsrShell*>(pSh)->EndAction(); static_cast<SwCrsrShell*>(&rSh)->EndAction();
static_cast<SwCrsrShell*>(pSh)->CallChgLnk(); static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
if ( pSh->ISA( SwFEShell ) ) if ( rSh.ISA( SwFEShell ) )
static_cast<SwFEShell*>(pSh)->SetChainMarker(); static_cast<SwFEShell*>(&rSh)->SetChainMarker();
} }
else else
pSh->EndAction(); rSh.EndAction();
pSh->SetEndActionByVirDev( bOldEndActionByVirDev ); rSh.SetEndActionByVirDev( bOldEndActionByVirDev );
pSh = static_cast<SwViewShell*>(pSh->GetNext()); }
} while ( pSh != GetCurrShell() );
} }
void SwRootFrm::UnoRemoveAllActions() void SwRootFrm::UnoRemoveAllActions()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment