summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 22:55:09 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:10:02 +0100
commit4d4b2ecb4e348ba783b6282e4fb27a771a589660 (patch)
tree9ad5bf99cf5f35c0f02ea3ef588323dfa06299cd /sw
parent3c1b9b89caddeff71afd3d97f52dd93df5c529af (diff)
use C++11 iteration
Change-Id: Idcbc7a2a88623ce370d0325284d2e8f96a9e2033
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx14
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;
}