From 354da848ad9ca890e8f977bf210eb9952b72f6cb Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 3 Dec 2014 19:10:12 +0100 Subject: use C++11 iteration Change-Id: Iba781628aa39e537d403b1bbbd5c8891d6068026 --- sw/source/core/view/viewsh.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sw') 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(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(pSh->GetNext()); } } -- cgit