summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-06-19 15:05:42 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-06-19 16:42:08 +0200
commita60dd9ef1361c5925803acaa5292e99277d1faf3 (patch)
tree5ab4fcb2c8030d1ca0afcd26af3561d3a8f977b0 /sw
parent8e4c79472644452431381733a5e4b21f98fcdcf3 (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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/nodes.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index e854f0935861..2486821850c1 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;
+ }
}
}
}