diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-23 10:51:05 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-08 15:09:24 +0100 |
commit | a25510e8a7fb7736bf530abfe2dba28738b65dde (patch) | |
tree | 1bb02810987c37827dfaa64f9c0a0db9885631f9 /sd | |
parent | cdc7e805aa22d9177afc3d4f5381f2cdcad9ec78 (diff) |
bnc#822341: PPTX export of embedded text documents
-Make embedded text documents exported by analogy with spreadsheet
embedded documents.
-Convert MS ole objects to LO sepcific objecst to allow
exporting those ole objects too.
Plus use gb_CppunitTest_use_rdb instead of wasting time on
finding out which missing components cause test failing.
Especcially when we have platform dependent components
(e.g. related to embedded object)
(cherry picked from commit 0c3d5fb0ad35ff7fc18917fc86fa58d9312fe3ae)
Conflicts:
sd/CppunitTest_sd_export_tests.mk
sd/qa/unit/export-tests.cxx
ERROR: Attribute 'spid' must appear on element 'p:oleObj'.
As pointed out by CppunitTest_sd_export_tests.
(cherry picked from commit 124c33dd1d6bf2040f0153de8c9ecaebe759c3bd)
ERROR: Invalid content was found starting with element 'p:pic'.
Again, as pointed out by CppunitTest_sd_export_tests. Sadly it seems that the
spec and PowerPoint is not in sync here, so just do what makes both happy. This
fixes the --with-export-validation build.
(cherry picked from commit cf15306ccf49da290b391517e2c5dd22a4f1be45)
Change-Id: Ic76d659b51274777a1669c215344a1169ebcba81
Reviewed-on: https://gerrit.libreoffice.org/13601
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 2f7a4c04c0531a74b92546a7b8808d03a51ecd99)
Diffstat (limited to 'sd')
-rw-r--r-- | sd/CppunitTest_sd_import_tests.mk | 41 | ||||
-rw-r--r-- | sd/qa/unit/data/odp/bnc822341.odp | bin | 0 -> 15983 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 46 |
3 files changed, 47 insertions, 40 deletions
diff --git a/sd/CppunitTest_sd_import_tests.mk b/sd/CppunitTest_sd_import_tests.mk index ce8ad634bb57..de043202e073 100644 --- a/sd/CppunitTest_sd_import_tests.mk +++ b/sd/CppunitTest_sd_import_tests.mk @@ -64,46 +64,7 @@ $(eval $(call gb_CppunitTest_use_api,sd_import_tests,\ $(eval $(call gb_CppunitTest_use_ure,sd_import_tests)) -$(eval $(call gb_CppunitTest_use_components,sd_import_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_import_tests,services)) $(eval $(call gb_CppunitTest_use_configuration,sd_import_tests)) 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/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 316740e4de32..68a205ef18a2 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -97,6 +97,9 @@ public: void testFdo79731(); void testBnc904423(); void testShapeLineStyle(); +#if !defined WNT + void testBnc822341(); +#endif CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -132,6 +135,10 @@ public: CPPUNIT_TEST(testFdo79731); CPPUNIT_TEST(testBnc904423); CPPUNIT_TEST(testShapeLineStyle); +#if !defined WNT + CPPUNIT_TEST(testBnc822341); +#endif + CPPUNIT_TEST_SUITE_END(); }; @@ -1244,6 +1251,45 @@ void SdFiltersTest::testShapeLineStyle() xDocShRef->DoClose(); } +#if !defined WNT + +void SdFiltersTest::testBnc822341() +{ + // Check import / export of embedded text document + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/odp/bnc822341.odp")); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + + // Export an LO specific ole object (imported 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 (imported 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(); +} + +#endif + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); |