summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-07-27 18:11:30 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-07-28 10:57:43 +0200
commitc363568fcedb6b7b425b735614db0600a0362ead (patch)
tree97ab24b13fe373a226b84254c3cef040e99f4832 /sw
parent4c9b292bb4ff3ad516dad37e2e0dd0ac8bbb4aa0 (diff)
tdf#133967 sw_redlinehide: delete existing MergedPara before
... creating new one in RecreateStartTextFrames(). This was causing a problem with duplicate call of AddToListRLHidden() on a node that was already added by the existing MergedPara; logically the add would need to be reverted when the existing MergedPara dies, but there's no count on it, so the safe way to fix this is to delete existing MergedPara first. This was on node 1083 in the bugdoc. Change-Id: I1fec613829b3b12e3846fc4b195559d9a6079560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99523 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/frmtool.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index cfdd37e69d27..f7ba92aa4130 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1379,6 +1379,8 @@ void RecreateStartTextFrames(SwTextNode & rNode)
? *pFrame->GetMergedPara()->pFirstNode
: rNode);
assert(rFirstNode.GetIndex() <= rNode.GetIndex());
+ // clear old one first to avoid DelFrames confusing updates & asserts...
+ pFrame->SetMergedPara(nullptr);
pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
*pFrame, rFirstNode, eMode));
eMode = sw::FrameMode::New; // Existing is not idempotent!