summaryrefslogtreecommitdiff
path: root/oox/source/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 13:42:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 14:36:02 +0200
commit81002bc718edad94613b20c2480719979b443b99 (patch)
treea25b6474872505e71c34abedef2e3dfc7ccd6435 /oox/source/helper
parent554370661554652e7be96034e310d6863c700285 (diff)
clang-tidy modernize-pass-by-value in oox
Change-Id: Ia553a24693f2ffc0f580c9869b82f0d01a1a0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/helper')
-rw-r--r--oox/source/helper/graphichelper.cxx5
-rw-r--r--oox/source/helper/modelobjecthelper.cxx5
-rw-r--r--oox/source/helper/storagebase.cxx5
3 files changed, 9 insertions, 6 deletions
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index f327d7eba943..3a4e67acf39a 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -28,6 +28,7 @@
#include <sal/log.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/seqstream.hxx>
+#include <utility>
#include <vcl/wmfexternal.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
@@ -57,9 +58,9 @@ sal_Int32 lclConvertScreenPixelToHmm( double fPixel, double fPixelPerHmm )
} // namespace
-GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& /*rxTargetFrame*/, const StorageRef& rxStorage ) :
+GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& /*rxTargetFrame*/, StorageRef xStorage ) :
mxContext( rxContext ),
- mxStorage( rxStorage )
+ mxStorage(std::move( xStorage ))
{
OSL_ENSURE( mxContext.is(), "GraphicHelper::GraphicHelper - missing component context" );
if( mxContext.is() )
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
index c5115bba3e7c..b68af8084fe0 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
#include <oox/helper/containerhelper.hxx>
+#include <utility>
#include <osl/diagnose.h>
namespace oox {
@@ -37,9 +38,9 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
-ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxModelFactory, const OUString& rServiceName ) :
+ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxModelFactory, OUString aServiceName ) :
mxModelFactory( rxModelFactory ),
- maServiceName( rServiceName ),
+ maServiceName(std::move( aServiceName )),
mnIndex( 0 )
{
OSL_ENSURE( mxModelFactory.is(), "ObjectContainer::ObjectContainer - missing service factory" );
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index 50e7562dc993..46466036316f 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -24,6 +24,7 @@
#include <rtl/ustrbuf.hxx>
#include <oox/helper/binaryinputstream.hxx>
#include <oox/helper/binaryoutputstream.hxx>
+#include <utility>
namespace oox {
@@ -74,9 +75,9 @@ StorageBase::StorageBase( const Reference< XStream >& rxOutStream, bool bBaseStr
OSL_ENSURE( mxOutStream.is(), "StorageBase::StorageBase - missing base output stream" );
}
-StorageBase::StorageBase( const StorageBase& rParentStorage, const OUString& rStorageName, bool bReadOnly ) :
+StorageBase::StorageBase( const StorageBase& rParentStorage, OUString aStorageName, bool bReadOnly ) :
maParentPath( rParentStorage.getPath() ),
- maStorageName( rStorageName ),
+ maStorageName(std::move( aStorageName )),
mbBaseStreamAccess( false ),
mbReadOnly( bReadOnly )
{