loplugin:simplifybool
Change-Id: Ib238714477fdeadad07c470e1d9ed64b2b18f25d
This commit is contained in:
@@ -66,7 +66,7 @@ bool VCLXFont::ImplAssertValidFontMetric()
|
|||||||
pOutDev->SetFont( aOldFont );
|
pOutDev->SetFont( aOldFont );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mpFontMetric ? true : false;
|
return mpFontMetric != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1140,7 +1140,7 @@ void VCLXRadioButton::setProperty( const OUString& PropertyName, const ::com::su
|
|||||||
sal_Int16 n = sal_Int16();
|
sal_Int16 n = sal_Int16();
|
||||||
if ( Value >>= n )
|
if ( Value >>= n )
|
||||||
{
|
{
|
||||||
bool b = n ? true : false;
|
bool b = n != 0;
|
||||||
if ( pButton->IsRadioCheckEnabled() )
|
if ( pButton->IsRadioCheckEnabled() )
|
||||||
pButton->Check( b );
|
pButton->Check( b );
|
||||||
else
|
else
|
||||||
@@ -1807,7 +1807,7 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
|||||||
|
|
||||||
if( pListBox )
|
if( pListBox )
|
||||||
{
|
{
|
||||||
bool bDropDown = ( pListBox->GetStyle() & WB_DROPDOWN ) ? true : false;
|
bool bDropDown = ( pListBox->GetStyle() & WB_DROPDOWN ) != 0;
|
||||||
if ( bDropDown && !IsSynthesizingVCLEvent() && maActionListeners.getLength() )
|
if ( bDropDown && !IsSynthesizingVCLEvent() && maActionListeners.getLength() )
|
||||||
{
|
{
|
||||||
// Call ActionListener on DropDown event
|
// Call ActionListener on DropDown event
|
||||||
@@ -4690,7 +4690,7 @@ void VCLXFormattedSpinField::setStrictFormat( bool bStrict )
|
|||||||
bool VCLXFormattedSpinField::isStrictFormat()
|
bool VCLXFormattedSpinField::isStrictFormat()
|
||||||
{
|
{
|
||||||
FormatterBase* pFormatter = GetFormatter();
|
FormatterBase* pFormatter = GetFormatter();
|
||||||
return pFormatter ? pFormatter->IsStrictFormat() : false;
|
return pFormatter && pFormatter->IsStrictFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -150,7 +150,7 @@ bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
|
|||||||
if ( ( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END ) )
|
if ( ( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END ) )
|
||||||
nPropId = BASEPROPERTY_FONTDESCRIPTOR;
|
nPropId = BASEPROPERTY_FONTDESCRIPTOR;
|
||||||
|
|
||||||
return maData.find( nPropId ) != maData.end() ? true : false;
|
return maData.find( nPropId ) != maData.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
::com::sun::star::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
|
::com::sun::star::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
|
||||||
|
@@ -385,7 +385,7 @@ bool DoesDependOnOthers( sal_uInt16 nPropertyId )
|
|||||||
{
|
{
|
||||||
const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
|
const ImplPropertyInfo* pImplPropertyInfo = ImplGetImplPropertyInfo( nPropertyId );
|
||||||
DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
|
DBG_ASSERT( pImplPropertyInfo, "Invalid PropertyId!" );
|
||||||
return pImplPropertyInfo ? pImplPropertyInfo->bDependsOnOthers : false;
|
return pImplPropertyInfo && pImplPropertyInfo->bDependsOnOthers;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompareProperties( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 )
|
bool CompareProperties( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 )
|
||||||
|
@@ -46,7 +46,7 @@ bool UnoPropertyArrayHelper::ImplHasProperty( sal_uInt16 nPropId ) const
|
|||||||
if ( ( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END ) )
|
if ( ( nPropId >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( nPropId <= BASEPROPERTY_FONTDESCRIPTORPART_END ) )
|
||||||
nPropId = BASEPROPERTY_FONTDESCRIPTOR;
|
nPropId = BASEPROPERTY_FONTDESCRIPTOR;
|
||||||
|
|
||||||
return maIDs.find( nPropId ) != maIDs.end() ? true : false;
|
return maIDs.find( nPropId ) != maIDs.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ::cppu::IPropertyArrayHelper
|
// ::cppu::IPropertyArrayHelper
|
||||||
|
@@ -212,7 +212,7 @@ static bool lcl_ImplIsParent( vcl::Window* pParentWindow, vcl::Window* pPossible
|
|||||||
while ( pWindow && ( pWindow != pParentWindow ) )
|
while ( pWindow && ( pWindow != pParentWindow ) )
|
||||||
pWindow = pWindow->GetParent();
|
pWindow = pWindow->GetParent();
|
||||||
|
|
||||||
return pWindow ? true : false;
|
return pWindow != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnoWrapper::WindowDestroyed( vcl::Window* pWindow )
|
void UnoWrapper::WindowDestroyed( vcl::Window* pWindow )
|
||||||
|
Reference in New Issue
Block a user