tdf#132326 sw_redlinehide: no frames allowed in Undo SwNodesArray
commita1b85912e65f51d09c3acdf84bc60d7c8d3da8b0
authorMichael Stahl <Michael.Stahl@cib.de>
Fri, 19 Jun 2020 13:05:42 +0000 (19 15:05 +0200)
committerAndras Timar <andras.timar@collabora.com>
Mon, 22 Jun 2020 06:51:58 +0000 (22 08:51 +0200)
tree216501ecd5a0e92c3806a80272323433ee7ffcb3
parent23254226c22f66ef03bc05769b94c7345c3547dc
tdf#132326 sw_redlinehide: no frames allowed in Undo SwNodesArray

This crashes in SwAccessibleParagraph::GetRealHeadingLevel(); the a11y
should have been disposed earlier because the node it's connected to is
in the Undo SwNodesArray.

When SwUndoDelete::SwUndoDelete() calls SwNodes::MoveNodes(), all
existing frames must be destroyed; the MoveNodes() would reset its flag
temporarily inside a section, to delay creating the frames inside the
section when moving to the live SwNodesArray, but this also prevents
the deletion when moving in the other direction.

(crash is regression from 723728cd358693b8f4bc9d913541aa4479f2bd48)

Change-Id: I13719bf98ea96b8d68db3ee78cf7f4b61a99e7e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96734
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit a60dd9ef1361c5925803acaa5292e99277d1faf3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96701
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
sw/source/core/docnode/nodes.cxx