From 69b5f0b6579c6574a8fe68ab2a64208ec767db55 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 Mar 2022 21:53:47 +0200 Subject: loplugin:constparams Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/controller/dialogs/TitleDialogData.cxx | 2 +- chart2/source/controller/inc/TitleDialogData.hxx | 2 +- chart2/source/inc/CommonConverters.hxx | 2 +- chart2/source/tools/CommonConverters.cxx | 2 +- chart2/source/view/charttypes/BarChart.cxx | 16 ++++++++-------- chart2/source/view/charttypes/BarChart.hxx | 16 ++++++++-------- chart2/source/view/charttypes/NetChart.cxx | 4 ++-- chart2/source/view/charttypes/NetChart.hxx | 4 ++-- chart2/source/view/inc/ShapeFactory.hxx | 4 ++-- chart2/source/view/main/ChartView.cxx | 2 +- chart2/source/view/main/ShapeFactory.cxx | 4 ++-- 11 files changed, 29 insertions(+), 29 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx index 7f48d90a0b24..4a5167c31073 100644 --- a/chart2/source/controller/dialogs/TitleDialogData.cxx +++ b/chart2/source/controller/dialogs/TitleDialogData.cxx @@ -73,7 +73,7 @@ void TitleDialogData::readFromModel( const rtl::Reference<::chart::ChartModel>& bool TitleDialogData::writeDifferenceToModel( const rtl::Reference<::chart::ChartModel>& xChartModel , const uno::Reference< uno::XComponentContext >& xContext - , TitleDialogData* pOldState ) + , const TitleDialogData* pOldState ) { bool bChanged = false; for( sal_Int32 nN = static_cast< sal_Int32 >( TitleHelper::TITLE_BEGIN ); diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx index 5f398f34a1f0..70b03c8a6565 100644 --- a/chart2/source/controller/inc/TitleDialogData.hxx +++ b/chart2/source/controller/inc/TitleDialogData.hxx @@ -45,7 +45,7 @@ struct TitleDialogData */ bool writeDifferenceToModel( const rtl::Reference<::chart::ChartModel>& xChartModel , const css::uno::Reference< css::uno::XComponentContext >& xContext - , TitleDialogData* pOldState=nullptr ); + , const TitleDialogData* pOldState=nullptr ); }; } //namespace chart diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx index 0e49b79dca1d..7e8a1b86834a 100644 --- a/chart2/source/inc/CommonConverters.hxx +++ b/chart2/source/inc/CommonConverters.hxx @@ -133,7 +133,7 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon( */ OOO_DLLPUBLIC_CHARTTOOLS void appendPointSequence( css::drawing::PointSequenceSequence& rTarget - , css::drawing::PointSequenceSequence& rAdd ); + , const css::drawing::PointSequenceSequence& rAdd ); /** Position3D + Direction3D == Position3D */ diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx index 20a3346f69b0..d61a635d425d 100644 --- a/chart2/source/tools/CommonConverters.cxx +++ b/chart2/source/tools/CommonConverters.cxx @@ -419,7 +419,7 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon( } void appendPointSequence( drawing::PointSequenceSequence& rTarget - , drawing::PointSequenceSequence& rAdd ) + , const drawing::PointSequenceSequence& rAdd ) { sal_Int32 nAddCount = rAdd.getLength(); if(!nAddCount) diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 817a29fd06ec..5931487ecc88 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -563,10 +563,10 @@ void BarChart::doZSlot( bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited, const std::vector< VDataSeriesGroup >& rZSlot, const sal_Int32 nZ, const sal_Int32 nPointIndex, const sal_Int32 nStartIndex, - rtl::Reference& xSeriesTarget, - rtl::Reference& xRegressionCurveTarget, - rtl::Reference& xRegressionCurveEquationTarget, - rtl::Reference& xTextTarget, + const rtl::Reference& xSeriesTarget, + const rtl::Reference& xRegressionCurveTarget, + const rtl::Reference& xRegressionCurveEquationTarget, + const rtl::Reference& xTextTarget, std::unordered_set>& aShapeSet, std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap, std::map< sal_Int32, double >& aLogicYSumMap) @@ -638,10 +638,10 @@ void BarChart::doXSlot( const VDataSeriesGroup& rXSlot, bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited, const sal_Int32 nZ, const sal_Int32 nPointIndex, const sal_Int32 nStartIndex, - rtl::Reference& xSeriesTarget, - rtl::Reference& xRegressionCurveTarget, - rtl::Reference& xRegressionCurveEquationTarget, - rtl::Reference& xTextTarget, + const rtl::Reference& xSeriesTarget, + const rtl::Reference& xRegressionCurveTarget, + const rtl::Reference& xRegressionCurveEquationTarget, + const rtl::Reference& xTextTarget, std::unordered_set>& aShapeSet, std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap, std::map< sal_Int32, double >& aLogicYSumMap, diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx index badb65822837..52c3b6177765 100644 --- a/chart2/source/view/charttypes/BarChart.hxx +++ b/chart2/source/view/charttypes/BarChart.hxx @@ -84,10 +84,10 @@ private: //methods void doZSlot( bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited, const std::vector< VDataSeriesGroup >& rZSlot, sal_Int32 nZ, sal_Int32 nPointIndex, sal_Int32 nStartIndex, - rtl::Reference& xSeriesTarget, - rtl::Reference& xRegressionCurveTarget, - rtl::Reference& xRegressionCurveEquationTarget, - rtl::Reference& xTextTarget, + const rtl::Reference& xSeriesTarget, + const rtl::Reference& xRegressionCurveTarget, + const rtl::Reference& xRegressionCurveEquationTarget, + const rtl::Reference& xTextTarget, std::unordered_set>& aShapeSet, std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap, std::map< sal_Int32, double >& aLogicYSumMap); @@ -96,10 +96,10 @@ private: //methods const VDataSeriesGroup& rXSlot, bool& bDrawConnectionLines, bool& bDrawConnectionLinesInited, sal_Int32 nZ, sal_Int32 nPointIndex, sal_Int32 nStartIndex, - rtl::Reference& xSeriesTarget, - rtl::Reference& xRegressionCurveTarget, - rtl::Reference& xRegressionCurveEquationTarget, - rtl::Reference& xTextTarget, + const rtl::Reference& xSeriesTarget, + const rtl::Reference& xRegressionCurveTarget, + const rtl::Reference& xRegressionCurveEquationTarget, + const rtl::Reference& xTextTarget, std::unordered_set>& aShapeSet, std::map< VDataSeries*, FormerBarPoint >& aSeriesFormerPointMap, std::map< sal_Int32, double >& aLogicYSumMap, diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 1e23ad7f6ce9..098864ac0db4 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -112,7 +112,7 @@ drawing::Direction3D NetChart::getPreferredDiagramAspectRatio() const } bool NetChart::impl_createLine( VDataSeries* pSeries - , std::vector>* pSeriesPoly + , const std::vector>* pSeriesPoly , PlottingPositionHelper const * pPosHelper ) { //return true if a line was created successfully @@ -164,7 +164,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries } bool NetChart::impl_createArea( VDataSeries* pSeries - , std::vector>* pSeriesPoly + , const std::vector>* pSeriesPoly , std::vector> const * pPreviousSeriesPoly , PlottingPositionHelper const * pPosHelper ) { diff --git a/chart2/source/view/charttypes/NetChart.hxx b/chart2/source/view/charttypes/NetChart.hxx index 42d06570e9f2..a536daf15fd2 100644 --- a/chart2/source/view/charttypes/NetChart.hxx +++ b/chart2/source/view/charttypes/NetChart.hxx @@ -53,11 +53,11 @@ public: private: //methods void impl_createSeriesShapes(); bool impl_createArea( VDataSeries* pSeries - , std::vector>* pSeriesPoly + , const std::vector>* pSeriesPoly , std::vector> const * pPreviousSeriesPoly , PlottingPositionHelper const * pPosHelper ); bool impl_createLine( VDataSeries* pSeries - , std::vector>* pSeriesPoly + , const std::vector>* pSeriesPoly , PlottingPositionHelper const * pPosHelper ); private: //member diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index 86ae5411d086..89991afaf1b0 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -203,7 +203,7 @@ public: static rtl::Reference createText(const rtl::Reference& xTarget - , css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString + , const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString , const tNameSequence& rPropNames , const tAnySequence& rPropValues , const css::uno::Any& rATransformation); @@ -255,7 +255,7 @@ public: static OUString getStackedString( const OUString& rString, bool bStacked ); static bool hasPolygonAnyLines( const std::vector>& rPoly ); - static bool isPolygonEmptyOrSinglePoint( css::drawing::PolyPolygonShape3D& rPoly ); + static bool isPolygonEmptyOrSinglePoint( const css::drawing::PolyPolygonShape3D& rPoly ); static bool isPolygonEmptyOrSinglePoint( const std::vector>& rPoly ); static void closePolygon( css::drawing::PolyPolygonShape3D& rPoly ); static void closePolygon( std::vector>& rPoly ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 1d8fce7bed9a..f0d4b8f160e5 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2320,7 +2320,7 @@ void formatPage( } } -void lcl_removeEmptyGroupShapes( SdrObject& rParent ) +void lcl_removeEmptyGroupShapes( const SdrObject& rParent ) { SdrObjList* pObjList = rParent.getChildrenOfSdrObject(); if (!pObjList || pObjList->GetObjCount() == 0) diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index d966bbd17cc5..889dbf389d43 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -2074,7 +2074,7 @@ rtl::Reference rtl::Reference ShapeFactory::createText( const rtl::Reference& xTarget - , uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString + , const uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString , const tNameSequence& rPropNames , const tAnySequence& rPropValues , const uno::Any& rATransformation ) @@ -2418,7 +2418,7 @@ bool ShapeFactory::hasPolygonAnyLines( const std::vector