diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-12-13 08:32:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-14 10:21:53 +0100 |
commit | f6f27ac1ef6d0fcc895bd5ff5f36c5857eb37109 (patch) | |
tree | 17aa5850f7c13cb10ae21900588cc2871eb0aafa /xmlreader | |
parent | 9a946645c8029bc6382d8e455b76430d4e4bc37f (diff) |
sw floattable: fix split of anchor text at para start
cp-23.05.6-3
The document has a floating table with some anchor text. If we hit enter
at the end of the anchor text, the anchor text remains in the old text
node and a new text node is inserted after it, still wrapping around the
floating table. If you do the same at the start of the anchor text, then
a new paragraph is inserted before the floating table, which is
unexpected.
The OOXML concept we try to model here is that a floating table is a
table-in-fly that's followed by a paragraph that hosts the anchor text,
so the anchor position of the floating table should never change. This
behavior was even locked down in the testSplitFlyMoveMaster testcase,
but there the motivation was to make sure the fly chain is consistent.
Fix the problem by removing the special-casing in
SwTextNode::SplitContentNode() for the "at para start" case that was
added just to please the testcase. Instead update the test assert the
bad 1 -> 4 -> 2 chain is not there, so it still covers the old fix but
allows the new behavior.
With this, the Word and Writer UI behaves the same when inserting a new
para right after a floating table. The layout position problem of the
empty text node (should be wrapped, is not) still needs fixing.
(cherry picked from commit d852e27ed205c1a60de0979b80f3861bf93c44ae)
Change-Id: Ib9a1f07eeb144ea929183cdc72a22bc23042fee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160756
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'xmlreader')
0 files changed, 0 insertions, 0 deletions