summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-06-27 08:57:43 +0200
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-08-30 15:47:49 +0200
commit4f5b896d004af023f210f235aeafa9abc50068d2 (patch)
treefb3cc5c2cffa9064ecf0a2a960f816a27335bba5 /sw/qa/extras/layout
parent47e82cfa883b41e6a43285d78b16d20238f166cf (diff)
tdf#155229 Calculate row height incl. border if 'atLeast' is set
Word includes the width of horizontal borders when calculating row height in case the row height is set as "atLeast" This is now handled via a compat flag for doc/rtf/docx formats. The default for ODF is unspecified, which (sanely) continues to treat the row size of "atLeast" and "fixed" as measuring the same thing. Change-Id: I37778e5cdc6e083e94a17f50bd0b75a291ededcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169611 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/data/tdf155229_row_height_at_least.docxbin0 -> 14360 bytes
-rw-r--r--sw/qa/extras/layout/layout3.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx b/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx
new file mode 100644
index 000000000000..a42031a41f5b
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 2ebac8b4ea17..df1d734debc3 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -3196,6 +3196,19 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf146081)
CPPUNIT_ASSERT_EQUAL(nTotalHeight, nHeight1 * 4);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf155229RowAtLeast)
+{
+ createSwDoc("tdf155229_row_height_at_least.docx");
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nTableHeight
+ = getXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row[11]/infos/bounds"_ostr, "bottom"_ostr)
+ .toInt32();
+
+ // Without the fix, this was Actual : 14174
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(15494), nTableHeight);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf157829LTR)
{
// Verify that line breaking inside a bidi portion triggers underflow to previous bidi portions