summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-18 15:48:28 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-11-19 09:29:17 +0100
commit53f17e2a0f2a113a8b677940a314b5934c49acc3 (patch)
treeae12c2a46bcb75f1536e574c41a0a5af055c42fa
parent728bfa1879da097b65fd39b1e63c52478a913af0 (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>
-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 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 {