From 508c95f1b655d9cfa6be37a5a9de9aff6fd383bf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 18 Jul 2016 09:22:27 +0200 Subject: improve passstuffbyref return analysis Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/drawingml/shape.cxx | 4 ++-- oox/source/ole/axcontrol.cxx | 2 +- oox/source/ole/vbaproject.cxx | 4 ++-- oox/source/shape/ShapeContextHandler.cxx | 14 +++++++------- oox/source/shape/ShapeContextHandler.hxx | 14 +++++++------- 5 files changed, 19 insertions(+), 19 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index fe96550bb0f3..55e429178e1b 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -171,7 +171,7 @@ Shape::~Shape() { } -table::TablePropertiesPtr Shape::getTableProperties() +table::TablePropertiesPtr const & Shape::getTableProperties() { if ( !mpTablePropertiesPtr.get() ) mpTablePropertiesPtr.reset( new table::TableProperties() ); @@ -398,7 +398,7 @@ void Shape::addChildren( } } -Reference< XShape > Shape::createAndInsert( +Reference< XShape > const & Shape::createAndInsert( ::oox::core::XmlFilterBase& rFilterBase, const OUString& rServiceName, const Theme* pTheme, diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 25f505b8dacf..1455d5d51ff9 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2711,7 +2711,7 @@ Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl return xRet; } -Reference< XIndexContainer > EmbeddedForm::createXForm() +Reference< XIndexContainer > const & EmbeddedForm::createXForm() { if( mxFormsSupp.is() ) { diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index 7aa47ce8c4f7..0642a8a5324e 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -235,14 +235,14 @@ Reference< XNameContainer > VbaProject::openLibrary( sal_Int32 nPropId, bool bCr return xLibrary; } -Reference< XNameContainer > VbaProject::createBasicLibrary() +Reference< XNameContainer > const & VbaProject::createBasicLibrary() { if( !mxBasicLib.is() ) mxBasicLib = openLibrary( PROP_BasicLibraries, true ); return mxBasicLib; } -Reference< XNameContainer > VbaProject::createDialogLibrary() +Reference< XNameContainer > const & VbaProject::createDialogLibrary() { if( !mxDialogLib.is() ) mxDialogLib = openLibrary( PROP_DialogLibraries, true ); diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index cf7273768794..44262e93488a 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -78,7 +78,7 @@ ShapeContextHandler::~ShapeContextHandler() { } -uno::Reference ShapeContextHandler::getLockedCanvasContext(sal_Int32 nElement) +uno::Reference const & ShapeContextHandler::getLockedCanvasContext(sal_Int32 nElement) { if (!mxLockedCanvasContext.is()) { @@ -101,7 +101,7 @@ uno::Reference ShapeContextHandler::getLockedCanv /* * This method creates new ChartGraphicDataContext Object. */ -uno::Reference ShapeContextHandler::getChartShapeContext(sal_Int32 nElement) +uno::Reference const & ShapeContextHandler::getChartShapeContext(sal_Int32 nElement) { if (!mxChartShapeContext.is()) { @@ -123,7 +123,7 @@ uno::Reference ShapeContextHandler::getChartShape return mxChartShapeContext; } -uno::Reference ShapeContextHandler::getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement) +uno::Reference const & ShapeContextHandler::getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement) { if (!mxWpsContext.is()) { @@ -149,7 +149,7 @@ uno::Reference ShapeContextHandler::getWpsContext return mxWpsContext; } -uno::Reference ShapeContextHandler::getWpgContext(sal_Int32 nElement) +uno::Reference const & ShapeContextHandler::getWpgContext(sal_Int32 nElement) { if (!mxWpgContext.is()) { @@ -169,7 +169,7 @@ uno::Reference ShapeContextHandler::getWpgContext return mxWpgContext; } -uno::Reference +uno::Reference const & ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) { if (! mxGraphicShapeContext.is()) @@ -198,7 +198,7 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) return mxGraphicShapeContext; } -uno::Reference +uno::Reference const & ShapeContextHandler::getDrawingShapeContext() { if (!mxDrawingFragmentHandler.is()) @@ -225,7 +225,7 @@ ShapeContextHandler::getDrawingShapeContext() return mxDrawingFragmentHandler; } -uno::Reference +uno::Reference const & ShapeContextHandler::getDiagramShapeContext() { if (!mxDiagramShapeContext.is()) diff --git a/oox/source/shape/ShapeContextHandler.hxx b/oox/source/shape/ShapeContextHandler.hxx index 353b7c538777..103a8106bd08 100644 --- a/oox/source/shape/ShapeContextHandler.hxx +++ b/oox/source/shape/ShapeContextHandler.hxx @@ -169,13 +169,13 @@ private: css::uno::Reference mxDrawPage; OUString msRelationFragmentPath; - css::uno::Reference getGraphicShapeContext(::sal_Int32 Element); - css::uno::Reference getChartShapeContext(::sal_Int32 Element); - css::uno::Reference getDrawingShapeContext(); - css::uno::Reference getDiagramShapeContext(); - css::uno::Reference getLockedCanvasContext(sal_Int32 nElement); - css::uno::Reference getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement); - css::uno::Reference getWpgContext(sal_Int32 nElement); + css::uno::Reference const & getGraphicShapeContext(::sal_Int32 Element); + css::uno::Reference const & getChartShapeContext(::sal_Int32 Element); + css::uno::Reference const & getDrawingShapeContext(); + css::uno::Reference const & getDiagramShapeContext(); + css::uno::Reference const & getLockedCanvasContext(sal_Int32 nElement); + css::uno::Reference const & getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement); + css::uno::Reference const & getWpgContext(sal_Int32 nElement); css::uno::Reference getContextHandler(sal_Int32 nElement = 0); }; -- cgit