summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-06-08 16:17:37 -0800
committerJim Raykowski <raykowj@gmail.com>2021-06-11 00:25:28 +0200
commit239b4bb27fd8db26e8416045b3015688a8b1b0ae (patch)
tree71e9574d8b0d0cf7f80fc2cf8bf49f97b2ba36a4 /sw/source
parentb0712101351b084e5073d41052a0abc4f36f4789 (diff)
Resolves tdf#142651 Writer: Next Change stopped working
by normalizing copy of PaM instead of reference Change-Id: If2c8664de18eb9473151c5961ad7654932ca37e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116875 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx9
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.