diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-05-17 14:09:08 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-06-21 11:34:25 +0200 |
commit | acad0f0c53b788f40b2e8344a1c0fe63333e862e (patch) | |
tree | a767bc46930a6ab9fb9b17d6360a8eeceb4d0deb | |
parent | tdf#147220 sw_redlinehide: update frames in ReplaceRangeImpl() (diff) | |
download | core-acad0f0c53b788f40b2e8344a1c0fe63333e862e.tar.gz core-acad0f0c53b788f40b2e8344a1c0fe63333e862e.zip |
tdf#148461 sw_redlinehide: fix assert in SwContentNode::DelFrames()
The assert(pMerged->pFirstNode->GetIndex() <= i) is intended for when
frames are really deleted, but CheckParaRedlineMerge() calls it while
the now-outdated MergedPara is still on the frame, but the nodes already
have new flags; assign a dummy node in this situation.
Change-Id: I23fbfdb6901e6e15abf92913aa252e59877bc280
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134475
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 6ee57b39ba912f0902714d8c4d1a267511a3c6ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134446
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 6767a309b7c3ddd283a83bcf7dc36fecaf9cc6b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136176
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | sw/source/core/docnode/node.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 955e113f2768..0bf2729cd02c 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1384,6 +1384,12 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) pMerged->pParaPropsNode = pNode->GetTextNode(); break; } + else if (pMerged->pFirstNode->GetIndex() == i) + { // this can only happen when called from CheckParaRedlineMerge() + // and the pMerged will be deleted anyway + pMerged->pParaPropsNode = pMerged->pFirstNode; + break; + } } assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode)); } |