From 95d0281447cb55b6a1bee7ff81f85c06648657cc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 8 Dec 2017 19:54:43 +0000 Subject: catch exception for disable-database-connectivity case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I39da810c4f44b8bbb7250aad17fb12ce5420a000 Reviewed-on: https://gerrit.libreoffice.org/46117 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/filter/html/htmlform.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sw') 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 #include #include +#include #include #include #include @@ -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; -- cgit