diff options
-rw-r--r-- | sd/qa/unit/data/odp/tdf128212.pptx | bin | 0 -> 16921 bytes | |||
-rw-r--r-- | sd/qa/unit/layout-tests.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf128212.pptx b/sd/qa/unit/data/odp/tdf128212.pptx Binary files differnew file mode 100644 index 000000000000..52ba8ed0d81a --- /dev/null +++ b/sd/qa/unit/data/odp/tdf128212.pptx diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index 953500dc25a2..5fe1a5a4b6de 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -13,11 +13,13 @@ class SdLayoutTest : public SdModelTestBaseXML public: void testTdf104722(); void testTdf136949(); + void testTdf128212(); CPPUNIT_TEST_SUITE(SdLayoutTest); CPPUNIT_TEST(testTdf104722); CPPUNIT_TEST(testTdf136949); + CPPUNIT_TEST(testTdf128212); CPPUNIT_TEST_SUITE_END(); }; @@ -63,6 +65,26 @@ void SdLayoutTest::testTdf136949() xDocShRef->DoClose(); } +void SdLayoutTest::testTdf128212() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf128212.pptx"), PPTX); + + std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile(); + MetafileXmlDump dumper; + + xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // Without the fix in place, this test would have failed with + // - Expected: 7797 + // - Actual : 12068 + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "x", "4525"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "y", "7797"); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdLayoutTest); CPPUNIT_PLUGIN_IMPLEMENT(); |