fdo#62155 - don't crash if we can't create an instance of a calc addin.
Change-Id: I478d7777949683a91e7adf9fa6b54e9d01ced676
This commit is contained in:
@@ -593,12 +593,20 @@ void ScUnoAddInCollection::LoadComponent( const ScUnoAddInFuncData& rFuncData )
|
|||||||
{
|
{
|
||||||
OUString aServiceName = aFullName.copy( 0, nPos );
|
OUString aServiceName = aFullName.copy( 0, nPos );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory();
|
uno::Reference<lang::XMultiServiceFactory> xServiceFactory = comphelper::getProcessServiceFactory();
|
||||||
uno::Reference<uno::XInterface> xInterface( xServiceFactory->createInstance( aServiceName ) );
|
uno::Reference<uno::XInterface> xInterface( xServiceFactory->createInstance( aServiceName ) );
|
||||||
|
|
||||||
if (xInterface.is())
|
if (xInterface.is())
|
||||||
UpdateFromAddIn( xInterface, aServiceName );
|
UpdateFromAddIn( xInterface, aServiceName );
|
||||||
}
|
}
|
||||||
|
catch (const uno::Exception &)
|
||||||
|
{
|
||||||
|
SAL_WARN ("sc", "Failed to create addin component '"
|
||||||
|
<< aServiceName << "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScUnoAddInCollection::GetExcelName( const OUString& rCalcName,
|
bool ScUnoAddInCollection::GetExcelName( const OUString& rCalcName,
|
||||||
|
Reference in New Issue
Block a user