loplugin:simplifybool
Change-Id: Ie7b1a6c7e60d888e2f070b817d3c34814e5835ae
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 )
|
||||
|
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -46,8 +46,8 @@ namespace
|
||||
{
|
||||
if( pDialog )
|
||||
{
|
||||
pDialog->Show( bEnable ? false : true );
|
||||
pDialog->SetModalInputMode( bEnable ? false : true );
|
||||
pDialog->Show( !bEnable );
|
||||
pDialog->SetModalInputMode( !bEnable );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 );
|
||||
}
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user