diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/data/testTruncatedAxisLabel.odt | bin | 0 -> 13764 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt b/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt Binary files differnew file mode 100644 index 000000000000..f8eb74904102 --- /dev/null +++ b/sw/qa/extras/layout/data/testTruncatedAxisLabel.odt diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 2fcc9f8da6f4..e57b72264ec4 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2416,6 +2416,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122800) // This failed, if the textarray length of the first axis label not 22. } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTruncatedAxisLabel) +{ + SwDoc* pDoc = createDoc("testTruncatedAxisLabel.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); + + // test the X axis label visibility + assertXPathContent( + pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[1]/text", + "Long axis label truncated 1"); + + // test the Y axis label visibility + assertXPathContent( + pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/textarray[3]/text", + "-5.00"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128996) { SwDoc* pDoc = createDoc("tdf128996.docx"); |