diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-07-27 16:32:08 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-07-28 09:59:13 +0200 |
commit | 61b6b0f84f20275cee86602dc485585310cf6685 (patch) | |
tree | d8b9dc913f9dc26eabdb9fafcee0083d4912d632 /sw | |
parent | 292a5e719543ec9e6f5fe18fec371302983be038 (diff) |
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.stahl@cib.de>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/undel.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
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 } } } |