diff options
Diffstat (limited to 'sc/source/ui/unoobj/viewuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 3ddf6dd0af62..dc757a29b797 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -989,10 +989,10 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex ) { SolarMutexGuard aGuard; uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((sal_uInt16)nIndex)); - if (xPane.is()) - return uno::makeAny(xPane); - else + if (!xPane.is()) throw lang::IndexOutOfBoundsException(); + + return uno::makeAny(xPane); } uno::Type SAL_CALL ScTabViewObj::getElementType() |