sw/source/core/undo/undel.cxx | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-)
New commits: commit 61b6b0f84f20275cee86602dc485585310cf6685 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Jul 27 16:32:08 2020 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Tue Jul 28 09:59:13 2020 +0200 Revert "sw_redlinehide: fix "delete of insert redline"" This reverts commit 51d5de51b21b13e2fac92ec53522a48896fbd3da. Because fix for tdf#132944 will be reverted too. Change-Id: I3b4d5031be0d39435aa39867239db549d2f7b71e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99521 Tested-by: Michael Stahl <michael.st...@cib.de> Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 9a525eb19cbd..cc001373cc37 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -1058,22 +1058,19 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) if (m_bDisableMakeFrames) // tdf#132944 { assert(!m_bDelFullPara); - if (m_nSttNode != m_nEndNode) // never delete start node's frame! + SwTextNode *const pEndNode(aIdx.GetNodes()[m_nEndNode]->GetTextNode()); + SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pEndNode); + for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next()) { - SwTextNode *const pEndNode(aIdx.GetNodes()[m_nEndNode]->GetTextNode()); - SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pEndNode); - for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next()) + o3tl::sorted_vector<SwRootFrame *> layouts; + if (pFrame->getRootFrame()->IsHideRedlines()) { - o3tl::sorted_vector<SwRootFrame *> layouts; - if (pFrame->getRootFrame()->IsHideRedlines()) - { - assert(pFrame->GetTextNodeFirst() == pEndNode); // can't be merged with previous - layouts.insert(pFrame->getRootFrame()); - } - for (SwRootFrame const*const pLayout : layouts) - { - pEndNode->DelFrames(pLayout); // SwUndoRedlineDelete will create it - } + assert(pFrame->GetTextNodeFirst() == pEndNode); // can't be merged with previous + layouts.insert(pFrame->getRootFrame()); + } + for (SwRootFrame const*const pLayout : layouts) + { + pEndNode->DelFrames(pLayout); // SwUndoRedlineDelete will create it } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits