Kaydet (Commit) e110726b authored tarafından Caolán McNamara's avatar Caolán McNamara

don't terminate via unhandled exception on loading rhbz1013280-2.ppt

Change-Id: Ie2bff125f6839d99280d441b823eb6e0a712844d
üst 24d20bce
...@@ -266,7 +266,7 @@ private: ...@@ -266,7 +266,7 @@ private:
Link maOldFieldHdl; 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); bool implExport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException);
Reference< XWriter > implCreateExportDocumentHandler( const Reference< XOutputStream >& rxOStm ); Reference< XWriter > implCreateExportDocumentHandler( const Reference< XOutputStream >& rxOStm );
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <com/sun/star/xml/XImportFilter.hpp> #include <com/sun/star/xml/XImportFilter.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/task/XStatusIndicator.hpp>
#include <unotools/mediadescriptor.hxx> #include <unotools/mediadescriptor.hxx>
...@@ -45,8 +46,8 @@ ...@@ -45,8 +46,8 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::svgi; using namespace ::svgi;
bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) bool SVGFilter::implImport(const Sequence< PropertyValue >& rDescriptor)
throw (RuntimeException) throw (RuntimeException, std::exception)
{ {
utl::MediaDescriptor aMediaDescriptor(rDescriptor); utl::MediaDescriptor aMediaDescriptor(rDescriptor);
uno::Reference<io::XInputStream> xInputStream; uno::Reference<io::XInputStream> xInputStream;
...@@ -95,8 +96,22 @@ bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) ...@@ -95,8 +96,22 @@ bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY); uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
xImporter->setTargetDocument(mxDstDoc); xImporter->setTargetDocument(mxDstDoc);
bool bRet = false;
SVGReader aReader(mxContext, xInputStream, xInternalHandler); 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;
} }
......
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