diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-07-17 09:00:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-07-17 11:21:32 +0200 |
commit | a4af5432753408c4eea8a8d56c2f48202160c5fe (patch) | |
tree | ddfcdbb2d1fc345b004d7b24e0a387a6b20283b2 /sw/qa/core/text/text.cxx | |
parent | 107ab712725e92fc527b54e91f317f932b78146a (diff) |
tdf#120262 sw floattable, legacy: fix text wrap around fly when no content fits
The bugdoc is created from DOC (so tables are shifted to the left,
slightly) and has 2 floating tables on 2 pages. Writer puts them to a
single page, so they overlap, which is not wanted.
The trouble is that there is some space (but not much) on the right of
the floating table on page 1, and Writer wraps the empty anchor of the
floating table on the right of the floating table, while Word puts it
below the table, so no overlap happens.
Fix the problem by extending the work from commit
8f8b31abd02876c3601e343b8b3274754f8a61b6 (compatibility setting for MS
Word wrapping text in less space (bnc#822908), 2013-08-06), and work
with that limit in SwTextFormatter::CalcFlyWidth(). This way Writer
keeps its behavior that PARALLEL wrap text mode requires no minimal text
width for existing documents, but correctly ~300 twips minimal text
width (Word formats).
The bugdoc still has a footer vs floating table overlap, but at least no
2 floating tables overlap now.
Change-Id: Ib307ede08ead272fe16dca261db615fd8e9c547d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154509
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 5e0c387ad8ac..308098c85699 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: 521 (~500) + // - Expected: 542 (~500) // - Actual : 857 (~1000) // I.e. both upper and lower margin was taken into account. - CPPUNIT_ASSERT_EQUAL(521, nHeight); + CPPUNIT_ASSERT_EQUAL(542, nHeight); } CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) |