sw/source/core/crsr/crsrsh.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 239b4bb27fd8db26e8416045b3015688a8b1b0ae
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Tue Jun 8 16:17:37 2021 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Fri Jun 11 00:25:28 2021 +0200

    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 <rayk...@gmail.com>

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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to