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, 4 insertions, 7 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 4351ba5b8692..23b76571c274 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -941,14 +941,11 @@ void SwViewShell::CalcLayout()
void SwViewShell::SetFirstVisPageInvalid()
{
- SwViewShell *pSh = this;
- do
+ for(SwViewShell& rSh : GetRingContainer())
{
- if ( pSh->Imp() )
- pSh->Imp()->SetFirstVisPageInvalid();
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
-
- } while ( pSh != this );
+ if ( rSh.Imp() )
+ rSh.Imp()->SetFirstVisPageInvalid();
+ }
}
void SwViewShell::SizeChgNotify()