diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-03-27 09:47:55 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-03-27 09:48:54 +0000 |
commit | 3ca1411772eb74a1cbfb00976f077f804684d9fb (patch) | |
tree | 5ebd8cbe90a8e3b283722b49f3027908aad9ad14 /sc/source | |
parent | More compat stuff (diff) | |
download | core-3ca1411772eb74a1cbfb00976f077f804684d9fb.tar.gz core-3ca1411772eb74a1cbfb00976f077f804684d9fb.zip |
fdo#62155 - don't crash if we can't create an instance of a calc addin.
Change-Id: I478d7777949683a91e7adf9fa6b54e9d01ced676
Diffstat (limited to 'sc/source')
-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 82fd137f7cf5..77f679539248 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -593,11 +593,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 << "'"); + } } } |