summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/view/viewsh.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 06496b845b92..5fc9560b03cd 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -512,19 +512,16 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect )
{
if ( !Imp()->IsCalcLayoutProgress() )
{
- SwViewShell *pSh = this;
- do
+ for(SwViewShell& rSh : GetRingContainer())
{
- if ( pSh->GetWin() )
+ if ( rSh.GetWin() )
{
- if ( pSh->IsPreview() )
- ::RepaintPagePreview( pSh, rRect );
- else if ( pSh->VisArea().IsOver( rRect ) )
- pSh->GetWin()->Invalidate( rRect.SVRect() );
+ if ( rSh.IsPreview() )
+ ::RepaintPagePreview( &rSh, rRect );
+ else if ( rSh.VisArea().IsOver( rRect ) )
+ rSh.GetWin()->Invalidate( rRect.SVRect() );
}
- pSh = static_cast<SwViewShell*>(pSh->GetNext());
-
- } while ( pSh != this );
+ }
}
}