diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-27 16:08:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-28 10:21:01 +0200 |
commit | e19cd844be171097dddf6319a037b7503ad2c922 (patch) | |
tree | 64ed67787f118d2b97036cc687242002e7bda5ce /chart2 | |
parent | d0e9aa6a2b07cb183dd7f8b06399b28f67588a83 (diff) |
Rephrase comparisons between bool and sal_Bool
...to cater for forthcoming loplugin:implicitboolconversion improvements
Change-Id: I801b6b73648715448198d582a087cc834f6e20c8
Diffstat (limited to 'chart2')
3 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index ed9ea945731d..74ebe3b0c714 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -315,14 +315,14 @@ bool DataPointItemConverter::ApplySpecialItem( if( m_bOverwriteLabelsForAttributedDataPointsAlso ) { Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY); - if( (bOldValue ? 1 : 0) != rValue || + if( bOldValue != bool(rValue) || DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, CHART_UNONAME_LABEL , aOldValue ) ) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, CHART_UNONAME_LABEL , uno::makeAny( aLabel ) ); bChanged = true; } } - else if( (bOldValue ? 1 : 0) != rValue ) + else if( bOldValue != bool(rValue) ) { GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL , uno::makeAny(aLabel)); bChanged = true; diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index e0e5bbe31c1d..fe94df3f3dc2 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -278,14 +278,14 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte if (mbDataSeries) { Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY); - if ((bOldValue ? 1 : 0) != rValue || + if (bOldValue != bool(rValue) || DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, CHART_UNONAME_LABEL, aOldValue)) { DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints(xSeries, CHART_UNONAME_LABEL, uno::makeAny(aLabel)); bChanged = true; } } - else if ((bOldValue ? 1 : 0) != rValue) + else if (bOldValue != bool(rValue)) { GetPropertySet()->setPropertyValue(CHART_UNONAME_LABEL, uno::makeAny(aLabel)); bChanged = true; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 242fdf282915..fca17f15983c 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -662,7 +662,7 @@ sal_Bool SAL_CALL ChartController::suspend( sal_Bool bSuspend ) if( m_aLifeTimeManager.impl_isDisposed() ) return sal_False; //behave passive if already disposed, return false because request was not accepted //@todo? correct - if(bSuspend == (m_bSuspended ? 1 : 0)) + if(bool(bSuspend) == m_bSuspended) { OSL_FAIL( "new suspend mode equals old suspend mode" ); return sal_True; |