[Libreoffice-commits] core.git: chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import.mk sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_macros_test.mk sd/CppunitTest_sd_filters_test.mk sd/CppunitTest_sd_import_tests.mk sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_htmlexport.mk sw/CppunitTest_sw_ooxmlexport8.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_ww8export.mk sw/ooxmlexport_setup.mk vcl/source
Stephan Bergmann
sbergman at redhat.com
Tue Jul 18 12:24:58 UTC 2017
chart2/CppunitTest_chart2_export.mk | 1 +
chart2/CppunitTest_chart2_import.mk | 1 +
sc/CppunitTest_sc_filters_test.mk | 1 +
sc/CppunitTest_sc_macros_test.mk | 1 +
sd/CppunitTest_sd_filters_test.mk | 1 +
sd/CppunitTest_sd_import_tests.mk | 1 +
sw/CppunitTest_sw_filters_test.mk | 1 +
sw/CppunitTest_sw_htmlexport.mk | 2 ++
sw/CppunitTest_sw_ooxmlexport8.mk | 1 +
sw/CppunitTest_sw_ooxmlimport.mk | 1 +
sw/CppunitTest_sw_rtfimport.mk | 1 +
sw/CppunitTest_sw_ww8export.mk | 1 +
sw/ooxmlexport_setup.mk | 1 +
vcl/source/gdi/vectorgraphicdata.cxx | 33 +++++++++++++--------------------
14 files changed, 27 insertions(+), 20 deletions(-)
New commits:
commit 098b685e901974dc9d0248b6e2fd06644c954e84
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jul 18 14:22:54 2017 +0200
No reason to silently misbehave when these UNO services are missing
...which e.g. made it unnecessarily hard to track down
7a23668e4f4e235c7a4e1c99e38506bd9c874be8 "Fix CppunitTest_cppcanvas_emfplus"
Change-Id: I2f537fabb067b77e82b900bd2cba30fd65c275aa
diff --git a/chart2/CppunitTest_chart2_export.mk b/chart2/CppunitTest_chart2_export.mk
index b9ac9b1c9199..f51ed51d33f2 100644
--- a/chart2/CppunitTest_chart2_export.mk
+++ b/chart2/CppunitTest_chart2_export.mk
@@ -78,6 +78,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_export,\
dtrans/util/mcnttype \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
eventattacher/source/evtatt \
filter/source/config/cache/filterconfig1 \
filter/source/odfflatxml/odfflatxml \
diff --git a/chart2/CppunitTest_chart2_import.mk b/chart2/CppunitTest_chart2_import.mk
index 71dce87a20df..af8619454f8d 100644
--- a/chart2/CppunitTest_chart2_import.mk
+++ b/chart2/CppunitTest_chart2_import.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_import,\
configmgr/source/configmgr \
dtrans/util/mcnttype \
embeddedobj/util/embobj \
+ emfio/emfio \
eventattacher/source/evtatt \
filter/source/config/cache/filterconfig1 \
filter/source/odfflatxml/odfflatxml \
diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk
index 0821f2753a42..3026f841504a 100644
--- a/sc/CppunitTest_sc_filters_test.mk
+++ b/sc/CppunitTest_sc_filters_test.mk
@@ -77,6 +77,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_filters_test,\
connectivity/source/manager/sdbc2 \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
eventattacher/source/evtatt \
filter/source/config/cache/filterconfig1 \
filter/source/xmlfilteradaptor/xmlfa \
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index dd979d6b8486..2232fa3296e1 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\
comphelper/util/comphelp \
configmgr/source/configmgr \
dbaccess/util/dba \
+ emfio/emfio \
eventattacher/source/evtatt \
filter/source/config/cache/filterconfig1 \
filter/source/storagefilterdetect/storagefd \
diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk
index 413cee44438b..fe41918dff0a 100644
--- a/sd/CppunitTest_sd_filters_test.mk
+++ b/sd/CppunitTest_sd_filters_test.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\
configmgr/source/configmgr \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
i18npool/util/i18npool \
diff --git a/sd/CppunitTest_sd_import_tests.mk b/sd/CppunitTest_sd_import_tests.mk
index 61ea93871bd0..7b8ae080c835 100644
--- a/sd/CppunitTest_sd_import_tests.mk
+++ b/sd/CppunitTest_sd_import_tests.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_import_tests,\
dbaccess/util/dba \
desktop/source/deployment/deployment \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/odfflatxml/odfflatxml \
filter/source/svg/svgfilter \
diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk
index b0677f5c3049..3ea529517dce 100644
--- a/sw/CppunitTest_sw_filters_test.mk
+++ b/sw/CppunitTest_sw_filters_test.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\
configmgr/source/configmgr \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/t602/t602filter \
forms/util/frm \
diff --git a/sw/CppunitTest_sw_htmlexport.mk b/sw/CppunitTest_sw_htmlexport.mk
index c9934c5b5bf9..2fe3e02e358a 100644
--- a/sw/CppunitTest_sw_htmlexport.mk
+++ b/sw/CppunitTest_sw_htmlexport.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_htmlexport,\
configmgr/source/configmgr \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/storagefilterdetect/storagefd \
filter/source/textfilterdetect/textfd \
@@ -73,6 +74,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_htmlexport,\
sw/util/msword \
sfx2/util/sfx \
starmath/util/sm \
+ svgio/svgio \
svl/source/fsstor/fsstorage \
svtools/util/svt \
toolkit/util/tk \
diff --git a/sw/CppunitTest_sw_ooxmlexport8.mk b/sw/CppunitTest_sw_ooxmlexport8.mk
index ad5467db30a3..202e4398abc4 100644
--- a/sw/CppunitTest_sw_ooxmlexport8.mk
+++ b/sw/CppunitTest_sw_ooxmlexport8.mk
@@ -69,6 +69,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport8,\
configmgr/source/configmgr \
drawinglayer/drawinglayer \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
forms/util/frm \
framework/util/fwk \
diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk
index 38fb79414a87..112231f62a04 100644
--- a/sw/CppunitTest_sw_ooxmlimport.mk
+++ b/sw/CppunitTest_sw_ooxmlimport.mk
@@ -69,6 +69,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlimport,\
configmgr/source/configmgr \
drawinglayer/drawinglayer \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
forms/util/frm \
framework/util/fwk \
diff --git a/sw/CppunitTest_sw_rtfimport.mk b/sw/CppunitTest_sw_rtfimport.mk
index 15527f1c029d..29d3e1e0b87d 100644
--- a/sw/CppunitTest_sw_rtfimport.mk
+++ b/sw/CppunitTest_sw_rtfimport.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_rtfimport,\
comphelper/util/comphelp \
configmgr/source/configmgr \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/storagefilterdetect/storagefd \
framework/util/fwk \
diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk
index c6429f5419f5..45680deb9231 100644
--- a/sw/CppunitTest_sw_ww8export.mk
+++ b/sw/CppunitTest_sw_ww8export.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ww8export,\
configmgr/source/configmgr \
dbaccess/util/dba \
embeddedobj/util/embobj \
+ emfio/emfio \
filter/source/config/cache/filterconfig1 \
filter/source/storagefilterdetect/storagefd \
forms/util/frm \
diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 3e0c03ae7963..b421d0e1ad4f 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -34,6 +34,7 @@ define sw_ooxmlexport_components
dbaccess/util/dba \
drawinglayer/drawinglayer \
embeddedobj/util/embobj \
+ emfio/emfio \
$(if $(filter WNT,$(OS)), \
$(if $(DISABLE_ATL),, \
embeddedobj/source/msole/emboleobj.windows \
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx
index 84673ba6a547..3bcb8fb7351a 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -158,33 +158,26 @@ void VectorGraphicData::ensureSequenceAndRange()
if(myInputStream.is())
{
// create Vector Graphic Data interpreter
- try
+ uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
+
+ if (VectorGraphicDataType::Emf == getVectorGraphicDataType()
+ || VectorGraphicDataType::Wmf == getVectorGraphicDataType())
{
- uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
+ const uno::Reference< graphic::XEmfParser > xEmfParser = graphic::EmfTools::create(xContext);
+ uno::Sequence< ::beans::PropertyValue > aSequence;
- if (VectorGraphicDataType::Emf == getVectorGraphicDataType()
- || VectorGraphicDataType::Wmf == getVectorGraphicDataType())
+ if (mpExternalHeader)
{
- const uno::Reference< graphic::XEmfParser > xEmfParser = graphic::EmfTools::create(xContext);
- uno::Sequence< ::beans::PropertyValue > aSequence;
-
- if (mpExternalHeader)
- {
- aSequence = mpExternalHeader->getSequence();
- }
-
- maSequence = comphelper::sequenceToContainer<std::deque<css::uno::Reference< css::graphic::XPrimitive2D >>>(xEmfParser->getDecomposition(myInputStream, maPath, aSequence));
+ aSequence = mpExternalHeader->getSequence();
}
- else
- {
- const uno::Reference< graphic::XSvgParser > xSvgParser = graphic::SvgTools::create(xContext);
- maSequence = comphelper::sequenceToContainer<std::deque<css::uno::Reference< css::graphic::XPrimitive2D >>>(xSvgParser->getDecomposition(myInputStream, maPath));
- }
+ maSequence = comphelper::sequenceToContainer<std::deque<css::uno::Reference< css::graphic::XPrimitive2D >>>(xEmfParser->getDecomposition(myInputStream, maPath, aSequence));
}
- catch(const uno::Exception&)
+ else
{
- OSL_ENSURE(false, "Got no graphic::XSvgParser (!)" );
+ const uno::Reference< graphic::XSvgParser > xSvgParser = graphic::SvgTools::create(xContext);
+
+ maSequence = comphelper::sequenceToContainer<std::deque<css::uno::Reference< css::graphic::XPrimitive2D >>>(xSvgParser->getDecomposition(myInputStream, maPath));
}
}
More information about the Libreoffice-commits
mailing list