fdo#62155 - don't crash if we can't create an instance of a calc addin.

Change-Id: I478d7777949683a91e7adf9fa6b54e9d01ced676
This commit is contained in:
Michael Meeks
2014-03-27 09:47:55 +00:00
parent 26f6ff0829
commit 3ca1411772

View File

@@ -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 << "'");
}
}
}