[Libreoffice-commits] core.git: sc/source
Michael Meeks
michael.meeks at suse.com
Fri Apr 5 07:28:43 PDT 2013
sc/source/core/tool/addincol.cxx | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
New commits:
commit 7e7302730454aa417f2711024e3a5d9d953add67
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Apr 5 15:21:33 2013 +0100
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
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 8ab6e75..adf388e 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -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" );
}
}
}
More information about the Libreoffice-commits
mailing list