summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-10-23 14:50:24 +0200
committerMichael Stahl <mstahl@redhat.com>2012-10-23 15:12:43 +0200
commit48c9586e0797871e519d1cf68aa59bcc4ba02651 (patch)
treec06f2b58aa8b52e99e2839af85cc7f09e116d0ae /sfx2
parent85b6a93cf41fb05e726027e34fcd805330e20414 (diff)
RtfFilter::filter: not allowed to throw WrongFormatException:
throw a WrappedTargetRuntimeException instead :( Change-Id: Iebf2b709beea738ba513ec5ce884874b76fbf243
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objstor.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 3752a51dbcaf..45b1cb28fa37 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/task/FutureDocumentVersionProductUpdateRequest.hpp>
#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
@@ -2222,9 +2223,14 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert )
{
SetError( ERRCODE_IO_BROKENPACKAGE, "Badness in the underlying package format." );
}
- catch (const io::WrongFormatException& rException)
+ catch (const lang::WrappedTargetRuntimeException& rWrapped)
{
- SetError( *new StringErrorInfo( ERRCODE_SFX_FORMAT_ROWCOL, rException.Message, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ), "");
+ io::WrongFormatException e;
+ if (rWrapped.TargetException >>= e)
+ {
+ SetError(*new StringErrorInfo(ERRCODE_SFX_FORMAT_ROWCOL,
+ e.Message, ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ), "");
+ }
}
catch(...)
{}