summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 13:10:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 14:38:35 +0200
commit8fced917aa1af58216cbde56720f2f473eed86d9 (patch)
tree755d0dfba1fe4a5c34860d0d1ea4c6ce01525405 /chart2/source/tools
parentf0110f798cee31ff87651dc2377eacef2ab8a8b7 (diff)
clang-tidy readability-simplify-boolean-expr in accessibility..cui
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc Reviewed-on: https://gerrit.libreoffice.org/36677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx4
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx13
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx6
3 files changed, 6 insertions, 17 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 5837ea28f872..849612de0e54 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -694,9 +694,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque
return true;
}
}
- if( xDataSequence->getData().getLength() )
- return true;
- return false;
+ return xDataSequence->getData().getLength();
}
}
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 0aa654587b94..604d0be5eb77 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -279,12 +279,8 @@ ObjectIdentifier::ObjectIdentifier( const ObjectIdentifier& rOID )
bool ObjectIdentifier::operator==( const ObjectIdentifier& rOID ) const
{
- if ( areIdenticalObjects( m_aObjectCID, rOID.m_aObjectCID ) &&
- ( m_xAdditionalShape == rOID.m_xAdditionalShape ) )
- {
- return true;
- }
- return false;
+ return areIdenticalObjects( m_aObjectCID, rOID.m_aObjectCID ) &&
+ ( m_xAdditionalShape == rOID.m_xAdditionalShape );
}
bool ObjectIdentifier::operator!=( const ObjectIdentifier& rOID ) const
@@ -766,10 +762,7 @@ bool ObjectIdentifier::parsePieSegmentDragParameterString(
aValueString = rDragParameterString.getToken( 0, ',', nCharacterIndex );
rMaximumPosition.Y = aValueString.toInt32();
- if( nCharacterIndex < 0 )
- return false;
-
- return true;
+ return nCharacterIndex >= 0;
}
OUString ObjectIdentifier::getDragMethodServiceName( const OUString& rCID )
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 10c6edf7e35f..802f86296bb2 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -262,11 +262,9 @@ bool RegressionCurveHelper::isMeanValueLine(
const uno::Reference< chart2::XRegressionCurve > & xRegCurve )
{
uno::Reference< XServiceName > xServName( xRegCurve, uno::UNO_QUERY );
- if( xServName.is() &&
+ return xServName.is() &&
xServName->getServiceName() ==
- "com.sun.star.chart2.MeanValueRegressionCurve" )
- return true;
- return false;
+ "com.sun.star.chart2.MeanValueRegressionCurve";
}
uno::Reference< chart2::XRegressionCurve >