diff options
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 6f5516d69c1f..e747b1753601 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3351,11 +3351,12 @@ bool SwCursorShell::HasReadonlySel() const SwWrtShell* pWrtSh = GetDoc()->GetDocShell()->GetWrtShell(); if (pWrtSh) { - for(SwPaM& rPaM : GetCursor()->GetRingContainer()) + for(const SwPaM& rPaM : GetCursor()->GetRingContainer()) { - rPaM.Normalize(); - SwNodeIndex aPointIdx(rPaM.GetPoint()->nNode.GetNode()); - SwNodeIndex aMarkIdx(rPaM.GetMark()->nNode.GetNode()); + SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint()); + aPaM.Normalize(); + SwNodeIndex aPointIdx(aPaM.GetPoint()->nNode.GetNode()); + SwNodeIndex aMarkIdx(aPaM.GetMark()->nNode.GetNode()); if (aPointIdx == aMarkIdx) continue; // If any nodes in PaM are folded outline content nodes, then set read-only. |