Kaydet (Commit) 098b685e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

No reason to silently misbehave when these UNO services are missing

...which e.g. made it unnecessarily hard to track down
7a23668e "Fix CppunitTest_cppcanvas_emfplus"

Change-Id: I2f537fabb067b77e82b900bd2cba30fd65c275aa
üst 6959aff4
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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));
}
}
......
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