diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-08 11:32:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-08 12:00:06 +0100 |
commit | f3856dfc8a651725644b9705984cc1765df78e83 (patch) | |
tree | 2271828c804c2b4ed63d4fde11ba03944f72f749 /chart2/source | |
parent | 8c518196d6f276a2651aa9720e2bbc69e87b2009 (diff) |
loplugin:reftotemp in chart2
Change-Id: I0ce3c76e873921f04897955b62cc9c4cb15a5a40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176258
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
16 files changed, 33 insertions, 33 deletions
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 95e5a794d245..8c25b54d92bc 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -117,7 +117,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL MinMaxLineWrapper::getPropert void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName, const uno::Any& rValue ) { rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() ); - const std::vector< rtl::Reference< ChartType > > & aTypes = xDiagram->getChartTypes(); + const std::vector< rtl::Reference< ChartType > > aTypes = xDiagram->getChartTypes(); for( rtl::Reference< ChartType > const & xType : aTypes ) { if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK ) diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 3abf2b6b0a6a..2a69b3d3ffe7 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -398,7 +398,7 @@ std::vector< rtl::Reference< ChartType > > rtl::Reference< Diagram > xDiagram = m_xChartDocument->getFirstChartDiagram(); if( xDiagram.is()) { - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq( + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq( xDiagram->getBaseCoordinateSystems()); for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq ) { diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 4876b5ab3ac6..3c058c3ecd1f 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -161,24 +161,24 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI if( !m_xAxis.is() ) return; - const chart2::ScaleData& rScale( m_xAxis->getScaleData() ); - const chart2::IncrementData& rIncrement( rScale.IncrementData ); - const uno::Sequence< chart2::SubIncrement >& rSubIncrements( rScale.IncrementData.SubIncrements ); - const TimeIncrement& rTimeIncrement( rScale.TimeIncrement ); - bool bDateAxis = (rScale.AxisType == chart2::AxisType::DATE); + const chart2::ScaleData aScale( m_xAxis->getScaleData() ); + const chart2::IncrementData& rIncrement( aScale.IncrementData ); + const uno::Sequence< chart2::SubIncrement >& rSubIncrements( aScale.IncrementData.SubIncrements ); + const TimeIncrement& rTimeIncrement( aScale.TimeIncrement ); + bool bDateAxis = (aScale.AxisType == chart2::AxisType::DATE); if( m_pExplicitScale ) bDateAxis = (m_pExplicitScale->AxisType == chart2::AxisType::DATE); switch( nWhichId ) { case SCHATTR_AXIS_AUTO_MAX: - rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(rScale.Maximum) ) ); + rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(aScale.Maximum) ) ); break; case SCHATTR_AXIS_MAX: { double fMax = 10.0; - if( rScale.Maximum >>= fMax ) + if( aScale.Maximum >>= fMax ) rOutItemSet.Put( SvxDoubleItem( fMax, SCHATTR_AXIS_MAX ) ); else { @@ -190,13 +190,13 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI break; case SCHATTR_AXIS_AUTO_MIN: - rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(rScale.Minimum) ) ); + rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(aScale.Minimum) ) ); break; case SCHATTR_AXIS_MIN: { double fMin = 0.0; - if( rScale.Minimum >>= fMin ) + if( aScale.Minimum >>= fMin ) rOutItemSet.Put( SvxDoubleItem( fMin, SCHATTR_AXIS_MIN ) ); else if( m_pExplicitScale ) rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, SCHATTR_AXIS_MIN )); @@ -205,13 +205,13 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_LOGARITHM: { - bool bValue = AxisHelper::isLogarithmic( rScale.Scaling ); + bool bValue = AxisHelper::isLogarithmic( aScale.Scaling ); rOutItemSet.Put( SfxBoolItem( nWhichId, bValue )); } break; case SCHATTR_AXIS_REVERSE: - rOutItemSet.Put( SfxBoolItem( nWhichId, (rScale.Orientation == AxisOrientation_REVERSE) )); + rOutItemSet.Put( SfxBoolItem( nWhichId, (aScale.Orientation == AxisOrientation_REVERSE) )); break; // Increment @@ -316,14 +316,14 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI case SCHATTR_AXIS_AUTO_ORIGIN: { - rOutItemSet.Put( SfxBoolItem( nWhichId, ( !hasDoubleValue(rScale.Origin) ))); + rOutItemSet.Put( SfxBoolItem( nWhichId, ( !hasDoubleValue(aScale.Origin) ))); } break; case SCHATTR_AXIS_ORIGIN: { double fOrigin = 0.0; - if( !(rScale.Origin >>= fOrigin) ) + if( !(aScale.Origin >>= fOrigin) ) { if( m_pExplicitScale ) fOrigin = m_pExplicitScale->Origin; @@ -366,7 +366,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI break; case SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION: - rOutItemSet.Put(SfxBoolItem(nWhichId, rScale.ShiftedCategoryPosition)); + rOutItemSet.Put(SfxBoolItem(nWhichId, aScale.ShiftedCategoryPosition)); break; case SCHATTR_AXIS_LABEL_POSITION: @@ -423,11 +423,11 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI break; case SCHATTR_AXISTYPE: - rOutItemSet.Put( SfxInt32Item( nWhichId, rScale.AxisType )); + rOutItemSet.Put( SfxInt32Item( nWhichId, aScale.AxisType )); break; case SCHATTR_AXIS_AUTO_DATEAXIS: - rOutItemSet.Put( SfxBoolItem( nWhichId, rScale.AutoDateAxis )); + rOutItemSet.Put( SfxBoolItem( nWhichId, aScale.AutoDateAxis )); break; case SCHATTR_AXIS_ALLOW_DATEAXIS: diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 3deda1fc6254..e861b91c58c5 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -232,7 +232,7 @@ rtl::Reference<ChartType> getChartType(const rtl::Reference<ChartModel>& xChartD if (!xDiagram.is()) return nullptr; - const std::vector< rtl::Reference< BaseCoordinateSystem > > & xCooSysSequence( xDiagram->getBaseCoordinateSystems()); + const std::vector< rtl::Reference< BaseCoordinateSystem > > xCooSysSequence( xDiagram->getBaseCoordinateSystems()); if (xCooSysSequence.empty()) return nullptr; diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index e61011ae0a77..b622a2a9b801 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -451,7 +451,7 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons if ( !(pDrawModelWrapper && m_pDrawViewWrapper) ) return; - const Reference< drawing::XDrawPage >& xDrawPage( pDrawModelWrapper->getMainDrawPage() ); + const Reference< drawing::XDrawPage > xDrawPage( pDrawModelWrapper->getMainDrawPage() ); OSL_ASSERT( xDrawPage.is() ); if ( !xDrawPage ) diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 05f78367d66d..7e3e7c15db6b 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -364,8 +364,8 @@ void ShapeController::executeDispatch_TransformDialog() SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog(pChartWindow, pDrawViewWrapper)); - const WhichRangesContainer& pRange = pDlg->GetInputRanges( *aAttr.GetPool() ); - SfxItemSet aCombAttr( *aAttr.GetPool(), pRange ); + const WhichRangesContainer aRange = pDlg->GetInputRanges( *aAttr.GetPool() ); + SfxItemSet aCombAttr( *aAttr.GetPool(), aRange ); aCombAttr.Put( aAttr ); aCombAttr.Put( aGeoAttr ); pDlg->SetInputSet( &aCombAttr ); diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 3e64c0c4b8f8..c6fdd990eb1c 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -409,7 +409,7 @@ rtl::Reference<ChartType> getChartType(const rtl::Reference<ChartModel>& xModel) if (!xDiagram.is()) return nullptr; - const std::vector<rtl::Reference<BaseCoordinateSystem>> & xCooSysSequence(xDiagram->getBaseCoordinateSystems()); + const std::vector<rtl::Reference<BaseCoordinateSystem>> xCooSysSequence(xDiagram->getBaseCoordinateSystems()); if (xCooSysSequence.empty()) return nullptr; diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index bfa8bb73b268..6801c452ec6b 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -225,7 +225,7 @@ rtl::Reference<ChartType> getChartType( const rtl::Reference<::chart::ChartModel>& xModel) { rtl::Reference<Diagram> xDiagram = xModel->getFirstChartDiagram(); - const std::vector< rtl::Reference< BaseCoordinateSystem > > & xCooSysSequence( xDiagram->getBaseCoordinateSystems()); + const std::vector< rtl::Reference< BaseCoordinateSystem > > xCooSysSequence( xDiagram->getBaseCoordinateSystems()); return xCooSysSequence[0]->getChartTypes2()[0]; } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 0049bd735954..025a937e8400 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -563,7 +563,7 @@ void ChartModel::impl_loadGraphics( { try { - const Reference< embed::XStorage >& xGraphicsStorage( + const Reference< embed::XStorage > xGraphicsStorage( xStorage->openStorageElement( u"Pictures"_ustr, embed::ElementModes::READ ) ); diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 8e29af3a70ef..f47a92b58971 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -1023,7 +1023,7 @@ static bool lcl_moveSeriesOrCheckIfMoveIsAllowed( //find position of series. bool bFound = false; - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( rDiagram.getBaseCoordinateSystems() ); + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysList( rDiagram.getBaseCoordinateSystems() ); for( std::size_t nCS = 0; !bFound && nCS < aCooSysList.size(); ++nCS ) { diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index e9ff7c04ca24..3a9c99aa3fdf 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -300,7 +300,7 @@ bool ChartTypeTemplate::matchesTemplate2( try { - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq( + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq( xDiagram->getBaseCoordinateSystems()); // need to have at least one coordinate system diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index 72e818e81395..90233baddfae 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -745,7 +745,7 @@ bool AxisHelper::getIndicesForAxis( const rtl::Reference< Axis >& xAxis, const r rOutDimensionIndex = -1; rOutAxisIndex = -1; - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList = xDiagram->getBaseCoordinateSystems(); + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysList = xDiagram->getBaseCoordinateSystems(); for( std::size_t nC=0; nC < aCooSysList.size(); ++nC ) { if( AxisHelper::getIndicesForAxis( xAxis, aCooSysList[nC], rOutDimensionIndex, rOutAxisIndex ) ) diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index 7e6314b15c69..ed9a114184fd 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -135,7 +135,7 @@ rtl::Reference<ChartType> lcl_getFirstStockChartType( const rtl::Reference<::cha //iterate through all coordinate systems - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( xDiagram->getBaseCoordinateSystems() ); + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysList( xDiagram->getBaseCoordinateSystems() ); for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysList ) { //iterate through all chart types in the current coordinate system @@ -471,7 +471,7 @@ OUString ObjectIdentifier::createParticleForCoordinateSystem( if( xDiagram.is() ) { std::size_t nCooSysIndex = 0; - const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysList( xDiagram->getBaseCoordinateSystems() ); + const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysList( xDiagram->getBaseCoordinateSystems() ); for( ; nCooSysIndex < aCooSysList.size(); ++nCooSysIndex ) { if( xCooSys == aCooSysList[nCooSysIndex] ) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 93128771fb30..c0e45faf99ef 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -401,7 +401,7 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen try { - const uno::Reference< css::beans::XPropertySet >& xPropertySet( + const uno::Reference< css::beans::XPropertySet > xPropertySet( rDataSeries.getPropertiesOfPoint( nPointIndex ) ); if( xPropertySet.is() ) { diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 50264035e316..4b085cde1325 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -921,7 +921,7 @@ constexpr sal_Int32 constPageLayoutFixedDistance = 350; bool getAvailablePosAndSizeForDiagram( CreateShapeParam2D& rParam, const awt::Size & rPageSize, rtl::Reference<Diagram> const& xDiagram) { - uno::Reference<beans::XPropertySet> const& xProp(xDiagram); + uno::Reference<beans::XPropertySet> const xProp(xDiagram); rParam.mbUseFixedInnerSize = false; //@todo: we need a size dependent on the axis labels diff --git a/chart2/source/view/main/ExplicitValueProvider.cxx b/chart2/source/view/main/ExplicitValueProvider.cxx index da35cf539708..5aa8fadcd77d 100644 --- a/chart2/source/view/main/ExplicitValueProvider.cxx +++ b/chart2/source/view/main/ExplicitValueProvider.cxx @@ -46,7 +46,7 @@ bool lcl_getPropertySwapXAndYAxis(const rtl::Reference<Diagram>& xDiagram) if (xDiagram.is()) { - const std::vector<rtl::Reference<BaseCoordinateSystem>>& aCooSysList( + const std::vector<rtl::Reference<BaseCoordinateSystem>> aCooSysList( xDiagram->getBaseCoordinateSystems()); if (!aCooSysList.empty()) { |