summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/layout/data/tdf124796.odtbin0 -> 14342 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx24
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf124796.odt b/sw/qa/extras/layout/data/tdf124796.odt
new file mode 100644
index 000000000000..2a8d2c816ad1
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf124796.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 91705c8e18d9..c17adf1bba92 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2340,6 +2340,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122800)
// This failed, if the textarray length of the first axis label not 22.
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124796)
+{
+ SwDoc* pDoc = createDoc("tdf124796.odt");
+ 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);
+
+ // This failed, if the minimum value of Y axis is not -10.
+ assertXPathContent(
+ pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[5]/text",
+ "-10");
+
+ // This failed, if the maximum value of Y axis is not 15.
+ assertXPathContent(
+ pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[10]/text",
+ "15");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116925)
{
SwDoc* pDoc = createDoc("tdf116925.docx");