summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-01-23 22:59:30 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-01-23 23:15:16 +0100
commit965d09ebb247cd39c145852b231fd0c51e1e50d7 (patch)
tree7257d952c08b1c53e73aac86afa41f68037abc75 /sw
parent1bbb0a9209f6d5c365290684b2f5c18f0ad3c76f (diff)
do not use manual iteration
Change-Id: I7d59985557fd780276c7370daeb6eb3895f33b6e
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx40
1 files changed, 19 insertions, 21 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 07c977214805..4c50dcd0835a 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -576,24 +576,24 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
bComplete = false;
SwGrfNode* pNd = static_cast<SwGrfNode*>( GetNode());
- SwViewShell *pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell* pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
if( pVSh )
{
GraphicAttr aAttr;
if( pNd->GetGrfObj().IsCached( pVSh->GetOut(), Point(),
Prt().SSize(), &pNd->GetGraphicAttr( aAttr, this ) ))
{
- SwViewShell *pSh = pVSh;
- do {
- SET_CURR_SHELL( pSh );
- if( pSh->GetWin() )
+ for(SwViewShell rShell : pVSh->GetRingContainer())
+ {
+ SET_CURR_SHELL( &rShell );
+ if( rShell.GetWin() )
{
- if( pSh->IsPreview() )
- ::RepaintPagePreview( pSh, Frm().SVRect() );
+ if( rShell.IsPreview() )
+ ::RepaintPagePreview( &rShell, Frm().SVRect() );
else
- pSh->GetWin()->Invalidate( Frm().SVRect() );
+ rShell.GetWin()->Invalidate( Frm().SVRect() );
}
- } while( pVSh != (pSh = static_cast<SwViewShell*>(pSh->GetNext()) ));
+ }
}
}
}
@@ -640,23 +640,21 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( !pVSh )
break;
- SwViewShell *pSh = pVSh;
- do {
- SET_CURR_SHELL( pSh );
- if( pSh->IsPreview() )
+ for(SwViewShell& rShell : pVSh->GetRingContainer())
+ {
+ SET_CURR_SHELL( &rShell );
+ if( rShell.IsPreview() )
{
- if( pSh->GetWin() )
- ::RepaintPagePreview( pSh, aRect );
+ if( rShell.GetWin() )
+ ::RepaintPagePreview( &rShell, aRect );
}
- else if ( pSh->VisArea().IsOver( aRect ) &&
- OUTDEV_WINDOW == pSh->GetOut()->GetOutDevType() )
+ else if ( rShell.VisArea().IsOver( aRect ) &&
+ OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType() )
{
// invalidate instead of painting
- pSh->GetWin()->Invalidate( aRect.SVRect() );
+ rShell.GetWin()->Invalidate( aRect.SVRect() );
}
-
- pSh = static_cast<SwViewShell *>(pSh->GetNext());
- } while( pSh != pVSh );
+ }
}
break;