summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r--sw/qa/extras/layout/data/tdf134676.docxbin0 -> 27317 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134676.docx b/sw/qa/extras/layout/data/tdf134676.docx
new file mode 100644
index 000000000000..2a7651dee32f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134676.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 0228cae06346..fae3e8f7dfd6 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2772,6 +2772,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134235)
assertXPath(pXmlDoc, "//textarray", 14);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134676)
+{
+ SwDoc* pDoc = createDoc("tdf134676.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);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 14
+ // - Actual : 13
+ // i.e. the X axis title didn't break to multiple lines.
+ assertXPath(pXmlDoc, "//textarray", 14);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134146)
{
SwDoc* pDoc = createDoc("tdf134146.docx");