sw/source/core/txtnode/ndtxt.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 61826c1a7c01bfa9766fd1000a66990fff9e759b
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Nov 18 15:48:28 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Nov 19 13:27:55 2020 +0100

    sw_redlinehide: fix assert on Replace with nothing
    
    SwTextNode::ReplaceText() doesn't need to notify in that case, avoids
    assert in UpdateMergedParaForInsert(), seen in
    testDateFormFieldContentOperations.
    
    Change-Id: Ie80c14bc903d91a289f470f8a732932342a283be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106062
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 53f17e2a0f2a113a8b677940a314b5934c49acc3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106007
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index fc0a965fe943..62b8171387b5 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3719,8 +3719,11 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, 
const sal_Int32 nDelLen,
     SwDelText aDelHint( nStartPos, nDelLen );
     NotifyClients( nullptr, &aDelHint );
 
-    SwInsText aHint( nStartPos, sInserted.getLength() );
-    NotifyClients( nullptr, &aHint );
+    if (sInserted.getLength())
+    {
+        SwInsText aHint( nStartPos, sInserted.getLength() );
+        NotifyClients( nullptr, &aHint );
+    }
 }
 
 namespace {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to