diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-20 10:26:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-20 12:31:32 +0100 |
commit | 4f4486c61d3e437059a2ac77aae012489f5c7e25 (patch) | |
tree | 408c9a71e3a2d2c4a921ce3a376546ccadae4437 /chart2/source/controller | |
parent | fda2ee3d87600ce7ecbec5528ea80b8e9758f584 (diff) |
look for =() in loplugin:unnecessaryparen
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller')
8 files changed, 22 insertions, 22 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 73d8598a6dd2..e7cc81283bab 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -161,7 +161,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SfxItemState::SET ) { - bool bForbidPercentValue = (static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue() ); + bool bForbidPercentValue = static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue(); if( bForbidPercentValue ) m_pCBPercent->Enable(false); } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index d873fb3c5dba..9b4642751ad7 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -232,7 +232,7 @@ void ErrorBarResources::UpdateControlStates() // range buttons m_pRbRange->Enable( !m_bHasInternalDataProvider || m_bEnableDataTableDialog ); - bool bShowRange = ( m_pRbRange->IsChecked()); + bool bShowRange = m_pRbRange->IsChecked(); bool bCanChooseRange = ( bShowRange && m_apRangeSelectionHelper.get() && diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 657575b36923..eee760d7cf23 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -549,8 +549,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet case SCHATTR_AXIS_REVERSE: { bool bWasReverse = ( aScale.Orientation == AxisOrientation_REVERSE ); - bool bNewReverse = (static_cast< const SfxBoolItem & >( - rItemSet.Get( nWhichId )).GetValue() ); + bool bNewReverse = static_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue(); if( bWasReverse != bNewReverse ) { aScale.Orientation = bNewReverse ? AxisOrientation_REVERSE : AxisOrientation_MATHEMATICAL; @@ -891,8 +891,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet if( m_pExplicitScale ) { bool bUseSourceFormat = - (static_cast< const SfxBoolItem & >( - rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE )).GetValue() ); + static_cast< const SfxBoolItem & >( + rItemSet.Get( SID_ATTR_NUMBERFORMAT_SOURCE )).GetValue(); if( ! bUseSourceFormat ) { @@ -914,8 +914,8 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet case SID_ATTR_NUMBERFORMAT_SOURCE: { bool bUseSourceFormat = - (static_cast< const SfxBoolItem & >( - rItemSet.Get( nWhichId )).GetValue() ); + static_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue(); GetPropertySet()->setPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT, uno::Any(bUseSourceFormat)); bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue(CHART_UNONAME_NUMFMT).hasValue(); diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 02bb29c2f8df..9aa54f554bb9 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -104,8 +104,8 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe return bChanged; uno::Any aValue; - bool bUseSourceFormat = (static_cast< const SfxBoolItem & >( - rItemSet.Get( nSourceWhich )).GetValue() ); + bool bUseSourceFormat = static_cast< const SfxBoolItem & >( + rItemSet.Get( nSourceWhich )).GetValue(); if( !bUseSourceFormat ) { SfxItemState aState = rItemSet.GetItemState( nWhichId ); @@ -151,8 +151,8 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte return bChanged; uno::Any aNewValue; - bool bUseSourceFormat = (static_cast< const SfxBoolItem & >( - rItemSet.Get( nWhichId )).GetValue() ); + bool bUseSourceFormat = static_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue(); if( !bUseSourceFormat ) { SfxItemState aState = rItemSet.GetItemState( nFormatWhich ); @@ -601,7 +601,7 @@ void DataPointItemConverter::FillSpecialItem( break; case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE: { - bool bNumberFormatIsSet = ( GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ).hasValue()); + bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue( "PercentageNumberFormat" ).hasValue(); rOutItemSet.Put( SfxBoolItem( nWhichId, ! bNumberFormatIsSet )); } break; diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index e5542ca2c379..72de9427016f 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -84,9 +84,9 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const while( (*pRanges) != 0) { - sal_uInt16 nBeg = (*pRanges); + sal_uInt16 nBeg = *pRanges; ++pRanges; - sal_uInt16 nEnd = (*pRanges); + sal_uInt16 nEnd = *pRanges; ++pRanges; OSL_ASSERT( nBeg <= nEnd ); diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx index a17110665e45..c12a5aa0eac5 100644 --- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx @@ -295,8 +295,8 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf case SCHATTR_CLOCKWISE: { - bool bClockwise = (static_cast< const SfxBoolItem & >( - rItemSet.Get( nWhichId )).GetValue() ); + bool bClockwise = static_cast< const SfxBoolItem & >( + rItemSet.Get( nWhichId )).GetValue(); if( m_xCooSys.is() ) { uno::Reference< chart2::XAxis > xAxis( AxisHelper::getAxis( 1, 0, m_xCooSys ) ); diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index 1cd91fb483f7..d4eda866e032 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -96,7 +96,7 @@ bool numberFormatFromItemToPropertySet( return bChanged; uno::Any aValue; - bool bUseSourceFormat = (static_cast<const SfxBoolItem&>(rItemSet.Get(nSourceWhich)).GetValue()); + bool bUseSourceFormat = static_cast<const SfxBoolItem&>(rItemSet.Get(nSourceWhich)).GetValue(); if (!bUseSourceFormat) { SfxItemState aState = rItemSet.GetItemState(nWhichId); @@ -144,8 +144,8 @@ bool useSourceFormatFromItemToPropertySet( return bChanged; uno::Any aNewValue; - bool bUseSourceFormat = (static_cast<const SfxBoolItem&>( - rItemSet.Get(nWhichId)).GetValue()); + bool bUseSourceFormat = static_cast<const SfxBoolItem&>( + rItemSet.Get(nWhichId)).GetValue(); if (!bUseSourceFormat) { SfxItemState aState = rItemSet.GetItemState(nFormatWhich); @@ -550,7 +550,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r break; case SCHATTR_PERCENT_NUMBERFORMAT_SOURCE: { - bool bNumberFormatIsSet = (GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue()); + bool bNumberFormatIsSet = GetPropertySet()->getPropertyValue("PercentageNumberFormat").hasValue(); rOutItemSet.Put(SfxBoolItem(nWhichId, !bNumberFormatIsSet)); } break; diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 5be67a46917a..d11210666caf 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -432,7 +432,7 @@ void ImplObjectHierarchy::createDataSeriesTree( if( DataSeriesHelper::hasDataLabelsAtSeries( xSeries ) ) { OUString aChildParticle( ObjectIdentifier::getStringForType( OBJECTTYPE_DATA_LABELS ) ); - aChildParticle+=("="); + aChildParticle += "="; aSeriesSubContainer.emplace_back( ObjectIdentifier::createClassifiedIdentifierForParticles( aSeriesParticle, aChildParticle ) ); } |