diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 70ba96b4d887..06496b845b92 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -495,18 +495,16 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev ) bool SwViewShell::AddPaintRect( const SwRect & rRect ) { bool bRet = false; - SwViewShell *pSh = this; - do + for(SwViewShell& rSh : GetRingContainer()) { - if( pSh->Imp() ) + if( rSh.Imp() ) { - if ( pSh->IsPreview() && pSh->GetWin() ) - ::RepaintPagePreview( pSh, rRect ); + if ( rSh.IsPreview() && rSh.GetWin() ) + ::RepaintPagePreview( &rSh, rRect ); else - bRet |= pSh->Imp()->AddPaintRect( rRect ); + bRet |= rSh.Imp()->AddPaintRect( rRect ); } - pSh = static_cast<SwViewShell*>(pSh->GetNext()); - } while ( pSh != this ); + } return bRet; } |