Kaydet (Commit) d1c346ba authored tarafından Miklos Vajna's avatar Miklos Vajna

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
- fda68426 (ODT export: add embedded pdf
support, 2016-06-27)
- 878a860d (vcl: add initial PDF
import-as-graphic filter, 2016-06-23)

Change-Id: Id5b298d25a46af6ce7aa5f8c71a29c3914e1a7ce
Reviewed-on: https://gerrit.libreoffice.org/26706Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst de243e8e
...@@ -46,46 +46,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sw_odfexport)) ...@@ -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_ure,sw_odfexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_odfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfexport))
$(eval $(call gb_CppunitTest_use_components,sw_odfexport,\ $(eval $(call gb_CppunitTest_use_rdb,sw_odfexport,services))
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_custom_headers,sw_odfexport,\ $(eval $(call gb_CppunitTest_use_custom_headers,sw_odfexport,\
officecfg/registry \ officecfg/registry \
......
...@@ -809,6 +809,13 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt") ...@@ -809,6 +809,13 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3"); 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 #endif
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -59,10 +59,14 @@ namespace ...@@ -59,10 +59,14 @@ namespace
{ {
return 1020; return 1020;
} }
if(rString.endsWith(".svg")) if(rString.endsWith(".pdf"))
{ {
return 1030; return 1030;
} }
if(rString.endsWith(".svg"))
{
return 1040;
}
return nRetval; return nRetval;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment