summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-12-13 08:32:02 +0100
committerMiklos Vajna <vmiklos@collabora.com>2023-12-14 09:45:42 +0100
commit83c300d00d25aa85381d91ed82b236ee8bb37a67 (patch)
tree3f0560768570bc85e3166174fe8614f6c618649f /sc
parent347e8161ba38822de96851dd7ed92b7e85ac1943 (diff)
sw floattable: fix split of anchor text at para start
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/+/160749 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sc')
0 files changed, 0 insertions, 0 deletions