Kaydet (Commit) 7e730273 authored tarafından Michael Meeks's avatar Michael Meeks

fdo#62155 - band-aid crash from poor addin registration on upgrade

For some sadly unknown reason we get an exception traversing the
calc addins and crashing doesn't seem a great response to that.

Change-Id: I8d1eda7c8bab384817f19a86607c7035e4c3a8ab
üst 0644a206
......@@ -52,19 +52,8 @@
using namespace com::sun::star;
//------------------------------------------------------------------------
#define SC_CALLERPOS_NONE (-1)
#define SCADDINSUPPLIER_SERVICE "com.sun.star.sheet.AddIn"
//------------------------------------------------------------------------
//------------------------------------------------------------------------
ScUnoAddInFuncData::ScUnoAddInFuncData( const ::rtl::OUString& rNam, const ::rtl::OUString& rLoc,
const ::rtl::OUString& rDesc,
sal_uInt16 nCat, const rtl::OString& sHelp,
......@@ -282,8 +271,7 @@ void ScUnoAddInCollection::Initialize()
if ( xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum =
xEnAc->createContentEnumeration(
rtl::OUString(SCADDINSUPPLIER_SERVICE) );
xEnAc->createContentEnumeration( "com.sun.star.sheet.AddIn" );
if ( xEnum.is() )
{
// loop through all AddIns
......@@ -291,6 +279,7 @@ void ScUnoAddInCollection::Initialize()
{
uno::Any aAddInAny = xEnum->nextElement();
try
{
uno::Reference<uno::XInterface> xIntFac;
aAddInAny >>= xIntFac;
......@@ -321,6 +310,8 @@ void ScUnoAddInCollection::Initialize()
}
}
}
} catch ( const uno::Exception& ) {
SAL_WARN ( "sc", "Failed to initialize create instance of sheet.AddIn" );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment