From ff9d42ae8e39e036952e5e0f92c1103d3c0f908c Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Wed, 3 Dec 2014 17:46:49 +0100 Subject: use C++11 iteration Change-Id: Ib7f4ebc935da3eeff9fa7fe6ae4fc8d1c9226843 --- sw/source/core/frmedt/fetab.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sw') 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(&rTmpCrsr); const SwPosition * pPt = pTmpCrsr->GetPoint(), * pMk = pTmpCrsr->GetMark(); @@ -127,9 +126,7 @@ void SwFEShell::ParkCursorInTab() if (*pMk > aEndPos) aEndPos = *pMk; - pTmpCrsr = static_cast( pTmpCrsr->GetNext() ); } - while (pTmpCrsr != pSwCrsr); KillPams(); -- cgit