summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-20 08:41:46 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-06-15 14:42:59 +0200
commit9b5805d1ef2b9e9c4e8f389c069807bf4489ea95 (patch)
treea9bce08fe465561bab47c5a8d22a0ad1690962f3 /sw/qa
parent43bdac0ebd65dfc32a0b8cf2c42fde88ad585e3f (diff)
tdf#128195 Keep spacing below last paragraph in header (docx)
Add a layout compat option to keep the spacing below the last paragraph in the header in doc/docx files Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94577 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/core/layout/data/tdf128195.docxbin0 -> 14883 bytes
-rw-r--r--sw/qa/core/layout/layout.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/core/layout/data/tdf128195.docx b/sw/qa/core/layout/data/tdf128195.docx
new file mode 100644
index 000000000000..16180654ce8d
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf128195.docx
Binary files differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 8a3a3b5369e6..cfc13640c471 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -39,6 +39,17 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTableFlyOverlap)
CPPUNIT_ASSERT_GREATEREQUAL(nFlyBottom, nTableTop);
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf128195)
+{
+ // Load a document that has two paragraphs in the header.
+ // The second paragraph should have its bottom spacing applied.
+ load(DATA_DIRECTORY, "tdf128195.docx");
+ sal_Int32 nTxtHeight = parseDump("//header/txt[2]/infos/bounds", "height").toInt32();
+ sal_Int32 nTxtBottom = parseDump("//header/txt[2]/infos/bounds", "bottom").toInt32();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2269), nTxtHeight);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3529), nTxtBottom);
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBorderCollapseCompat)
{
// Load a document with a border conflict: top cell has a dotted bottom border, bottom cell has