summaryrefslogtreecommitdiff
path: root/framework/source/fwi/uielement/constitemcontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/fwi/uielement/constitemcontainer.cxx')
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 811e33ba89cb..efe3167c81a9 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -204,10 +204,9 @@ sal_Int32 SAL_CALL ConstItemContainer::getCount()
Any SAL_CALL ConstItemContainer::getByIndex( sal_Int32 Index )
{
- if ( sal_Int32( m_aItemVector.size()) > Index )
- return makeAny( m_aItemVector[Index] );
- else
+ if ( sal_Int32( m_aItemVector.size()) <= Index )
throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) );
+ return makeAny( m_aItemVector[Index] );
}
// XPropertySet