summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-05-04 13:16:32 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-05-11 10:14:19 +0200
commitaa5dc0b48cd4db6883c9b52c68b16170c9c81d1f (patch)
tree7a1bb6161ef3bad60db5c1093a1a5c7d2e9dcec8 /sw/qa/extras/layout
parent356edfa963bd1d1c8e081a012e6a2ccbe7bf53d3 (diff)
tdf#105478 sw layout: treat minHeight as "do not split row"
Already, if minHeight is greater than the content of the row, then the row will "stay intact" and not split just because there is space for part of it on the preceeding page. However, if the content is greater than minHeight, it can split anywhere and moveBwd - since LO 5.3. At least for MS compatibility, this needs to not be split. But others agreed to change this for ODT as well, especially since this matches pre-5.3 behaviour, and will help at design-time for MS interoperability, as well as making minHeight consistent for the two different scenarios. Change-Id: Id15c44da2e7c38f6d552ffe32f92ab1c6b3c3349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93414 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/README2
-rw-r--r--sw/qa/extras/layout/data/tdf105478_rowMinHeight.odtbin0 -> 14550 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx9
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/README b/sw/qa/extras/layout/README
new file mode 100644
index 000000000000..82259fe15215
--- /dev/null
+++ b/sw/qa/extras/layout/README
@@ -0,0 +1,2 @@
+To run tests from this folder, do
+make CppunitTest_sw_layoutwriter CPPUNIT_TEST_NAME=xxxx
diff --git a/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt b/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt
new file mode 100644
index 000000000000..3a7fd600ceee
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index ea6ac4089a0b..27ba1d0a649c 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2799,6 +2799,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTableExtrusion2)
assertXPath(pXmlDoc, sXPath, 0);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf105478)
+{
+ createDoc("tdf105478_rowMinHeight.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ // Minimum row height forces the cell (with table header as row 1) to start on page 2, not page 1.
+ assertXPathContent(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell/txt[1]", "Cell 1");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116848)
{
SwDoc* pDoc = createDoc("tdf116848.odt");