diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-22 15:55:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 08:50:31 +0200 |
commit | 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch) | |
tree | 82555c2aac7ca37c30e1084a7a8069c71fc11fbc /chart2 | |
parent | 61ff1d919e317947c769e61eeda7f1bb8132f273 (diff) |
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
7 files changed, 14 insertions, 15 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index 9e6a617948b0..0f151a44a615 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -216,7 +216,7 @@ WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ConstantErrorLow" - , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) { } @@ -266,7 +266,7 @@ WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ConstantErrorHigh" - , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) { } @@ -450,7 +450,7 @@ WrappedPercentageErrorProperty::WrappedPercentageErrorProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "PercentageError" - , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) { } @@ -500,7 +500,7 @@ WrappedErrorMarginProperty::WrappedErrorMarginProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ErrorMargin" - , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) { } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 77e0d0c660ba..d414f89eedaa 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -182,9 +182,9 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel() if( !m_pMFZRotation->IsEmptyFieldValue() ) m_nZRotation = m_pMFZRotation->GetValue(); - fXAngle = double(m_nXRotation)/double(pow(10.0,m_pMFXRotation->GetDecimalDigits())); - fYAngle = double(-1.0*m_nYRotation)/double(pow(10.0,m_pMFYRotation->GetDecimalDigits())); - fZAngle = double(-1.0*m_nZRotation)/double(pow(10.0,m_pMFZRotation->GetDecimalDigits())); + fXAngle = double(m_nXRotation)/pow(10.0,m_pMFXRotation->GetDecimalDigits()); + fYAngle = double(-1.0*m_nYRotation)/pow(10.0,m_pMFYRotation->GetDecimalDigits()); + fZAngle = double(-1.0*m_nZRotation)/pow(10.0,m_pMFZRotation->GetDecimalDigits()); fXAngle = basegfx::deg2rad(fXAngle); fYAngle = basegfx::deg2rad(fYAngle); diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 3e9fd051127e..b65e990841da 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -345,7 +345,7 @@ void ImplObjectHierarchy::createAxesTree( { //main grid rContainer.push_back( - ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) ) ) ); + ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) ) ); } Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() ); @@ -357,7 +357,7 @@ void ImplObjectHierarchy::createAxesTree( { //sub grid rContainer.push_back( - ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) ) ) ); + ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) ) ); } } } diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 38694dcdf0e2..aa45934c21d5 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -149,7 +149,7 @@ BaseCoordinateSystem::BaseCoordinateSystem( m_aOrigin.realloc( m_nDimensionCount ); for( sal_Int32 i = 0; i < m_nDimensionCount; ++i ) - m_aOrigin[ i ] <<= double( 0.0 ); + m_aOrigin[ i ] <<= 0.0; setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::Any( false )); } diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 057f957a46ad..c95c558cb921 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1836,10 +1836,9 @@ void VCartesianAxis::createShapes() AxisLabelAlignment aLabelAlign = m_aAxisProperties.maLabelAlignment; get2DAxisMainLine(aStart, aEnd, aLabelAlign, fExtraLineCrossesOtherAxis); m_aAxisProperties.maLabelAlignment = aLabelAlign; - drawing::PointSequenceSequence aPoints{std::initializer_list<uno::Sequence<awt::Point>> - {std::initializer_list<awt::Point>{ + drawing::PointSequenceSequence aPoints{{ {static_cast<sal_Int32>(aStart.getX()), static_cast<sal_Int32>(aStart.getY())}, - {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}}; + {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}; m_pShapeFactory->createLine2D( m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties ); } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 7475767977c6..7cb1192aa3ff 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -3393,7 +3393,7 @@ void ChartView::createShapes3D() if( pWindow->GetSizePixel().Width() == 0 || pWindow->GetSizePixel().Height() == 0 ) { awt::Size aPageSize = mrChartModel.getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); - Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit(MapUnit::Map100thMM) ); + Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit::Map100thMM ); pWindow->SetSizePixel(aSize); } pWindow->Show(); diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 59fafeddfb3d..67a19b18a3f2 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -796,7 +796,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames, pDevice->DrawText(Point(0, 0), rText); bmpWidth = aRect.Right() - aRect.Left(); bmpHeight = aRect.Bottom() - aRect.Top(); - maBitmap = BitmapEx(pDevice->GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight))); + maBitmap = pDevice->GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight)); rCache.insertBitmap(aKey, maBitmap); } |