diff options
Diffstat (limited to 'forms/source/xforms/namedcollection.hxx')
-rw-r--r-- | forms/source/xforms/namedcollection.hxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx index c0a31bd99b83..7546ba271035 100644 --- a/forms/source/xforms/namedcollection.hxx +++ b/forms/source/xforms/namedcollection.hxx @@ -98,11 +98,9 @@ public: virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override { - if( hasItem( aName ) ) - return css::uno::makeAny( getItem( aName ) ); - else + if( !hasItem( aName ) ) throw css::container::NoSuchElementException(); - + return css::uno::makeAny( getItem( aName ) ); } virtual css::uno::Sequence<OUString> SAL_CALL getElementNames() override |