[Libreoffice-commits] core.git: sw/CppunitTest_sw_odfexport.mk sw/qa xmloff/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Jun 27 12:59:30 UTC 2016
sw/CppunitTest_sw_odfexport.mk | 41 ---------------------------
sw/qa/extras/odfexport/data/embedded-pdf.odt |binary
sw/qa/extras/odfexport/odfexport.cxx | 7 ++++
xmloff/source/core/xmlmultiimagehelper.cxx | 6 +++
4 files changed, 13 insertions(+), 41 deletions(-)
New commits:
commit d1c346ba848c54424d6ffa88df7a5ff6a3717430
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jun 27 14:27:25 2016 +0200
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 at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk
index 3dae6ac..b9260b3 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
new file mode 100644
index 0000000..26d37ee
Binary files /dev/null and b/sw/qa/extras/odfexport/data/embedded-pdf.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 3d805ba..aa38477 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();
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index e7eeb62..7df84c0 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -59,10 +59,14 @@ namespace
{
return 1020;
}
- if(rString.endsWith(".svg"))
+ if(rString.endsWith(".pdf"))
{
return 1030;
}
+ if(rString.endsWith(".svg"))
+ {
+ return 1040;
+ }
return nRetval;
}
More information about the Libreoffice-commits
mailing list