Kaydet (Commit) 0dcdbefa authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

use C++11 iteration

Change-Id: Ifc64a7e301e9ecaa59890d0363d699eb9ff5812d
üst d14ab013
...@@ -1711,23 +1711,20 @@ void SwRootFrm::UnoRemoveAllActions() ...@@ -1711,23 +1711,20 @@ void SwRootFrm::UnoRemoveAllActions()
void SwRootFrm::UnoRestoreAllActions() void SwRootFrm::UnoRestoreAllActions()
{ {
SwViewShell *pSh = GetCurrShell(); if ( GetCurrShell() )
if ( pSh ) for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
do
{ {
sal_uInt16 nActions = pSh->GetRestoreActions(); sal_uInt16 nActions = rSh.GetRestoreActions();
while( nActions-- ) while( nActions-- )
{ {
if ( pSh->ISA( SwCrsrShell ) ) if ( rSh.ISA( SwCrsrShell ) )
static_cast<SwCrsrShell*>(pSh)->StartAction(); static_cast<SwCrsrShell*>(&rSh)->StartAction();
else else
pSh->StartAction(); rSh.StartAction();
}
rSh.SetRestoreActions(0);
rSh.LockView(false);
} }
pSh->SetRestoreActions(0);
pSh->LockView(false);
pSh = static_cast<SwViewShell*>(pSh->GetNext());
} while ( pSh != GetCurrShell() );
} }
// Helper functions for SwRootFrm::CheckViewLayout // Helper functions for SwRootFrm::CheckViewLayout
......
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