summaryrefslogtreecommitdiff
path: root/svx/source/xml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-07 16:01:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-08 16:14:44 +0100
commit07d7a03b950fa20f4f0609d750292fb7f1ecfb3e (patch)
treeae3120b4af83784f85c34f9fc732a4b2f0315166 /svx/source/xml
parent86c6f18c2766aad43d6e3bfcf3530e40440ebca7 (diff)
don't terminate via unhandled exception on loading ooo89328-1.sxc
Change-Id: If266fa0ebaf2c3c0cd54238879a858098066c03d
Diffstat (limited to 'svx/source/xml')
-rw-r--r--svx/source/xml/xmleohlp.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index dee010e38461..70e9a0c262bf 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/XEmbedObjectCreator.hpp>
#include <com/sun/star/embed/XEmbedObjectFactory.hpp>
@@ -29,7 +30,7 @@
#include <com/sun/star/embed/EntryInitModes.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/embed/Aspects.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <tools/debug.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
@@ -605,12 +606,27 @@ void SvXMLEmbeddedObjectHelper::Flush()
}
// XGraphicObjectResolver: alien objects!
-OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL( const OUString& aURL )
+OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUString& rURL)
throw(RuntimeException, std::exception)
{
MutexGuard aGuard( maMutex );
- return ImplInsertEmbeddedObjectURL( aURL );
+ OUString sRet;
+ try
+ {
+ sRet = ImplInsertEmbeddedObjectURL(rURL);
+ }
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception& e)
+ {
+ throw WrappedTargetRuntimeException(
+ "SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL non-RuntimeException",
+ static_cast<uno::XWeak*>(this), uno::makeAny(e));
+ }
+ return sRet;
}
// XNameAccess: alien objects!