diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-04 11:20:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-05 07:49:30 +0100 |
commit | e4472d3c139294499f4c0caeebd9d4e995958eb0 (patch) | |
tree | 3e62a6530f8b758dddab18981ee38cc76ecaef9e /chart2/source/view | |
parent | Include vcl/outdev.hxx (diff) | |
download | core-e4472d3c139294499f4c0caeebd9d4e995958eb0.tar.gz core-e4472d3c139294499f4c0caeebd9d4e995958eb0.zip |
loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/axes/ScaleAutomatism.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/charttypes/Splines.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 24 |
3 files changed, 15 insertions, 15 deletions
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index 6c014dd0848a..a53e625c2a7c 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -612,7 +612,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( nMaxMainIncrementCount--; //choose major time interval: - long nDayCount = (aMaxDate-aMinDate); + long nDayCount = aMaxDate - aMinDate; long nMainIncrementCount = 1; if( !bAutoMajor ) { diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx index c03df7c7d719..3527d1bec01f 100644 --- a/chart2/source/view/charttypes/Splines.cxx +++ b/chart2/source/view/charttypes/Splines.cxx @@ -158,7 +158,7 @@ void lcl_SplineCalculation::Calculate() else { m_aSecDerivY[ 0 ] = -0.5; - double xDiff = ( m_aPoints[ 1 ].first - m_aPoints[ 0 ].first ); + double xDiff = m_aPoints[ 1 ].first - m_aPoints[ 0 ].first; u[ 0 ] = ( 3.0 / xDiff ) * ((( m_aPoints[ 1 ].second - m_aPoints[ 0 ].second ) / xDiff ) - m_fYp1 ); } @@ -193,7 +193,7 @@ void lcl_SplineCalculation::Calculate() if( ! ::rtl::math::isInf( m_fYpN ) ) { qn = 0.5; - double xDiff = ( m_aPoints[ n ].first - m_aPoints[ n - 1 ].first ); + double xDiff = m_aPoints[ n ].first - m_aPoints[ n - 1 ].first; un = ( 3.0 / xDiff ) * ( m_fYpN - ( m_aPoints[ n ].second - m_aPoints[ n - 1 ].second ) / xDiff ); } diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index a7a313b0ad49..52a4f78fd8c9 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -202,7 +202,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal { for (sal_Int32 nColumn = 0; nColumn < nNumberOfColumns; ++nColumn ) { - sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns; if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( rTextShapes[ nEntry ]->getSize() ); @@ -228,7 +228,7 @@ void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int3 sal_Int32 nCurrentRowHeight = 0; for (sal_Int32 nColumn = 0; nColumn < nNumberOfColumns; ++nColumn) { - sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns; if( nEntry < nNumberOfEntries ) { awt::Size aTextSize( rTextShapes[ nEntry ]->getSize() ); @@ -397,7 +397,7 @@ awt::Size lcl_placeLegendEntries( { for (sal_Int32 nColumn = nNumberOfColumns; nColumn--; ) { - sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns; if( nEntry < static_cast<sal_Int32>(aTextShapes.size()) ) { DrawModelWrapper::removeShape( aTextShapes[nEntry] ); @@ -526,7 +526,7 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nCurrentYPos = nYPadding + nYStartPosition; for (sal_Int32 nRow = 0; nRow < nNumberOfRows; ++nRow) { - sal_Int32 nEntry = (nColumn + nRow * nNumberOfColumns); + sal_Int32 nEntry = nColumn + nRow * nNumberOfColumns; if( nEntry >= nNumberOfEntries ) break; @@ -625,8 +625,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt: case LegendPosition_LINE_START: { // #i109336# Improve auto positioning in chart - const double fDefaultDistance = ( static_cast< double >( lcl_getLegendLeftRightMargin() ) / - static_cast< double >( rPageSize.Width ) ); + const double fDefaultDistance = static_cast< double >( lcl_getLegendLeftRightMargin() ) / + static_cast< double >( rPageSize.Width ); aResult = chart2::RelativePosition( fDefaultDistance, 0.5, drawing::Alignment_LEFT ); } @@ -634,8 +634,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt: case LegendPosition_LINE_END: { // #i109336# Improve auto positioning in chart - const double fDefaultDistance = ( static_cast< double >( lcl_getLegendLeftRightMargin() ) / - static_cast< double >( rPageSize.Width ) ); + const double fDefaultDistance = static_cast< double >( lcl_getLegendLeftRightMargin() ) / + static_cast< double >( rPageSize.Width ); aResult = chart2::RelativePosition( 1.0 - fDefaultDistance, 0.5, drawing::Alignment_RIGHT ); } @@ -643,8 +643,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt: case LegendPosition_PAGE_START: { // #i109336# Improve auto positioning in chart - const double fDefaultDistance = ( static_cast< double >( lcl_getLegendTopBottomMargin() ) / - static_cast< double >( rPageSize.Height ) ); + const double fDefaultDistance = static_cast< double >( lcl_getLegendTopBottomMargin() ) / + static_cast< double >( rPageSize.Height ); double fDistance = (static_cast<double>(rOutAvailableSpace.Y)/static_cast<double>(rPageSize.Height)) + fDefaultDistance; aResult = chart2::RelativePosition( 0.5, fDistance, drawing::Alignment_TOP ); @@ -653,8 +653,8 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt: case LegendPosition_PAGE_END: { // #i109336# Improve auto positioning in chart - const double fDefaultDistance = ( static_cast< double >( lcl_getLegendTopBottomMargin() ) / - static_cast< double >( rPageSize.Height ) ); + const double fDefaultDistance = static_cast< double >( lcl_getLegendTopBottomMargin() ) / + static_cast< double >( rPageSize.Height ); double fDistance = double(rPageSize.Height - (rOutAvailableSpace.Y + rOutAvailableSpace.Height)); fDistance += fDefaultDistance; |