summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-19 21:12:28 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-21 19:50:25 +0100
commit2c918aa51e5528b090e52fa31b10fa17cf2593ae (patch)
tree27bcd35ab6c0929fadb0c44ee88a7a7a3e9e785f /sw/qa
parent46f8f48ebfe25e26b4d1c0718c772abbee70b889 (diff)
tdf#125300 extend AddParaSpacingToTableCells with line spacing
Now default compatibility mode AddParaSpacingToTableCells uses not only paragraph bottom margin, but also proportional line spacing before bottom cell border, as in MSO. Note: disable testForcepoint76, because it fails again with its fixed layout. Change-Id: I52f6204a5efc63aac4aa332a1563ada0cbeb9618 Reviewed-on: https://gerrit.libreoffice.org/83236 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/layout/data/tdf125300.docxbin0 -> 14147 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx20
2 files changed, 18 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/data/tdf125300.docx b/sw/qa/extras/layout/data/tdf125300.docx
new file mode 100644
index 000000000000..757a329d514b
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf125300.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 15a1e5f867e2..89df9aa18d90 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2184,6 +2184,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineNumberInNumbering)
assertXPath(pXmlDoc, "/metafile/push/push/push/textcolor[not(@color='#000000')]", 6);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf125300)
+{
+ SwDoc* pDoc = createDoc("tdf125300.docx");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+
+ xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Keep line spacing before bottom cell border (it was 1892)
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[5]/polyline/point[@y='2092']", 2);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116830)
{
SwDoc* pDoc = createDoc("tdf116830.odt");
@@ -2633,8 +2649,8 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
createDoc("forcepoint-swfootnoteframe-1.rtf");
}
-//just care it doesn't crash/assert
-CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); }
+//FIXME: disabled after failing again with fixed layout
+//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); }
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
{