diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-27 14:27:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-27 12:58:58 +0000 |
commit | d1c346ba848c54424d6ffa88df7a5ff6a3717430 (patch) | |
tree | 60ffde6fe1d369d610229e39a483ac51cc5da516 /sw | |
parent | de243e8e134c8780e54ebe8402a8a930962852fc (diff) |
ODF import: add embedded pdf support
The use-case is to have a .svm and .pdf alternative, need to pick .pdf
from those.
The test fails with any of the below commits reverted:
- the xmloff part of this commit
- fda68426374ed915783fd306c2f56463c757774a (ODT export: add embedded pdf
support, 2016-06-27)
- 878a860dff10bd91491d6c9f2f4e2308bfe4f0b2 (vcl: add initial PDF
import-as-graphic filter, 2016-06-23)
Change-Id: Id5b298d25a46af6ce7aa5f8c71a29c3914e1a7ce
Reviewed-on: https://gerrit.libreoffice.org/26706
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/CppunitTest_sw_odfexport.mk | 41 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/data/embedded-pdf.odt | bin | 0 -> 18148 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 7 |
3 files changed, 8 insertions, 40 deletions
diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk index 3dae6ac59fa8..b9260b328b1a 100644 --- a/sw/CppunitTest_sw_odfexport.mk +++ b/sw/CppunitTest_sw_odfexport.mk @@ -46,46 +46,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sw_odfexport)) $(eval $(call gb_CppunitTest_use_ure,sw_odfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfexport)) -$(eval $(call gb_CppunitTest_use_components,sw_odfexport,\ - basic/util/sb \ - comphelper/util/comphelp \ - configmgr/source/configmgr \ - embeddedobj/util/embobj \ - filter/source/config/cache/filterconfig1 \ - filter/source/storagefilterdetect/storagefd \ - filter/source/odfflatxml/odfflatxml \ - filter/source/xmlfilterdetect/xmlfd \ - filter/source/xmlfilteradaptor/xmlfa \ - framework/util/fwk \ - i18npool/util/i18npool \ - linguistic/source/lng \ - oox/util/oox \ - package/source/xstor/xstor \ - package/util/package2 \ - sax/source/expatwrap/expwrap \ - sfx2/util/sfx \ - starmath/util/sm \ - svl/source/fsstor/fsstorage \ - svtools/util/svt \ - sw/util/sw \ - sw/util/swd \ - toolkit/util/tk \ - ucb/source/core/ucb1 \ - ucb/source/ucp/file/ucpfile1 \ - unotools/util/utl \ - unoxml/source/service/unoxml \ - uui/util/uui \ - writerfilter/util/writerfilter \ - $(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \ - xmloff/util/xo \ - chart2/source/chartcore \ - chart2/source/controller/chartcontroller \ - sc/util/sc \ - sd/util/sd \ - svx/util/svxcore \ - xmloff/source/transform/xof \ - xmlscript/util/xmlscript \ -)) +$(eval $(call gb_CppunitTest_use_rdb,sw_odfexport,services)) $(eval $(call gb_CppunitTest_use_custom_headers,sw_odfexport,\ officecfg/registry \ diff --git a/sw/qa/extras/odfexport/data/embedded-pdf.odt b/sw/qa/extras/odfexport/data/embedded-pdf.odt Binary files differnew file mode 100644 index 000000000000..26d37ee0da45 --- /dev/null +++ b/sw/qa/extras/odfexport/data/embedded-pdf.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 3d805ba9d500..aa384775a1ed 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -809,6 +809,13 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt") getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3"); } +DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt") +{ + uno::Reference<drawing::XShape> xShape = getShape(1); + // This failed, pdf+svm replacement graphics pair didn't survive an ODT roundtrip. + CPPUNIT_ASSERT(!getProperty<OUString>(xShape, "ReplacementGraphicURL").isEmpty()); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |