summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-18 15:48:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-11-19 13:27:55 +0100
commit61826c1a7c01bfa9766fd1000a66990fff9e759b (patch)
tree176e2092717739e5d6ff0c85e0eab32076aea0fc /sw
parent560f8935c3b9d854128d414753f871fa38c6da2a (diff)
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.stahl@cib.de> (cherry picked from commit 53f17e2a0f2a113a8b677940a314b5934c49acc3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106007 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx7
1 files changed, 5 insertions, 2 deletions
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 {