summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-03 10:16:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-03 12:49:39 +0100
commit6fb1f934d79fd04bc3ca36b446adad0b126e6b1c (patch)
tree6edb205008437cd69c9d28710e8173d2c699af12
parentf9ac8942478221569740c32f35e1e0509f8fb95f (diff)
coverity#707193 Uncaught exception
Change-Id: Ie3e6bc593365311bfe80972b26d1189acbb6afcb
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx5
-rw-r--r--oovbaapi/ooo/vba/XCollection.idl4
2 files changed, 7 insertions, 2 deletions
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index 90d876bde6e5..a0b90414786d 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -279,13 +279,15 @@ protected:
public:
ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, bool bIgnoreCase = false ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ), mbIgnoreCase( bIgnoreCase ) { m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
+
//XCollection
virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
{
return m_xIndexAccess->getCount();
}
- virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+ virtual css::uno::Any SAL_CALL Item(const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/)
+ throw (css::lang::IndexOutOfBoundsException, css::script::BasicErrorException, css::uno::RuntimeException)
{
if ( Index1.getValueTypeClass() != css::uno::TypeClass_STRING )
{
@@ -302,6 +304,7 @@ public:
Index1 >>= aStringSheet;
return getItemByStringIndex( aStringSheet );
}
+
// XDefaultMethod
OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException)
{
diff --git a/oovbaapi/ooo/vba/XCollection.idl b/oovbaapi/ooo/vba/XCollection.idl
index a2d3ad24d813..6c9aa3039993 100644
--- a/oovbaapi/ooo/vba/XCollection.idl
+++ b/oovbaapi/ooo/vba/XCollection.idl
@@ -36,7 +36,9 @@ interface XCollection
[attribute, readonly] long Count;
- any Item( [in] any Index1, [in] any Index2 ) raises(com::sun::star::script::BasicErrorException);
+ any Item( [in] any Index1, [in] any Index2 )
+ raises (com::sun::star::lang::IndexOutOfBoundsException,
+ com::sun::star::script::BasicErrorException);
};
}; };