[Libreoffice-commits] core.git: sd/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 20 16:02:48 UTC 2020
sd/qa/unit/data/odp/tdf128212.pptx |binary
sd/qa/unit/layout-tests.cxx | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+)
New commits:
commit e36b151a5bfbd8a1e3e65e43ddbc082d5ca77a9c
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Oct 20 13:39:02 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Oct 20 18:02:10 2020 +0200
tdf#128212: sd_layout_tests: Add unittest
Change-Id: I099969143a25db1a580be5057e136cf05721f270
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104560
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sd/qa/unit/data/odp/tdf128212.pptx b/sd/qa/unit/data/odp/tdf128212.pptx
new file mode 100644
index 000000000000..52ba8ed0d81a
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf128212.pptx differ
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();
More information about the Libreoffice-commits
mailing list