diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 22:06:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-12 11:15:26 +0100 |
commit | e23be78a6a98c3eb4bef0d598369238ee1ec0cf5 (patch) | |
tree | 43ece59725976a9adf62b87c1908394bf903dfcf /xmloff/source | |
parent | 20d971a58727715475b3dcdd22ad568190c2fac4 (diff) |
clang-tidy: performance-unnecessary-copy-initialization in xmloff
Change-Id: I086167b3d24c125efac99180012e32d9851d49ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176444
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLTools.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 4e118e81c72c..626da82c6fdb 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -293,7 +293,7 @@ Reference< chart2::XAxis > lcl_getAxis( const Reference< frame::XModel >& xChart sal_Int32 nCooSysIndex = 0; if( nCooSysIndex < aCooSysSeq.getLength() ) { - Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[nCooSysIndex] ); + const Reference< chart2::XCoordinateSystem >& xCooSys( aCooSysSeq[nCooSysIndex] ); if( xCooSys.is() && nDimensionIndex < xCooSys->getDimension() ) { const sal_Int32 nMaxAxisIndex = xCooSys->getMaximumAxisIndexByDimension(nDimensionIndex); @@ -499,7 +499,7 @@ void SchXMLAxisContext::CreateAxis() if( aCooSysSeq.hasElements() ) { bool bSwapXandYAxis = false; - Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[0] ); + const Reference< chart2::XCoordinateSystem >& xCooSys( aCooSysSeq[0] ); Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY ); if( xCooSysProp.is() && ( xCooSysProp->getPropertyValue(u"SwapXAndYAxis"_ustr) >>= bSwapXandYAxis ) && bSwapXandYAxis ) @@ -675,7 +675,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc uno::Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems()); if( aCooSysSeq.hasElements() ) { - Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[0] ); + const Reference< chart2::XCoordinateSystem >& xCooSys( aCooSysSeq[0] ); if( xCooSys.is() ) { Reference< chart2::XAxis > xMainXAxis = lcl_getAxis( xCooSys, 0, 0 ); diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 4ace40238e47..373c355141a1 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -158,7 +158,7 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( m_rbHasRangeAtPlotArea = false; // get Diagram - uno::Reference< chart::XChartDocument > xDoc = rImpHelper.GetChartDocument(); + const uno::Reference< chart::XChartDocument >& xDoc = rImpHelper.GetChartDocument(); if( xDoc.is()) { mxDiagram = xDoc->getDiagram(); diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index c71867a25613..2cda1e39c5a2 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -466,7 +466,7 @@ void CreateCategories( aCooSysSeq( xCooSysCnt->getCoordinateSystems()); if( nCooSysIndex < aCooSysSeq.getLength()) { - uno::Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[nCooSysIndex] ); + const uno::Reference< chart2::XCoordinateSystem >& xCooSys( aCooSysSeq[nCooSysIndex] ); SAL_WARN_IF( !xCooSys.is(), "xmloff.chart", "xCooSys is NULL"); if( nDimensionIndex < xCooSys->getDimension() ) { diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 587700619976..2cec3eb32f89 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1903,7 +1903,7 @@ OUString SvXMLExport::AddEmbeddedXGraphic(uno::Reference<graphic::XGraphic> cons OUString sURL; Graphic aGraphic(rxGraphic); - OUString aOriginURL = aGraphic.getOriginURL(); + const OUString& aOriginURL = aGraphic.getOriginURL(); if (!aOriginURL.isEmpty()) { diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index b7172fb46e6c..67f5a9ce2412 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2919,7 +2919,7 @@ bool XMLTextFieldExport::GetDependentFieldPropertySet( if (aFields.hasElements()) { // get first one and return - Reference<XDependentTextField> xTField = aFields[0]; + const Reference<XDependentTextField>& xTField = aFields[0]; xField.set(xTField, UNO_QUERY); DBG_ASSERT(xField.is(), "Surprisingly, this TextField refuses to be a PropertySet!"); |