summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-10 18:16:18 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-10 18:17:21 +0100
commited3fc457e1fbdfd2cff808e259d62d1d537a01ce (patch)
tree24414af5ec151f56c9d7dee463049bda95d76d56 /sd/qa/unit
parent2ce06d07bb7682dfe8483a047dfc23a3bf87a079 (diff)
add strict OOXML pptx import test
Change-Id: I2e4f17b7b7ab1e14c5cb0f6ce90e771d7c20a5c8
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/strict_ooxml.pptxbin0 -> 29966 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx16
2 files changed, 16 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/strict_ooxml.pptx
Binary files 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();