summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();