summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-14 20:39:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-15 11:56:08 +0100
commit11291be10e44000f2c01645318744ff74c33c208 (patch)
tree674b39ae30921e65701ae9205cc53cac74306da9 /sw/source/ui/vba
parentf9c460e34d46559f825b91fbc54755a65e6fabc4 (diff)
coverity#738453 Uncaught exception
Change-Id: Id05fd31d3a62bec8d658b9ecbae484ac081b8960
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r--sw/source/ui/vba/vbaheadersfooters.cxx4
-rw-r--r--sw/source/ui/vba/vbaheadersfooters.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx
index 1ecbb91c04fa..082420988ad9 100644
--- a/sw/source/ui/vba/vbaheadersfooters.cxx
+++ b/sw/source/ui/vba/vbaheadersfooters.cxx
@@ -89,13 +89,13 @@ SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface
return 3;
}
-uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (uno::RuntimeException)
+uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
sal_Int32 nIndex = 0;
Index1 >>= nIndex;
if( ( nIndex < 1 ) || ( nIndex > 3 ) )
{
- throw container::NoSuchElementException();
+ throw lang::IndexOutOfBoundsException();
}
return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, mxPageStyleProps, mbHeader, nIndex ) ) );
}
diff --git a/sw/source/ui/vba/vbaheadersfooters.hxx b/sw/source/ui/vba/vbaheadersfooters.hxx
index 7e62f1ab3b39..3f4de951b94e 100644
--- a/sw/source/ui/vba/vbaheadersfooters.hxx
+++ b/sw/source/ui/vba/vbaheadersfooters.hxx
@@ -37,7 +37,7 @@ public:
virtual ~SwVbaHeadersFooters() {}
virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException) SAL_OVERRIDE;
- virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& )throw (css::uno::RuntimeException) SAL_OVERRIDE;
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException) SAL_OVERRIDE;
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) SAL_OVERRIDE;
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE;