diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 19:02:25 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:10:02 +0100 |
commit | 23c950ec58c32bca814c8fee946e3aa028bbc679 (patch) | |
tree | 0661a91bbdb6c8e269d2d46126bd26b857c46bb1 /sw | |
parent | 4d4b2ecb4e348ba783b6282e4fb27a771a589660 (diff) |
use C++11 iteration
Change-Id: I6eae9754e5fcb465f4f27e8c2896e6cea53fbb7a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 17 |
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 ); + } } } |