From 2d009c405714934ae5f95f4131510cb4e9c2493f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Jul 2022 09:44:20 +0200 Subject: loplugin:moveit Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vbahelper/source/vbahelper/vbashape.cxx | 2 +- vbahelper/source/vbahelper/vbashapes.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index faab903524c2..fead96292774 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -540,7 +540,7 @@ ScVbaShape::ShapeRange( const uno::Any& index ) XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec aVec; aVec.push_back( m_xShape ); - uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( aVec ) ); + uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( std::move(aVec) ) ); uno::Reference< container::XChild > xChild( m_xShape, uno::UNO_QUERY_THROW ); // #FIXME for want of a better parent, setting this uno::Reference< msforms::XShapeRange > xShapeRange( new ScVbaShapeRange( mxParent, mxContext, xIndexAccess, uno::Reference< drawing::XDrawPage >( xChild->getParent(), uno::UNO_QUERY_THROW ), m_xModel ) ); diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index d75a9874e448..02630a75c520 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -83,7 +83,7 @@ void ScVbaShapes::initBaseCollection() aShapes.reserve( nLen ); for ( sal_Int32 index=0; indexgetByIndex( index ) , uno::UNO_QUERY ); - uno::Reference< container::XIndexAccess > xShapes( new XNamedObjectCollectionHelper< drawing::XShape >( aShapes ) ); + uno::Reference< container::XIndexAccess > xShapes( new XNamedObjectCollectionHelper< drawing::XShape >( std::move(aShapes) ) ); m_xIndexAccess = xShapes; m_xNameAccess.set( xShapes, uno::UNO_QUERY ); } @@ -167,7 +167,7 @@ ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index ) if ( xShape.is() ) aShapes.push_back( xShape ); } - uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( aShapes ) ); + uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( std::move(aShapes) ) ); return xIndexAccess; } -- cgit