[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Sat Dec 9 19:34:18 UTC 2017


 sw/source/filter/html/htmlform.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 95d0281447cb55b6a1bee7ff81f85c06648657cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 8 19:54:43 2017 +0000

    catch exception for disable-database-connectivity case
    
    Change-Id: I39da810c4f44b8bbb7250aad17fb12ce5420a000
    Reviewed-on: https://gerrit.libreoffice.org/46117
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list