summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/svg/svgfilter.hxx2
-rw-r--r--filter/source/svg/svgimport.cxx21
2 files changed, 19 insertions, 4 deletions
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 7b68c2b640ed..0435ef78c9b6 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -266,7 +266,7 @@ private:
Link maOldFieldHdl;
- bool implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException);
+ bool implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException, std::exception);
bool implExport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException);
Reference< XWriter > implCreateExportDocumentHandler( const Reference< XOutputStream >& rxOStm );
diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx
index fc32d0f94eec..b803b6d62285 100644
--- a/filter/source/svg/svgimport.cxx
+++ b/filter/source/svg/svgimport.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/xml/XImportFilter.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <unotools/mediadescriptor.hxx>
@@ -45,8 +46,8 @@
using namespace ::com::sun::star;
using namespace ::svgi;
-bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
- throw (RuntimeException)
+bool SVGFilter::implImport(const Sequence< PropertyValue >& rDescriptor)
+ throw (RuntimeException, std::exception)
{
utl::MediaDescriptor aMediaDescriptor(rDescriptor);
uno::Reference<io::XInputStream> xInputStream;
@@ -95,8 +96,22 @@ bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
xImporter->setTargetDocument(mxDstDoc);
+ bool bRet = false;
SVGReader aReader(mxContext, xInputStream, xInternalHandler);
- return aReader.parseAndConvert();
+ try
+ {
+ bRet = aReader.parseAndConvert();
+ }
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception& e)
+ {
+ throw css::lang::WrappedTargetRuntimeException("SVGFilter::implImport non-RuntimeException",
+ static_cast<uno::XWeak*>(this), uno::makeAny(e));
+ }
+ return bRet;
}