summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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());
}
}