diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/data/tdf132956.docx | bin | 0 -> 25937 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 20 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/data/tdf132956.docx b/sw/qa/extras/layout/data/tdf132956.docx Binary files differnew file mode 100644 index 000000000000..6e3852b38c5c --- /dev/null +++ b/sw/qa/extras/layout/data/tdf132956.docx diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index ffca9624cdbb..a7d2c198f096 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2371,7 +2371,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf115630) "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/push[3]/polyline[1]/point[2]", "x") .toInt32(); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2886), nXRight - nXLeft); + CPPUNIT_ASSERT_DOUBLES_EQUAL(2895, nXRight - nXLeft, 50); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf108021) @@ -2604,7 +2604,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf129095) xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); CPPUNIT_ASSERT(pXmlDoc); - // check the inner chart area visibility with testing the X axis label + // check the inner chart area (relative size) visibility with testing the X axis label + assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray/text", + "Category 1"); +} + +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf132956) +{ + SwDoc* pDoc = createDoc("tdf132956.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); + + // check the inner chart area (default size) visibility with testing the X axis label assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray/text", "Category 1"); } |