diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 13:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 14:38:35 +0200 |
commit | 8fced917aa1af58216cbde56720f2f473eed86d9 (patch) | |
tree | 755d0dfba1fe4a5c34860d0d1ea4c6ce01525405 /chart2/source/controller | |
parent | f0110f798cee31ff87651dc2377eacef2ab8a8b7 (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/controller')
4 files changed, 6 insertions, 21 deletions
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 6acfc912845f..ff8f8292c085 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -126,9 +126,7 @@ bool ChartTypeDialogController::isSubType( const OUString& rServiceName ) { const tTemplateServiceChartTypeParameterMap& rTemplateMap = this->getTemplateMap(); tTemplateServiceChartTypeParameterMap::const_iterator aIt( rTemplateMap.find( rServiceName )); - if( aIt != rTemplateMap.end()) - return true; - return false; + return aIt != rTemplateMap.end(); } ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService( const OUString& rServiceName diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 2b049ab616b1..53b7594e412a 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -576,14 +576,9 @@ bool ChartController::isObjectDeleteable( const uno::Any& rSelection ) bool ChartController::isShapeContext() const { - if ( m_aSelection.isAdditionalShapeSelected() || + return m_aSelection.isAdditionalShapeSelected() || ( m_pDrawViewWrapper && m_pDrawViewWrapper->AreObjectsMarked() && - ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) ) ) - { - return true; - } - - return false; + ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) ); } void ChartController::impl_ClearSelection() diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx index 7e4b17fdd45f..b5171cb3d67b 100644 --- a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx +++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx @@ -46,11 +46,7 @@ void FeatureCommandDispatchBase::initialize() bool FeatureCommandDispatchBase::isFeatureSupported( const OUString& rCommandURL ) { SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommandURL ); - if ( aIter != m_aSupportedFeatures.end() ) - { - return true; - } - return false; + return aIter != m_aSupportedFeatures.end(); } void FeatureCommandDispatchBase::fireStatusEvent( const OUString& rURL, diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 4e6375cdd26b..b76a7bfa08ac 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -375,9 +375,7 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos return false; SolarMutexGuard aSolarGuard; SdrObject* pObj = rDrawViewWrapper.getNamedSdrObject( rNameOfSelectedObject ); - if( !DrawViewWrapper::IsObjectHit( pObj, rMPos ) ) - return false; - return true; + return DrawViewWrapper::IsObjectHit( pObj, rMPos ); } OUString SelectionHelper::getHitObjectCID( @@ -452,9 +450,7 @@ bool SelectionHelper::isRotateableObject( const OUString& rCID sal_Int32 nDimensionCount = DiagramHelper::getDimension( ChartModelHelper::findDiagram( xChartModel ) ); - if( nDimensionCount == 3 ) - return true; - return false; + return nDimensionCount == 3; } SelectionHelper::SelectionHelper( SdrObject* pSelectedObj ) |