diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-02 18:59:40 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-06 14:37:17 +0200 |
commit | f8d0f77de20d6adf6f532d13003a96856a98f69b (patch) | |
tree | 15b62fc59046198a4c870b2d9d2f4bc272a6020c /sfx2 | |
parent | fd95dfdbe28d033596d65c517e12ee91e49c8a7c (diff) |
(related: tdf#130685) sw_redlinehide: fix update of pLastNode/pParaPropsNode
If you Select All, Cut then move the cursor around a bit then paste, then this happens:
sw/source/core/text/txtfrm.cxx:3461: void SwTextFrame::CalcAdditionalFirstLineOffset(): Assertion `pTextNode->IsNumbered(getRootFrame()) == pTextNode->IsNumbered(nullptr)' failed.
The reason is this borked MergedPara, which really only has 1 node it's listening on, but pLastNode and pParaPropsNode point to a node that is actually part of a different MergedPara now.
$6 = {
listener = {
m_rToTell = @0x6c02700,
m_vDepends = std::__debug::vector of length 1, capacity 256 = {{
<SwClient> = {
m_pRegisteredIn = 0x6af5f20
},
}}
},
extents = std::__debug::vector of length 0, capacity 0,
mergedText = "",
pParaPropsNode = 0x6d1c390,
pFirstNode = 0x6af5f20,
pLastNode = 0x6d1c390
}
The reason is that SwContentNode::DelFrames() doesn't update these members properly; at the time when it's called for the previous pLastNode, the offending node has Merge::NonFirst set already in the call of CheckParaRedlineMerge() so it sets the wrong new pLastNode.
Fix this by iterating DelFrames() loop backward.
(regression from sw_redlinehide)
Change-Id: I508fd25af385a25ba9ed78d71aa3d1f02a7ac7a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91597
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 520b0e1679d7a97aa3d91cfc95ca647339da7e84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91524
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
0 files changed, 0 insertions, 0 deletions