diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-22 12:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-23 09:02:58 +0200 |
commit | a8622c77d26ca7a635afc95bba9a5054dc31eb7c (patch) | |
tree | ecb1ce71272291515dec10fc5fe94061f7231b78 /stoc/source/inspect | |
parent | 2684aefcf5d2804351bda01a2d2fe7bbbd351451 (diff) |
loplugin:flatten in sdext..stoc
Change-Id: I460e813e20a691c53738373376d3363f553bbab2
Reviewed-on: https://gerrit.libreoffice.org/42636
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/inspect')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 063e868a1604..3bb086d5ad7d 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -372,10 +372,9 @@ void IntrospectionAccessStatic_Impl::setPropertyValue( const Any& obj, const OUS //void IntrospectionAccessStatic_Impl::setPropertyValue( Any& obj, const OUString& aPropertyName, const Any& aValue ) const { sal_Int32 i = getPropertyIndex( aPropertyName ); - if( i != -1 ) - setPropertyValueByIndex( obj, i, aValue ); - else + if( i == -1 ) throw UnknownPropertyException(aPropertyName); + setPropertyValueByIndex( obj, i, aValue ); } void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal_Int32 nSequenceIndex, const Any& aValue) const |