summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-24 12:25:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-24 12:36:19 +0200
commit820fca753b0bfed6078b9cde09430177d6a193ca (patch)
tree1131d7504fd7ade9df9149238d559dc4bc8193a6 /chart2
parent3ac5138cfc01c1795ae05963fa4e5a6c7d22f4de (diff)
loplugin:simplifybool
Change-Id: Ie7b1a6c7e60d888e2f070b817d3c34814e5835ae
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx4
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx4
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx2
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx4
6 files changed, 11 insertions, 11 deletions
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index b43578b8e6a8..60d590177c52 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -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 );
}
}
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 95088398d9b7..fe05befe5fa1 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -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 )
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index f106decc7878..d265e8ab7859 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -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 );
}
}
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 7541f6726a19..a5b498661fed 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -46,8 +46,8 @@ namespace
{
if( pDialog )
{
- pDialog->Show( bEnable ? false : true );
- pDialog->SetModalInputMode( bEnable ? false : true );
+ pDialog->Show( !bEnable );
+ pDialog->SetModalInputMode( !bEnable );
}
}
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index a57607178d75..8684e08fe52a 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -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 );
}
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 0abfa5860d5b..29cdb5ca8f43 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -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)