diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-27 15:27:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-27 15:30:56 +0200 |
commit | 5db2f661ce9222af01d0f51465bff764cac9299b (patch) | |
tree | 940c9104e6e68e6e569793ee79457edb7afab394 | |
parent | e8d9bf50780b9be871a49035e62c94b9976d84bc (diff) |
More loplugin:simplifybool
Change-Id: I8996d0afb3669046040a4dfebc9c2c6c07fc7644
-rw-r--r-- | forms/source/xforms/binding.cxx | 5 | ||||
-rw-r--r-- | forms/source/xforms/propertysetbase.cxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 0adca84e056e..a7d76aec93da 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -816,9 +816,8 @@ Binding::XDataType_t Binding::getDataType() bool Binding::isValid_DataType() { Reference<XDataType> xDataType = getDataType(); - return xDataType.is() - ? xDataType->validate( maBindingExpression.getString() ) - : true; + return !xDataType.is() + || xDataType->validate( maBindingExpression.getString() ); } OUString Binding::explainInvalid_DataType() diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index 647a5bcc3394..d816c264e877 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -75,7 +75,7 @@ void PropertySetBase::registerProperty( const Property& rProperty, OSL_ENSURE( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" ); m_aAccessors.insert( PropertyAccessors::value_type( rProperty.Handle, rAccessor ) ); - OSL_ENSURE( ( rAccessor->isWriteable() == true ) + OSL_ENSURE( rAccessor->isWriteable() == ( ( rProperty.Attributes & com::sun::star::beans::PropertyAttribute::READONLY ) == 0 ), "PropertySetBase::registerProperty: inconsistence!" ); |