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

loplugin:simplifybool

Change-Id: I3a5554b73c6e9f39a4a903eecf6c59bd3a9a9883
üst 94da7fda
......@@ -176,7 +176,7 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl()
else
{
bSystemMenuIcons = false;
bMenuIcons = m_eMenuIcons ? true : false;
bMenuIcons = m_eMenuIcons != TRISTATE_FALSE;
}
// Copy values from list in right order to our internal member.
......@@ -249,7 +249,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
else
{
bSystemMenuIcons = false;
bMenuIcons = m_eMenuIcons ? true : false;
bMenuIcons = m_eMenuIcons != TRISTATE_FALSE;
}
// Step over list of property names and get right value from coreesponding value list to set it on internal members!
......
......@@ -2676,7 +2676,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd,
return;
// set flag, so ToTop won't be called in Select
bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? true : false;
bool bAlreadySelectingRect = (nFlags & F_SELECTING_RECT) != 0;
nFlags |= F_SELECTING_RECT;
CheckBoundingRects();
......
......@@ -157,12 +157,10 @@ void FileControl::Resize()
Size aOutSz = GetOutputSizePixel();
long nButtonTextWidth = maButton.GetTextWidth( maButtonText );
if ( !(mnInternalFlags & FileControlMode_Internal::ORIGINALBUTTONTEXT) ||
( nButtonTextWidth < aOutSz.Width()/3 &&
( mnFlags & FileControlMode::RESIZEBUTTONBYPATHLEN
? ( maEdit.GetTextWidth( maEdit.GetText() )
<= aOutSz.Width() - nButtonTextWidth - ButtonBorder )
: true ) )
)
( nButtonTextWidth < aOutSz.Width()/3 &&
( !( mnFlags & FileControlMode::RESIZEBUTTONBYPATHLEN ) ||
( maEdit.GetTextWidth( maEdit.GetText() )
<= aOutSz.Width() - nButtonTextWidth - ButtonBorder ) ) ) )
{
maButton.SetText( maButtonText );
}
......
......@@ -186,9 +186,7 @@ namespace svt
{
bool operator() ( const ::rtl::Reference< TemplateContent >& _rxLHS, const ::rtl::Reference< TemplateContent >& _rxRHS ) const
{
return _rxLHS->getURL() < _rxRHS->getURL()
? true
: false;
return _rxLHS->getURL() < _rxRHS->getURL();
}
};
......
......@@ -628,7 +628,7 @@ namespace svt { namespace table
Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen)
{
(void)_bOnScreen;
return m_pImpl->calcHeaderRect( _bIsColumnBar ? false : true );
return m_pImpl->calcHeaderRect( !_bIsColumnBar );
}
......
......@@ -776,7 +776,7 @@ void ToolboxController::enable( bool bEnable )
sal_uInt16 nItemId = 0;
if( getToolboxId( nItemId, &pToolBox ) )
{
pToolBox->EnableItem( nItemId, bEnable ? true : false );
pToolBox->EnableItem( nItemId, bEnable );
}
}
......
......@@ -506,7 +506,7 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect,
while( nCount-- )
{
UnoTreeListEntry* pEntry = getEntry( *pNodes++ );
rTree.Select( pEntry, bSelect ? true : false );
rTree.Select( pEntry, bSelect );
}
}
}
......@@ -1329,7 +1329,7 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal
{
bool bEnabled = false;
if( aValue >>= bEnabled )
rTree.EnableInplaceEditing( bEnabled ? true : false );
rTree.EnableInplaceEditing( bEnabled );
break;
}
case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING:
......
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