summaryrefslogtreecommitdiff
path: root/cppuhelper/source/propshlp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/propshlp.cxx')
-rw-r--r--cppuhelper/source/propshlp.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 5533e9857477..8cc395a847f9 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -220,8 +220,7 @@ Any OPropertySetHelper2::queryInterface( const css::uno::Type & rType )
Any cnd(cppu::queryInterface(rType, static_cast< XPropertySetOption * >(this)));
if ( cnd.hasValue() )
return cnd;
- else
- return OPropertySetHelper::queryInterface(rType);
+ return OPropertySetHelper::queryInterface(rType);
}
/**
@@ -1054,19 +1053,16 @@ sal_Bool OPropertyArrayHelper::fillPropertyMembersByHandle
*pAttributes = pProperties[ nHandle ].Attributes;
return true;
}
- else
+ // normally the array is sorted
+ for( sal_Int32 i = 0; i < nElements; i++ )
{
- // normally the array is sorted
- for( sal_Int32 i = 0; i < nElements; i++ )
+ if( pProperties[i].Handle == nHandle )
{
- if( pProperties[i].Handle == nHandle )
- {
- if( pPropName )
- *pPropName = pProperties[ i ].Name;
- if( pAttributes )
- *pAttributes = pProperties[ i ].Attributes;
- return true;
- }
+ if( pPropName )
+ *pPropName = pProperties[ i ].Name;
+ if( pAttributes )
+ *pAttributes = pProperties[ i ].Attributes;
+ return true;
}
}
return false;