diff options
author | Sascha Ballach <sab@openoffice.org> | 2002-09-26 08:05:05 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2002-09-26 08:05:05 +0000 |
commit | 931a0b0a03a914f22142c54ef17e42cd56a1e2ce (patch) | |
tree | 08e2e4b75345bc559ac97566b05a451d31d271dd /sc/source/ui/unoobj/miscuno.cxx | |
parent | f34ad1954a71b239ab54a901407318d26e444da7 (diff) |
#103389#; nextElement should throw NoSuchElementException instead of IndexOutOfBoundsException
Diffstat (limited to 'sc/source/ui/unoobj/miscuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/miscuno.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index 91e09e6c88ec..762af4e95989 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: miscuno.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: sab $ $Date: 2002-09-11 09:07:59 $ + * last change: $Author: sab $ $Date: 2002-09-26 09:05:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -241,7 +241,16 @@ uno::Any SAL_CALL ScIndexEnumeration::nextElement() throw(container::NoSuchEleme lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - return xIndex->getByIndex(nPos++); + uno::Any aReturn; + try + { + aReturn = xIndex->getByIndex(nPos++); + } + catch (lang::IndexOutOfBoundsException&) + { + throw container::NoSuchElementException(); + } + return aReturn; } ::rtl::OUString SAL_CALL ScIndexEnumeration::getImplementationName() |