summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-03 17:46:49 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-04 01:09:50 +0100
commitff9d42ae8e39e036952e5e0f92c1103d3c0f908c (patch)
tree376407f1bae4c466d5e3737e8e87a797669c21c5 /sw
parenta782a3f3292dfeec40c2bf8c463a8ab913d8e1d7 (diff)
use C++11 iteration
Change-Id: Ib7f4ebc935da3eeff9fa7fe6ae4fc8d1c9226843
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/frmedt/fetab.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 9880be5bf436..35ab82331489 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -106,12 +106,11 @@ void SwFEShell::ParkCursorInTab()
SwPosition aStartPos = *pSwCrsr->GetPoint(), aEndPos = aStartPos;
- SwCursor * pTmpCrsr = (SwCursor *) pSwCrsr;
-
/* Search least and greatest position in current cursor ring.
*/
- do
+ for(SwPaM& rTmpCrsr : pSwCrsr->GetRingContainer())
{
+ SwCursor* pTmpCrsr = static_cast<SwCursor *>(&rTmpCrsr);
const SwPosition * pPt = pTmpCrsr->GetPoint(),
* pMk = pTmpCrsr->GetMark();
@@ -127,9 +126,7 @@ void SwFEShell::ParkCursorInTab()
if (*pMk > aEndPos)
aEndPos = *pMk;
- pTmpCrsr = static_cast<SwCursor *>( pTmpCrsr->GetNext() );
}
- while (pTmpCrsr != pSwCrsr);
KillPams();