diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-09 16:03:44 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-08-13 10:09:12 +0200 |
commit | f3c60c60d03947961d893e23c0e4baf20fb0107b (patch) | |
tree | 429bfbd6375d6dc45e9ff6d8e1af7a43bda62406 /sw/source/core/text/EnhancedPDFExportHelper.cxx | |
parent | df28caa1fc24c6288f4c10854b03612c929ee676 (diff) |
tdf#126627 sw_redlinehide: fix corner case in SwUndoDelete::UndoImpl()
The assumption that the merge by the moved nodes would be sufficient to
handle the end node's frames is wrong: the MakeFrames() uses
FrameMode::New, so the frames on the end node are not deleted, even if a
previous node is merged with the end node, so the end node has 2 frames
in the same layout, which will cause all sorts of problems.
Ensure that the ::MakeFrames() that is called from SwUndoDelete will
*once* use FrameMode::Existing, which will delete the existing frames on
the end node *iff* it is merged. Subsequent SwTextNode::MakeFrames()
calls on the nodes must use FrameMode::New of course, to prevent
deleting the newly created frames immediately.
Hopefully the SwUndoDelete is the only caller of MakeFrames() that will
run into this corner case, as the others typically operate on a
nodes-array section...
(regression from 723728cd358693b8f4bc9d913541aa4479f2bd48)
Reviewed-on: https://gerrit.libreoffice.org/77211
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit f6a7dee56c984f36261c75a1056cc3a5bf43b2f1)
Reviewed-on: https://gerrit.libreoffice.org/77220
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4093811d1327e83edf216639d7b1173d8ebf7165)
Backport needs some tweak to includes to avoid cyclic headers.
Change-Id: I829c1e7a92434f93d56e3c88a4ba4a55bab818d4
Reviewed-on: https://gerrit.libreoffice.org/77340
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/core/text/EnhancedPDFExportHelper.cxx')
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index e4312738c5b2..4ad8d67964a2 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -74,6 +74,7 @@ #include <SwNodeNum.hxx> #include <calbck.hxx> #include <stack> +#include <frmtool.hxx> #include <tools/globname.hxx> #include <svx/svdobj.hxx> |