diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-03 18:47:46 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-04 01:09:57 +0100 |
commit | 723753385dfb7c31835427fef4db8bc8df7d78dd (patch) | |
tree | ba5cf3b22c21846b36a17d8f89ad8e1676ad90c7 | |
parent | 001180222a995b2b76900d1de9ddf3c844037edc (diff) |
use C++11 iteration
Change-Id: I0e2279ebe223d17b2ee2f337faaa69cee956e1c6
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 49d460000dbc..9cc2e34d48b4 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -351,11 +351,10 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, static const sal_uLong nMaxLookup = 1000; SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() ); SfxItemSet *pSet = &rSet; - SwPaM *pCurrent = & rPam; - do + for(SwPaM& rCurrent : rPam.GetRingContainer()) { - SwPosition const & rStart( *pCurrent->Start() ); - SwPosition const & rEnd( *pCurrent->End() ); + SwPosition const & rStart( *rCurrent.Start() ); + SwPosition const & rEnd( *rCurrent.End() ); const sal_uLong nSttNd = rStart.nNode.GetIndex(); const sal_uLong nEndNd = rEnd .nNode.GetIndex(); @@ -407,8 +406,7 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, aSet.ClearItem(); } } - pCurrent= static_cast<SwPaM *>(pCurrent->GetNext()); - } while ( pCurrent != &rPam ); + } } class SwXParagraphEnumeration::Impl |