diff --git a/sd/qa/unit/data/strict_ooxml.pptx b/sd/qa/unit/data/strict_ooxml.pptx new file mode 100644 index 000000000000..534b483ff421 Binary files /dev/null and b/sd/qa/unit/data/strict_ooxml.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 0f5732cdd082..eb3b56d2927b 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -60,6 +60,7 @@ public: void testN821567(); void testFdo68594(); void testFdo72998(); + void testStrictOOXML(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -76,6 +77,7 @@ public: CPPUNIT_TEST(testN821567); CPPUNIT_TEST(testFdo68594); CPPUNIT_TEST(testFdo72998); + CPPUNIT_TEST(testStrictOOXML); CPPUNIT_TEST_SUITE_END(); }; @@ -538,6 +540,20 @@ void SdFiltersTest::testFdo71075() CPPUNIT_ASSERT_MESSAGE( "Invalid Series count", aValues.getConstArray()[i] == values[i]); } +void SdFiltersTest::testStrictOOXML() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/strict_ooxml.pptx")); + CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() ); + CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW ); + CPPUNIT_ASSERT_MESSAGE( "failed to load shape", xShape.is() ); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT();