summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 18:25:22 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:55 +0100
commit5e023bf54abbae936230899edac03ec5f6bec441 (patch)
treef2fbc45b77f67792bc10802a013e4e3173442a9d /sw
parent0dcdbefaf9a7ac2c1d632d0246fca3f9d55b1f85 (diff)
use C++11 iteration
Change-Id: Ic51ddaf05c6377c27dfe81277228b43c305fc632
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/pagechg.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index d4e54088943c..02c523bfcd0b 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1776,14 +1776,12 @@ static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
svt::EmbeddedObjectRef& xObj = pNode->GetOLEObj().GetObject();
if ( xObj.is() )
{
- SwViewShell* pTmp = pSh;
- do
+ for(SwViewShell& rSh : pSh->GetRingContainer())
{
- SwFEShell* pFEShell = dynamic_cast< SwFEShell* >( pTmp );
+ SwFEShell* pFEShell = dynamic_cast< SwFEShell* >( &rSh );
if ( pFEShell )
pFEShell->MoveObjectIfActive( xObj, rOffset );
- pTmp = static_cast<SwViewShell*>( pTmp->GetNext() );
- } while( pTmp != pSh );
+ }
}
}
}