| commit | f4b6ac83a7cd08c5314d3c1a93af845f3996b34a | [log] |
|---|---|---|
| author | Michael Stahl <Michael.Stahl@cib.de> | Fri Jun 19 15:05:42 2020 +0200 |
| committer | Miklos Vajna <vmiklos@collabora.com> | Wed Jun 24 16:28:35 2020 +0200 |
| tree | de14c7778a6c3915fc7ae5f3cb59512aaa1254da | |
| parent | 30d6fa97743d3d79091c582865a3b7cdc470517a [diff] |
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> (cherry picked from commit 088324bbd391c858dd17832708b465eb5b6046e6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96806 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 2feef62..10f4ba6 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx
@@ -661,7 +661,11 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, { pSctNd->NodesArrChgd(); ++nSectNdCnt; bNewFrames = false; // tdf#132326 do not let frames survive in undo nodes if (!GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(rNodes)) { bNewFrames = false; } } } }