diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-10-10 08:23:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-10-10 09:29:37 +0200 |
commit | 4a5fb05d5e2448453477ce14862a8cf9846ecb49 (patch) | |
tree | 8ed5fa79502d4f00d9ef920bf943fe7592f34df5 /sw/qa/core/text/text.cxx | |
parent | 556b095dfb99c5db92328a63ffa30f07d8840db2 (diff) |
tdf#157571 sw floattable: fix incorrect blank space after table-in-shape
Regression from a4af5432753408c4eea8a8d56c2f48202160c5fe (tdf#120262 sw
floattable, legacy: fix text wrap around fly when no content fits,
2023-07-17), the bugdoc has a shape which contains a table, and lots of
empty paragraphs next to it wrap around the shape. Writer didn't wrap
these empty paragraphs, so some of the page 1 content was shifted to
page 2.
What happened here is that in case there is a really small space for the
wrapping text around a floating object, then Word has some minimal
limit. If the available horizontal space is smaller than the limit, we
don't even try to wrap, even if the content (an empty paragraph) would
fit. It was assumed that this limit is the shape for normal anchored
objects and floating tables, but the two bugdocs show that there are two
different limits here.
Fix the problem by going back to MINLAY as the default limit where we
start wrapping, and only increase that to TEXT_MIN_SMALL when wrapping
around floating tables. That fixes the bugdoc and keeps the older
floating table use-case working as well.
This also allows reverting changes to testParaUpperMarginFlyIntersect,
to assert the non-floating-table case again.
Change-Id: I8f8a776c6ad5bdfa0ee4f197b600463fef6431f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157743
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r-- | sw/qa/core/text/text.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 16aa73cd9823..8a48b75a03e4 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1419,10 +1419,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect) nHeight += getXPath(pXmlDoc, xPath, "height").toInt32(); } // Without the accompanying fix in place, this test would have failed with: - // - Expected: 542 (~500) + // - Expected: 521 (~500) // - Actual : 857 (~1000) // I.e. both upper and lower margin was taken into account. - CPPUNIT_ASSERT_EQUAL(542, nHeight); + CPPUNIT_ASSERT_EQUAL(521, nHeight); } CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) |