From 594c422851c991e17ad051b880457d66b404dfdb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 2 Jan 2022 11:11:20 +0200 Subject: use more SvxShape in chart2 Change-Id: I97f57652d2ce17efc9b69e07bbca78c318451f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127858 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/view/main/VLegend.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'chart2/source/view/main/VLegend.cxx') diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index b9d9baa6d209..370093d636e7 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -326,7 +326,7 @@ awt::Size lcl_placeLegendEntries( sal_Int32 nMaxColumnCount=-1; for( sal_Int32 nN=0; nN(aTextShapes.size()); nN++ ) { - Reference< drawing::XShape > xShape( aTextShapes[nN] ); + rtl::Reference xShape( aTextShapes[nN] ); if( !xShape.is() ) continue; awt::Size aSize( xShape->getSize() ); @@ -407,7 +407,7 @@ awt::Size lcl_placeLegendEntries( } if( nEntry < nNumberOfEntries && ( nEntry != 0 || nNumberOfColumns != 1 ) ) { - DrawModelWrapper::removeShape( rEntries[ nEntry ].aSymbol ); + DrawModelWrapper::removeShape( *rEntries[ nEntry ].xSymbol ); rEntries.pop_back(); nNumberOfEntries--; } @@ -441,7 +441,7 @@ awt::Size lcl_placeLegendEntries( } if (aTextShapes.size() == 0) { - DrawModelWrapper::removeShape(rEntries[0].aSymbol); + DrawModelWrapper::removeShape(*rEntries[0].xSymbol); rEntries.pop_back(); nNumberOfEntries--; aRowHeights.pop_back(); @@ -576,7 +576,7 @@ awt::Size lcl_placeLegendEntries( break; // text shape - Reference< drawing::XShape > xTextShape( aTextShapes[nEntry] ); + rtl::Reference xTextShape( aTextShapes[nEntry] ); if( xTextShape.is() ) { awt::Size aTextSize( xTextShape->getSize() ); @@ -587,7 +587,7 @@ awt::Size lcl_placeLegendEntries( } // symbol - Reference< drawing::XShape > xSymbol( rEntries[ nEntry ].aSymbol ); + rtl::Reference & xSymbol( rEntries[ nEntry ].xSymbol ); if( xSymbol.is() ) { awt::Size aSymbolSize( rMaxSymbolExtent ); @@ -635,11 +635,11 @@ awt::Size lcl_placeLegendEntries( awt::Point aPos(0,0); for( sal_Int32 nEntry=0; nEntry xSymbol( rEntries[ nEntry ].aSymbol ); + rtl::Reference & xSymbol( rEntries[ nEntry ].xSymbol ); aPos = xSymbol->getPosition(); aPos.X += nLegendWidth; xSymbol->setPosition( aPos ); - Reference< drawing::XShape > xText( aTextShapes[ nEntry ] ); + rtl::Reference & xText( aTextShapes[ nEntry ] ); aPos = xText->getPosition(); aPos.X += nLegendWidth; xText->setPosition( aPos ); -- cgit