summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-07 18:33:34 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-04-16 17:38:32 +0200
commita56fe34196565e9c59799b11233dae70ce799895 (patch)
treee558b617df0007576f1d4a8cb698f11fb8ddab74
parent8c79a3caa41c233e2a716d9f5bbfe2652d389452 (diff)
tdf#131684 sw_redlinehide: fix SwUndoDelete for entire doc in section
The problem is that in SwUndoDelete::UndoImpl(), at the start there is only one content node with a frame in the layout, and there is a special case with m_nReplaceDummy being set so this SwTextFrame gets deleted by the MoveNodes() call in line 969 that moves it into the newly inserted section. As a result of that, MakeFrames() won't do anything because it can't find an existing frame in the same section. In this case, MoveNodes() should leave the frame alone, as it is beyond the end of the deletion and excluded from MakeFrames() - if it wasn't merged before then it doesn't need action, if it was merged before (in a different document maybe) the RecreateStartTextFrames() ought to fix it. (regression from 723728cd358693b8f4bc9d913541aa4479f2bd48 which disabled immediate creation of frames in Copy_()) Change-Id: Iabe2fb1810b0df898b1f57b3d850c3503c79c5d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91842 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 6c7245e789f973cf6dad03f7008ab3f9d12d350c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91886 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 5e2fc4864a5ed4c8361863ba7fa8e83d1c768638) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92176 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 283f36ab037c78c81392153288a554d486d57c98) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92181 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/undo/undel.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index a53458952594..cf4731cc3421 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -968,7 +968,8 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
SwNodeIndex aMvIdx(rDoc.GetNodes(), nMoveIndex);
SwNodeRange aRg( aPos.nNode, 0, aPos.nNode, 1 );
pMovedNode = &aPos.nNode.GetNode();
- rDoc.GetNodes().MoveNodes(aRg, rDoc.GetNodes(), aMvIdx);
+ // tdf#131684 without deleting frames
+ rDoc.GetNodes().MoveNodes(aRg, rDoc.GetNodes(), aMvIdx, false);
rDoc.GetNodes().Delete( aMvIdx);
}
}