summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimp.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-21 14:08:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-21 17:34:24 +0100
commit73644f2d4a6fce978221476e758ed88e294a904d (patch)
treebccfd1e4c8ddf8cc2c74611e30e91f99190f69bf /sw/source/filter/xml/xmlimp.cxx
parent6e3f7cd2d5b4f29987a266de0c897a750e891e6c (diff)
don't abort on expected exception
oxymoronic I know Change-Id: Ie51c3e8995c53eaaac0a3a4f6e3582c7b38da823 Reviewed-on: https://gerrit.libreoffice.org/45041 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r--sw/source/filter/xml/xmlimp.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d18deaf90bf2..2a698430dec8 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextRange.hpp>
@@ -1625,7 +1626,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOCX(SvStream &rStream)
//setting a property will inform the document its modified, which attempts
//to update the properties, which throws cause the properties are uninitialized
xDocSh->SetLoading(SfxLoadedFlags::NONE);
- bool ret = xFilter->filter(aArgs);
+ bool ret = false;
+ try
+ {
+ ret = xFilter->filter(aArgs);
+ }
+ catch (const css::lang::WrappedTargetRuntimeException&)
+ {
+ }
xDocSh->SetLoading(SfxLoadedFlags::ALL);
xDocSh->DoClose();