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

New commits:
commit 53f17e2a0f2a113a8b677940a314b5934c49acc3
Author:     Michael Stahl <[email protected]>
AuthorDate: Wed Nov 18 15:48:28 2020 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Nov 19 09:29:17 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 <[email protected]>

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index fdac201aa618..e4cd823d74e0 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3712,8 +3712,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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to