[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-6' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 27 07:59:09 UTC 2020


 sw/source/core/doc/DocumentContentOperationsManager.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b9fd13d94d9de1ad2386fc695954dc9a68cbde27
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jul 21 17:30:55 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Jul 27 09:58:37 2020 +0200

    tdf#132911 sw_redlinehide: fix assert in CopyImplImpl()
    
    With Ctrl+A, Ctrl+X, Ctrl+V we get the  bAfterTable = true case;
    line 4722 does pCopyPam->GetPoint()->nNode-- and then line 5085 does
    pCopyPam->GetPoint()->nNode++ but the problem is that nContent still
    points to the same node as initially while the node after the table end
    node is now a different one, i.e. nNode and nContent point to different
    nodes and something in redlining asserts becuase of that with
    "Assertion `m_pIndexReg == rIndex.m_pIndexReg' failed."; we don't get
    to step 4 anyway.
    
    (reportedly something changed with commit
    4532845e22c10f252840887e55002307227b2390 but it's a mystery what that
    would be)
    
    Change-Id: I23744fad543e1e7bfcc11c4b488d4469ba9e509c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99166
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 14bdbc36f0cf3913f6de10c746044b6aadf37095)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99194
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    (cherry picked from commit 30bab6ff42297c9d7759d31e11e814bcb5d38cee)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99196
    Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 33b7e5fe8f27..f834b8817492 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -5078,10 +5078,10 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
         pCopyPam->Move( fnMoveForward, bCanMoveBack ? GoInContent : GoInNode );
     else
     {
-        // Reset the offset to 0 as it was before the insertion
-        pCopyPam->GetPoint()->nContent = 0;
-
         pCopyPam->GetPoint()->nNode++;
+
+        // Reset the offset to 0 as it was before the insertion
+        pCopyPam->GetPoint()->nContent.Assign(pCopyPam->GetPoint()->nNode.GetNode().GetContentNode(), 0);
         // If the next node is a start node, then step back: the start node
         // has been copied and needs to be in the selection for the undo
         if (pCopyPam->GetPoint()->nNode.GetNode().IsStartNode())


More information about the Libreoffice-commits mailing list