diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-16 13:55:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-07-16 14:00:21 +0200 |
commit | 6a6fad992ecbc90f8280e125a3680278559693b2 (patch) | |
tree | 8aec209f23616bf675d9c0c016db1c8f9461dae8 /svtools | |
parent | 96839e398c980f4b9ac3a348ac7f7af4f5218336 (diff) |
loplugin:simplifybool
Change-Id: Ic1bfcea9deab50c3c61e5c45525c5b9a09619d2c
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/uno/treecontrolpeer.cxx | 12 | ||||
-rw-r--r-- | svtools/source/uno/unoiface.cxx | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 6ec90e45713a..26cc5b4ebd6e 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -778,7 +778,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >& UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); - return ( pEntry && rTree.IsExpanded( pEntry ) ) ? sal_True : sal_False; + return pEntry && rTree.IsExpanded( pEntry ); } @@ -809,7 +809,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >& UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); - return ( pEntry && rTree.IsEntryVisible( pEntry ) ) ? sal_True : sal_False; + return pEntry && rTree.IsEntryVisible( pEntry ); } @@ -906,7 +906,7 @@ sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException, std::e SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); - return rTree.IsEditingActive() ? sal_True : sal_False; + return rTree.IsEditingActive(); } @@ -1406,15 +1406,15 @@ Any TreeControlPeer::getProperty( const OUString& PropertyName ) throw(RuntimeEx case BASEPROPERTY_TREE_DATAMODEL: return Any( mxDataModel ); case BASEPROPERTY_TREE_EDITABLE: - return Any( rTree.IsInplaceEditingEnabled() ? sal_True : sal_False ); + return Any( rTree.IsInplaceEditingEnabled() ); case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING: return Any( sal_True ); // @todo case BASEPROPERTY_TREE_ROOTDISPLAYED: return Any( mbIsRootDisplayed ); case BASEPROPERTY_TREE_SHOWSHANDLES: - return Any( (rTree.GetStyle() & WB_HASLINES) != 0 ? sal_True : sal_False ); + return Any( (rTree.GetStyle() & WB_HASLINES) != 0 ); case BASEPROPERTY_TREE_SHOWSROOTHANDLES: - return Any( (rTree.GetStyle() & WB_HASLINESATROOT) != 0 ? sal_True : sal_False ); + return Any( (rTree.GetStyle() & WB_HASLINESATROOT) != 0 ); } } return VCLXWindow::getProperty( PropertyName ); diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 1223e18b4e03..39e0497e4a04 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -294,7 +294,7 @@ sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeExc SolarMutexGuard aGuard; VclPtr< MultiLineEdit > pMultiLineEdit = GetAs< MultiLineEdit >(); - return ( pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled() ) ? sal_True : sal_False; + return pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled(); } void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception) @@ -692,7 +692,7 @@ sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeExcep SolarMutexGuard aGuard; VclPtr< FileControl > pFileControl = GetAs< FileControl >(); - return ( pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled() ) ? sal_True : sal_False; + return pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled(); } void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException, std::exception) @@ -1814,7 +1814,7 @@ sal_Bool SVTXNumericField::isStrictFormat() throw(::com::sun::star::uno::Runtime SolarMutexGuard aGuard; FormattedField* pField = GetAs< FormattedField >(); - return pField ? pField->IsStrictFormat() : sal_False; + return pField && pField->IsStrictFormat(); } void SVTXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) @@ -1980,7 +1980,7 @@ sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::Runtim SolarMutexGuard aGuard; FormattedField* pField = GetAs< FormattedField >(); - return pField ? pField->IsStrictFormat() : sal_False; + return pField && pField->IsStrictFormat(); } void SVTXCurrencyField::setProperty( const OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException, std::exception) |