summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-08 19:54:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-09 20:30:44 +0100
commit95d0281447cb55b6a1bee7ff81f85c06648657cc (patch)
treee4995e82f786aa9f7deadd49256f37746e3129ad /sw
parent7459a283b3a08397d28861dbe588c9f5826398d4 (diff)
catch exception for disable-database-connectivity case
Change-Id: I39da810c4f44b8bbb7250aad17fb12ce5420a000 Reviewed-on: https://gerrit.libreoffice.org/46117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlform.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 0857e0ca48e3..b426b844f311 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -60,6 +60,7 @@
#include <com/sun/star/awt/XImageConsumer.hpp>
#include <com/sun/star/awt/ImageStatus.hpp>
#include <com/sun/star/form/XImageProducerSupplier.hpp>
+#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <doc.hxx>
#include <IDocumentLayoutAccess.hxx>
@@ -1299,8 +1300,14 @@ void SwHTMLParser::NewForm( bool bAppend )
if( !rSrvcMgr.is() )
return;
- uno::Reference< XInterface > xInt = rSrvcMgr->createInstance(
- "com.sun.star.form.component.Form" );
+ uno::Reference< XInterface > xInt;
+ try
+ {
+ xInt = rSrvcMgr->createInstance("com.sun.star.form.component.Form");
+ }
+ catch (const css::lang::ServiceNotRegisteredException&)
+ {
+ }
if( !xInt.is() )
return;