[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Nov 21 16:34:52 UTC 2017
sw/source/filter/xml/xmlimp.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 73644f2d4a6fce978221476e758ed88e294a904d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 21 14:08:22 2017 +0000
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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();
More information about the Libreoffice-commits
mailing list