summaryrefslogtreecommitdiffstats
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r--sd/qa/unit/import-tests.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 73da840273d3..0906464057b5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -24,10 +24,12 @@ class SdFiltersTest : public SdModelTestBase
{
public:
void testDocumentLayout();
+ void testSmoketest();
void testN759180();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
+ CPPUNIT_TEST(testSmoketest);
CPPUNIT_TEST(testN759180);
CPPUNIT_TEST_SUITE_END();
};
@@ -51,6 +53,35 @@ void SdFiltersTest::testDocumentLayout()
}
}
+void SdFiltersTest::testSmoketest()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/smoketest.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 );
+
+ // cf. SdrModel svx/svdmodel.hxx ...
+
+ CPPUNIT_ASSERT_MESSAGE( "wrong page count", pDoc->GetPageCount() == 3);
+
+ const SdrPage *pPage = pDoc->GetPage (1);
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+ sal_uIntPtr nObjs = pPage->GetObjCount();
+ for (sal_uIntPtr i = 0; i < nObjs; i++)
+ {
+ SdrObject *pObj = pPage->GetObj(i);
+ SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
+ SdrTextObj *pTxt = dynamic_cast<SdrTextObj *>( pObj );
+ (void)pTxt; (void)eKind;
+ }
+
+ CPPUNIT_ASSERT_MESSAGE( "changed", !pDoc->IsChanged() );
+ xDocShRef->DoClose();
+}
+
void SdFiltersTest::testN759180()
{
::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/n759180.pptx"));