summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 19:10:12 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:10:04 +0100
commit354da848ad9ca890e8f977bf210eb9952b72f6cb (patch)
tree9410ca1ac452f4cd23682a162215258ef45b881b /sw
parentae3e797258f14f4348ce542c71815e44e2c3f9f8 (diff)
use C++11 iteration
Change-Id: Iba781628aa39e537d403b1bbbd5c8891d6068026
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a8de6eaa60ee..301bcf99d795 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2186,14 +2186,15 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( bOnlineSpellChgd )
{
- SwViewShell *pSh = static_cast<SwViewShell*>(this->GetNext());
bool bOnlineSpl = rOpt.IsOnlineSpell();
- while( pSh != this )
- { pSh->mpOpt->SetOnlineSpell( bOnlineSpl );
- vcl::Window *pTmpWin = pSh->GetWin();
+ for(SwViewShell& rSh : GetRingContainer())
+ {
+ if(&rSh == this)
+ continue;
+ rSh.mpOpt->SetOnlineSpell( bOnlineSpl );
+ vcl::Window *pTmpWin = rSh.GetWin();
if( pTmpWin )
pTmpWin->Invalidate();
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
}
}