summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 12:34:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-11 10:10:51 +0100
commit950cd20f5f210b06ed1cc34a858535f51acfe68a (patch)
treeb7c9d7f5e759dbe96b6fe19bbed8d87e8793640f /chart2/source/view
parent0879fd8ea4920c51dab59a35b8df204f19796fad (diff)
clang-tidy: performance-unnecessary-copy-initialization in chart2
Change-Id: I6f84cfea6390d6a263e5e43ec5a638260c10c00d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx12
-rw-r--r--chart2/source/view/main/SeriesPlotterContainer.cxx4
-rw-r--r--chart2/source/view/main/VLegend.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index c0e45faf99ef..a65b0f3cd428 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1188,8 +1188,8 @@ void VSeriesPlotter::createErrorRectangle(
double fScaledX = fX;
m_pPosHelper->doLogicScaling( &fScaledX, nullptr, nullptr );
- uno::Sequence< double > aDataX( rVDataSeries.getAllX() );
- uno::Sequence< double > aDataY( rVDataSeries.getAllY() );
+ const uno::Sequence< double >& aDataX( rVDataSeries.getAllX() );
+ const uno::Sequence< double >& aDataY( rVDataSeries.getAllY() );
double fPosX = 0.0;
double fPosY = 0.0;
@@ -1303,7 +1303,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
{
if(m_nDimension!=2)
return;
- rtl::Reference< DataSeries > xContainer( rVDataSeries.getModel() );
+ const rtl::Reference< DataSeries >& xContainer( rVDataSeries.getModel() );
if(!xContainer.is())
return;
@@ -2596,7 +2596,7 @@ bool lcl_HasVisibleLine( const uno::Reference< beans::XPropertySet >& xProps, bo
bool lcl_HasRegressionCurves( const VDataSeries& rSeries, bool& rbHasDashedLine )
{
bool bHasRegressionCurves = false;
- rtl::Reference< DataSeries > xRegrCont( rSeries.getModel() );
+ const rtl::Reference< DataSeries >& xRegrCont( rSeries.getModel() );
for( const rtl::Reference< RegressionCurveModel > & rCurve : xRegrCont->getRegressionCurves2() )
{
bHasRegressionCurves = true;
@@ -2716,7 +2716,7 @@ rtl::Reference< SvxShapeGroup > VSeriesPlotter::createLegendSymbolForPoint(
// the default properties for the data point are the data series properties.
// If a data point has own attributes overwrite them
- Reference< beans::XPropertySet > xSeriesProps( rSeries.getPropertiesOfSeries() );
+ const Reference< beans::XPropertySet >& xSeriesProps( rSeries.getPropertiesOfSeries() );
Reference< beans::XPropertySet > xPointSet( xSeriesProps );
if( rSeries.isAttributedDataPoint( nPointIndex ) )
xPointSet.set( rSeries.getPropertiesOfPoint( nPointIndex ));
@@ -2864,7 +2864,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
if (!ChartTypeHelper::isSupportingStatisticProperties( m_xChartTypeModel, m_nDimension ))
return aResult;
- rtl::Reference< DataSeries > xRegrCont = rSeries.getModel();
+ const rtl::Reference< DataSeries >& xRegrCont = rSeries.getModel();
if( xRegrCont.is())
{
const std::vector< rtl::Reference< RegressionCurveModel > > & aCurves = xRegrCont->getRegressionCurves2();
diff --git a/chart2/source/view/main/SeriesPlotterContainer.cxx b/chart2/source/view/main/SeriesPlotterContainer.cxx
index c76d96a4f20f..43b62ae747ad 100644
--- a/chart2/source/view/main/SeriesPlotterContainer.cxx
+++ b/chart2/source/view/main/SeriesPlotterContainer.cxx
@@ -187,7 +187,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
sal_Int32 nGlobalSeriesIndex = 0; //for automatic symbols
for (std::size_t nCS = 0; nCS < aCooSysList.size(); ++nCS)
{
- rtl::Reference<BaseCoordinateSystem> xCooSys(aCooSysList[nCS]);
+ const rtl::Reference<BaseCoordinateSystem>& xCooSys(aCooSysList[nCS]);
VCoordinateSystem* pVCooSys
= SeriesPlotterContainer::addCooSysToList(m_rVCooSysList, xCooSys, rChartModel);
// Let's check whether the secondary Y axis is visible
@@ -207,7 +207,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(ChartModel& rChart
std::vector<rtl::Reference<ChartType>> aChartTypeList(xCooSys->getChartTypes2());
for (std::size_t nT = 0; nT < aChartTypeList.size(); ++nT)
{
- rtl::Reference<ChartType> xChartType(aChartTypeList[nT]);
+ const rtl::Reference<ChartType>& xChartType(aChartTypeList[nT]);
if (nDimensionCount == 3
&& xChartType->getChartType().equalsIgnoreAsciiCase(
CHART2_SERVICE_NAME_CHARTTYPE_PIE))
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 6bb58b4458a5..d98910468dec 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -330,7 +330,7 @@ awt::Size lcl_placeLegendEntries(
sal_Int32 nMaxColumnCount=-1;
for( sal_Int32 nN=0; nN<static_cast<sal_Int32>(aTextShapes.size()); nN++ )
{
- rtl::Reference<SvxShapeText> xShape( aTextShapes[nN] );
+ const rtl::Reference<SvxShapeText>& xShape( aTextShapes[nN] );
if( !xShape.is() )
continue;
awt::Size aSize( xShape->getSize() );
@@ -586,7 +586,7 @@ awt::Size lcl_placeLegendEntries(
break;
// text shape
- rtl::Reference<SvxShapeText> xTextShape( aTextShapes[nEntry] );
+ const rtl::Reference<SvxShapeText>& xTextShape( aTextShapes[nEntry] );
if( xTextShape.is() )
{
awt::Size aTextSize( xTextShape->getSize() );