Kaydet (Commit) 6a6fad99 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: Ic1bfcea9deab50c3c61e5c45525c5b9a09619d2c
üst 96839e39
......@@ -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 );
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment