diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-04-09 14:12:32 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-09 17:24:21 +0200 |
commit | ed3b44ef622bc87da2425322521c293c2a46a1c5 (patch) | |
tree | fa79f5ea9b2b6479ba915278abdb928f08dc90cc /sd | |
parent | e3d130fbdf061da36b317a5b610eef4b4cc51732 (diff) |
tdf#129372: Add unittest
Change-Id: I2747e1210fd687effb0efcd068b1ffffcc802260
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91969
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf129372.pptx | bin | 0 -> 33865 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf129372.pptx b/sd/qa/unit/data/pptx/tdf129372.pptx Binary files differnew file mode 100644 index 000000000000..ff172c9cdf13 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf129372.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 5c6167485c87..17c0ea5e5dca 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -186,6 +186,7 @@ public: void testTdf127372(); void testTdf127379(); void testTdf98603(); + void testTdf129372(); void testShapeGlowEffect(); void testTdf131554(); @@ -291,6 +292,7 @@ public: CPPUNIT_TEST(testTdf127372); CPPUNIT_TEST(testTdf127379); CPPUNIT_TEST(testTdf98603); + CPPUNIT_TEST(testTdf129372); CPPUNIT_TEST(testShapeGlowEffect); CPPUNIT_TEST(testTdf131554); @@ -2713,6 +2715,18 @@ void SdOOXMLExportTest2::testTdf98603() CPPUNIT_ASSERT_EQUAL(OUString("IL"), aLocale.Country); } +void SdOOXMLExportTest2::testTdf129372() +{ + //Without the fix in place, it would crash at import time + ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf129372.pptx"), PPTX); + xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + const SdrPage *pPage = GetPage( 1, xDocShRef.get() ); + + const SdrObject* pObj = pPage->GetObj(0); + CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr); + CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() ); +} + void SdOOXMLExportTest2::testShapeGlowEffect() { ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-glow-effect.pptx"), PPTX); |