diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/CppunitTest_sd_export_tests.mk | 41 | ||||
-rw-r--r-- | sd/qa/unit/data/odp/bnc822341.odp | bin | 0 -> 15983 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 37 |
3 files changed, 38 insertions, 40 deletions
diff --git a/sd/CppunitTest_sd_export_tests.mk b/sd/CppunitTest_sd_export_tests.mk index a8f3dbfa067b..1c54b95f0c99 100644 --- a/sd/CppunitTest_sd_export_tests.mk +++ b/sd/CppunitTest_sd_export_tests.mk @@ -65,46 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sd_export_tests,\ $(eval $(call gb_CppunitTest_use_ure,sd_export_tests)) $(eval $(call gb_CppunitTest_use_vcl,sd_export_tests)) -$(eval $(call gb_CppunitTest_use_components,sd_export_tests,\ - animations/source/animcore/animcore \ - basic/util/sb \ - chart2/source/chartcore \ - chart2/source/controller/chartcontroller \ - comphelper/util/comphelp \ - configmgr/source/configmgr \ - dbaccess/util/dba \ - desktop/source/deployment/deployment \ - embeddedobj/util/embobj \ - filter/source/config/cache/filterconfig1 \ - filter/source/svg/svgfilter \ - forms/util/frm \ - framework/util/fwk \ - i18npool/util/i18npool \ - linguistic/source/lng \ - oox/util/oox \ - package/source/xstor/xstor \ - package/util/package2 \ - sax/source/expatwrap/expwrap \ - sd/util/sd \ - sd/util/sdfilt \ - sd/util/sdd \ - sfx2/util/sfx \ - sot/util/sot \ - svl/source/fsstor/fsstorage \ - svtools/util/svt \ - toolkit/util/tk \ - ucb/source/core/ucb1 \ - ucb/source/ucp/expand/ucpexpand1 \ - ucb/source/ucp/file/ucpfile1 \ - ucb/source/ucp/package/ucppkg1 \ - ucb/source/ucp/tdoc/ucptdoc1 \ - unotools/util/utl \ - unoxml/source/rdf/unordf \ - unoxml/source/service/unoxml \ - xmloff/util/xo \ - xmlsecurity/util/xsec_fw \ - xmlsecurity/util/xmlsecurity \ -)) +$(eval $(call gb_CppunitTest_use_rdb,sd_export_tests,services)) $(eval $(call gb_CppunitTest_use_custom_headers,sd_export_tests,\ officecfg/registry \ diff --git a/sd/qa/unit/data/odp/bnc822341.odp b/sd/qa/unit/data/odp/bnc822341.odp Binary files differnew file mode 100644 index 000000000000..28fe2f4f4b8b --- /dev/null +++ b/sd/qa/unit/data/odp/bnc822341.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 037f8e51722a..b42532316f92 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -81,6 +81,7 @@ public: void testSwappedOutImageExport(); void testLinkedGraphicRT(); void testImageWithSpecialID(); + void testBnc822341(); CPPUNIT_TEST_SUITE(SdExportTest); CPPUNIT_TEST(testN821567); @@ -100,6 +101,7 @@ public: CPPUNIT_TEST(testSwappedOutImageExport); CPPUNIT_TEST(testLinkedGraphicRT); CPPUNIT_TEST(testImageWithSpecialID); + CPPUNIT_TEST(testBnc822341); CPPUNIT_TEST_SUITE_END(); }; @@ -720,6 +722,41 @@ void SdExportTest::testImageWithSpecialID() } } +void SdExportTest::testBnc822341() +{ + // Check import / export of embedded text document + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/odp/bnc822341.odp"), ODP); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + + // Export an LO specific ole object (exported from an ODP document) + { + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + + const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj(0) ); + CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL); + CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() ); + } + + xDocShRef = saveAndReload( xDocShRef, PPTX ); + + // Export an MS specific ole object (exported from a PPTX document) + { + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + + const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj(0) ); + CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL); + CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() ); + } + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |