summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/provider.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index de7a2dff928c..b70fd5ef4a4e 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -47,6 +47,7 @@
#include <vcl/dibtools.hxx>
#include <comphelper/sequence.hxx>
#include <memory>
+#include <svtools/ehdl.hxx>
using namespace com::sun::star;
@@ -418,8 +419,9 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
if ( nExtMapMode > 0 )
pExtHeader = &aExtHeader;
- if( ( rFilter.ImportGraphic( aVCLGraphic, aPath, *pIStm,
- GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader ) == ERRCODE_NONE ) &&
+ ErrCode error = rFilter.ImportGraphic( aVCLGraphic, aPath, *pIStm,
+ GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader );
+ if( (error == ERRCODE_NONE ) &&
( aVCLGraphic.GetType() != GraphicType::NONE ) )
{
::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
@@ -427,6 +429,9 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
pUnoGraphic->init( aVCLGraphic );
xRet = pUnoGraphic;
}
+ else{
+ SAL_WARN("svtools", "Could not create graphic: " << error);
+ }
}
}