diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-01-23 23:06:26 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-01-23 23:15:18 +0100 |
commit | 512f85f07dc1483ea3ab328597092ec3170fbeaa (patch) | |
tree | 616f445a824f6f581337894a2e02038e2c75c8f2 /sw | |
parent | 16e524d565490f740a4105d65f663dacc8aee23d (diff) |
do not use manual iteration
Change-Id: I50c4a9c7e10ddf47a280b2b5e08051ce480985cf
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index b452db5a6180..5e13cd597098 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -246,16 +246,13 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) //will this put the EndAction of the last shell in the sequence? SwViewShell::mbLstAct = true; - SwViewShell *pSh = this->GetNext(); - while ( pSh != this ) + for(SwViewShell& rShell : GetRingContainer()) { - if ( pSh->ActionPend() ) + if(&rShell != this && rShell.ActionPend()) { SwViewShell::mbLstAct = false; - pSh = this; + break; } - else - pSh = pSh->GetNext(); } const bool bIsShellForCheckViewLayout = ( this == GetLayout()->GetCurrShell() ); |