diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-10-26 10:27:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-26 10:27:48 +0200 |
commit | 084f454e8caa2d9e43f7bdea098538bfb87423d8 (patch) | |
tree | 46c900bd78b03d20886dadad92adb17cf3045d4b /chart2 | |
parent | 7e87403953dfd54bf1e904ccc7436c6f327a9069 (diff) |
More loplugin:unnecessaryparen
81892b2037453108b9bde1512a500cf3b2ce438a "loplugin:unnecessaryparen when
compiling as C++17, so the ParenExpr is no longer hidden behind
ExprWithCleanups/CXXConstructExpr/MaterializedTemporaryExpr wrappers" gave me
the idea to generally look though IgnoreImplicit instead of IngoreImpCasts in
loplugin:unnecessaryparen. However, that would still not look through implicit
CXXConstructExpr, so would still not have found the occurrences in
81892b2037453108b9bde1512a500cf3b2ce438a when compiling in pre-C++17 mode.
Therefore, let ignoreAllImplicit also look through CXXConstructExpr. (I am not
entirely sure in which situations non-implicit CXXConstructExpr---that should
thus not be ignored---would occur, but assume they would be underneath something
like a CXXFunctionalCastExpr, which is not ignored.)
Change-Id: I947d08742e1809150ecc34a7abe84cca5e0ce843
Diffstat (limited to 'chart2')
5 files changed, 9 insertions, 9 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index 7fa34a3de548..f5205d1691a6 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -369,7 +369,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) bool bFoundSize = false; try { - if( (xProp->getPropertyValue( "Size100thMM" ) >>= aSize) ) + if( xProp->getPropertyValue( "Size100thMM" ) >>= aSize ) { if( aSize.Width == 0 && aSize.Height == 0 ) aSize = aDefaultSize; @@ -385,7 +385,7 @@ void lcl_correctSymbolSizeForBitmaps( chart2::Symbol& rSymbol ) if(!bFoundSize) { awt::Size aAWTPixelSize(10,10); - if( (xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize) ) + if( xProp->getPropertyValue( "SizePixel" ) >>= aAWTPixelSize ) { Size aPixelSize(aAWTPixelSize.Width,aAWTPixelSize.Height); Size aNewSize = ( OutputDevice::LogicToLogic( aPixelSize, MapUnit::MapPixel, MapUnit::Map100thMM )); diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 8f19372f46c5..c7b590e3ce95 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -118,7 +118,7 @@ void ChartController::executeDispatch_PositionAndSize() awt::Size aSelectedSize; ExplicitValueProvider* pProvider( ExplicitValueProvider::getExplicitValueProvider( m_xChartView ) ); if( pProvider ) - aSelectedSize = ToSize( ( pProvider->getRectangleOfObject( aCID ) ) ); + aSelectedSize = ToSize( pProvider->getRectangleOfObject( aCID ) ); ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID ); diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 2b02085a5bdb..15fdbf494d13 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -337,7 +337,7 @@ sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( if(xPointProp.is()) { double fPointOffset=0.0; - if( (xProp->getPropertyValue( "Offset") >>= fPointOffset ) ) + if( xProp->getPropertyValue( "Offset") >>= fPointOffset ) { if( ! ::rtl::math::approxEqual( fPointOffset, fOffset ) ) { diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index c52060dee958..82b7c2a59cb5 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -541,7 +541,7 @@ void switchSymbolsOnOrOff( const Reference< beans::XPropertySet > & xSeriesPrope return; chart2::Symbol aSymbProp; - if( (xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp ) ) + if( xSeriesProperties->getPropertyValue( "Symbol") >>= aSymbProp ) { if( !bSymbolsOn ) aSymbProp.Style = chart2::SymbolStyle_NONE; @@ -722,7 +722,7 @@ bool hasDataLabelsAtSeries( const Reference< chart2::XDataSeries >& xSeries ) if( xProp.is() ) { DataPointLabel aLabel; - if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) ) + if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; } } @@ -750,7 +750,7 @@ bool hasDataLabelsAtPoints( const Reference< chart2::XDataSeries >& xSeries ) if( xPointProp.is() ) { DataPointLabel aLabel; - if( (xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) ) + if( xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; if( bRet ) break; @@ -788,7 +788,7 @@ bool hasDataLabelAtPoint( const Reference< chart2::XDataSeries >& xSeries, sal_I if( xProp.is() ) { DataPointLabel aLabel; - if( (xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel) ) + if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel ) bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName; } } diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index af2b7afbfe52..012070dfebff 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -757,7 +757,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe if(xLegendProp.is()) { sal_Int16 nWritingMode=-1; - if( (xLegendProp->getPropertyValue( "WritingMode" ) >>= nWritingMode) ) + if( xLegendProp->getPropertyValue( "WritingMode" ) >>= nWritingMode ) { if( nWritingMode == text::WritingMode2::PAGE ) nWritingMode = nDefaultWritingMode; |