summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/frmedt/fews.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 16aa9bd09367..8b0aa5304a34 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -507,9 +507,9 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt)
else
{
// Sort text nothing else
- FOREACHPAM_START(GetCrsr())
-
- SwPaM* pPam = PCURCRSR;
+ for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
+ {
+ SwPaM* pPam = &rPaM;
SwPosition* pStart = pPam->Start();
SwPosition* pEnd = pPam->End();
@@ -534,8 +534,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt)
pPam->GetPoint()->nNode += nOffset;
pCNd = pPam->GetCntntNode();
pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
-
- FOREACHPAM_END()
+ }
}
EndAllAction();