diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 15:49:18 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 17:46:20 +0100 |
commit | 359ebc27849e570d14f805bd676a0af5fd03df5c (patch) | |
tree | d3aca9ed8dbe73e723ed9bd34dd9e158c64d519f /sw | |
parent | f6ad09176b962dabf96aca4a5e25f8e601787367 (diff) |
use C++11 iteration
Change-Id: I6eb1287a6dcb27b2d29612f8ec71290ace62be32
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 0e78181b55f5..dc66cddd87b1 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2556,10 +2556,11 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) // take care of all shells SwViewShell *pTmp = this; - do { - if( pTmp->IsA( TYPE( SwCrsrShell ))) + for(SwViewShell& rTmp : GetRingContainer()) + { + if( rTmp.IsA( TYPE( SwCrsrShell ))) { - SwCrsrShell* pSh = static_cast<SwCrsrShell*>(pTmp); + SwCrsrShell* pSh = static_cast<SwCrsrShell*>(&rTmp); if( pSh->m_pCrsrStk ) pSh->_ParkPams( pNew, &pSh->m_pCrsrStk ); @@ -2577,7 +2578,7 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) } } } - } while ( this != (pTmp = static_cast<SwViewShell*>(pTmp->GetNext()) )); + } delete pNew; } |