loplugin:simplifybool

Change-Id: Ie7b1a6c7e60d888e2f070b817d3c34814e5835ae
This commit is contained in:
Stephan Bergmann
2015-04-24 12:25:01 +02:00
parent 3ac5138cfc
commit 820fca753b
6 changed files with 11 additions and 11 deletions

View File

@@ -41,8 +41,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
{
if( pDialog )
{
pDialog->Show( bEnable ? false : true );
pDialog->SetModalInputMode( bEnable ? false : true );
pDialog->Show( !bEnable );
pDialog->SetModalInputMode( !bEnable );
}
}

View File

@@ -167,7 +167,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen
IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl)
{
bool bEnable = m_pCbxShow ? m_pCbxShow->IsChecked() : true;
bool bEnable = m_pCbxShow == nullptr || m_pCbxShow->IsChecked();
m_pRbtLeft->Enable( bEnable );
m_pRbtTop->Enable( bEnable );
@@ -224,7 +224,7 @@ void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const
nLegendPosition = chart2::LegendPosition_PAGE_END;
rOutAttrs.Put(SfxInt32Item(SCHATTR_LEGEND_POS, nLegendPosition ));
rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_pCbxShow ? m_pCbxShow->IsChecked() : true) );
rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_pCbxShow == nullptr || m_pCbxShow->IsChecked()) );
}
IMPL_LINK( LegendPositionResources, PositionChangeHdl, RadioButton*, pRadio )

View File

@@ -136,8 +136,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
{
if( pDialog )
{
pDialog->Show( bEnable ? false : true );
pDialog->SetModalInputMode( bEnable ? false : true );
pDialog->Show( !bEnable );
pDialog->SetModalInputMode( !bEnable );
}
}

View File

@@ -46,8 +46,8 @@ namespace
{
if( pDialog )
{
pDialog->Show( bEnable ? false : true );
pDialog->SetModalInputMode( bEnable ? false : true );
pDialog->Show( !bEnable );
pDialog->SetModalInputMode( !bEnable );
}
}

View File

@@ -449,7 +449,7 @@ bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >& xDataS
if( bIsAutoDate )
{
if( bOwnData )
bIsDate = bOwnDataAnddAxisHasAnyFormat ? bOwnDataAnddAxisHasDateFormat : true;
bIsDate = !bOwnDataAnddAxisHasAnyFormat || bOwnDataAnddAxisHasDateFormat;
else
bIsDate = DiagramHelper::isDateNumberFormat( xDataSequence->getNumberFormatKeyByIndex( nN ), xNumberFormats );
}

View File

@@ -261,7 +261,7 @@ void OpenGL3DRenderer::ShaderResources::LoadShaders()
m_BatchTextVertexID = glGetAttribLocation(m_BatchTextProID, "vPosition");
m_BatchTextTexCoordID = glGetAttribLocation(m_BatchTextProID, "texCoord");
}
mbTexBatchSupport = m_BatchTextProID ? true : false;
mbTexBatchSupport = m_BatchTextProID != 0;
CHECK_GL_ERROR();
}
else
@@ -2455,7 +2455,7 @@ void OpenGL3DRenderer::CalcScrollMoveMatrix(bool bNewScene)
m_fCurDistance = -m_fScrollSpeed;
m_fCurDistance += m_fCurDistance >= m_fScrollDistance ? 0.0f : m_fScrollSpeed;
m_ScrollMoveMatrix = glm::translate(glm::vec3(-m_fCurDistance * 0.01, 0.0f, 0.0f));
m_bUndrawFlag = m_fCurDistance >= m_fScrollDistance ? true : false;
m_bUndrawFlag = m_fCurDistance >= m_fScrollDistance;
}
glm::mat4 OpenGL3DRenderer::GetDiffOfTwoCameras(const glm::vec3& rBeginPos, const glm::vec3& rEndPos, const glm::vec3& rBeginDirection, const glm::vec3& rEndDirection)