diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-03-27 09:47:55 +0000 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-03-27 12:20:19 +0000 |
commit | 54617821cf0fd2fcb0465bf06c9b333331b49838 (patch) | |
tree | 2d6230818ee9c6092ddd6187862a1b2e0ed1aebb | |
parent | 96ef8a7a03c7b098c71f7ce8540fb61d13eaa298 (diff) |
fdo#62155 - don't crash if we can't create an instance of a calc addin.
Change-Id: I478d7777949683a91e7adf9fa6b54e9d01ced676
Reviewed-on: https://gerrit.libreoffice.org/8770
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/core/tool/addincol.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index 2e100964eb93..e1bbb3695a75 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -592,11 +592,19 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData ) { OUString aServiceName = aFullName.copy( 0, nPos ); - uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory(); - uno::Reference<uno::XInterface> xInterface( xServiceFactory->createInstance( aServiceName ) ); + try + { + uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory(); + uno::Reference<uno::XInterface> xInterface( xServiceFactory->createInstance( aServiceName ) ); - if (xInterface.is()) - UpdateFromAddIn( xInterface, aServiceName ); + if (xInterface.is()) + UpdateFromAddIn( xInterface, aServiceName ); + } + catch (const uno::Exception &) + { + SAL_WARN ("sc", "Failed to create addin component '" + << aServiceName << "'"); + } } } |