[Libreoffice-commits] core.git: sw/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 22:28:14 UTC 2021


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

New commits:
commit 239b4bb27fd8db26e8416045b3015688a8b1b0ae
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Jun 8 16:17:37 2021 -0800
Commit:     Jim Raykowski <raykowj at 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 <raykowj at 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.


More information about the Libreoffice-commits mailing list