summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-27 10:11:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-27 13:40:26 +0200
commiteea6b27762cdd5f831f4a83b8c5d2979652aab03 (patch)
tree7bd5abed3f67eb8156df80496f7af3988e90780f
parent35ca93f7892e8f19b871f7f687a9f7e4933a65ad (diff)
clang-tidy modernize-pass-by-value in ucbhelper
Change-Id: I9f73760a800bee5a810add9ee0ebed3a778ddd8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136475 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/ucbhelper/contenthelper.hxx6
-rw-r--r--include/ucbhelper/providerhelper.hxx2
-rw-r--r--include/ucbhelper/resultsethelper.hxx6
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx15
-rw-r--r--ucbhelper/source/provider/contentinfo.cxx9
-rw-r--r--ucbhelper/source/provider/contentinfo.hxx4
-rw-r--r--ucbhelper/source/provider/interactionrequest.cxx5
-rw-r--r--ucbhelper/source/provider/providerhelper.cxx5
-rw-r--r--ucbhelper/source/provider/resultset.cxx19
-rw-r--r--ucbhelper/source/provider/resultsethelper.cxx9
10 files changed, 43 insertions, 37 deletions
diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx
index 3f269e475d4a..b5906402cc52 100644
--- a/include/ucbhelper/contenthelper.hxx
+++ b/include/ucbhelper/contenthelper.hxx
@@ -293,9 +293,9 @@ public:
* @param Identifier is the content identifier for the content.
*/
ContentImplHelper(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const rtl::Reference< ContentProviderImplHelper >& rxProvider,
- const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier );
+ css::uno::Reference< css::uno::XComponentContext > xContext,
+ rtl::Reference< ContentProviderImplHelper > xProvider,
+ css::uno::Reference< css::ucb::XContentIdentifier > Identifier );
/**
* Destructor.
diff --git a/include/ucbhelper/providerhelper.hxx b/include/ucbhelper/providerhelper.hxx
index 550da6c0ec13..36daec868049 100644
--- a/include/ucbhelper/providerhelper.hxx
+++ b/include/ucbhelper/providerhelper.hxx
@@ -130,7 +130,7 @@ public:
ContentProviderImplHelper(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~ContentProviderImplHelper() override;
diff --git a/include/ucbhelper/resultsethelper.hxx b/include/ucbhelper/resultsethelper.hxx
index 486d07fe5f89..31f96790581a 100644
--- a/include/ucbhelper/resultsethelper.hxx
+++ b/include/ucbhelper/resultsethelper.hxx
@@ -118,9 +118,9 @@ public:
* this resultset.
*/
ResultSetImplHelper(
- const css::uno::Reference<
- css::uno::XComponentContext >& rxContext,
- const css::ucb::OpenCommandArgument2& rCommand );
+ css::uno::Reference<
+ css::uno::XComponentContext > xContext,
+ css::ucb::OpenCommandArgument2 aCommand );
/**
* Destructor.
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index 75d0a8479860..3a8b8f19a604 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -43,6 +43,7 @@
#include <rtl/ref.hxx>
#include <unordered_map>
+#include <utility>
using namespace com::sun::star;
@@ -124,14 +125,14 @@ using namespace ucbhelper_impl;
namespace ucbhelper {
ContentImplHelper::ContentImplHelper(
- const uno::Reference< uno::XComponentContext >& rxContext,
- const rtl::Reference< ContentProviderImplHelper >& rxProvider,
- const uno::Reference<
- css::ucb::XContentIdentifier >& Identifier )
+ uno::Reference< uno::XComponentContext > xContext,
+ rtl::Reference< ContentProviderImplHelper > xProvider,
+ uno::Reference<
+ css::ucb::XContentIdentifier > Identifier )
: m_pImpl( new ContentImplHelper_Impl ),
- m_xContext( rxContext ),
- m_xIdentifier( Identifier ),
- m_xProvider( rxProvider ),
+ m_xContext(std::move( xContext )),
+ m_xIdentifier(std::move( Identifier )),
+ m_xProvider(std::move( xProvider )),
m_nCommandId( 0 )
{
}
diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx
index b5ca80b79d0b..561a80e77e1c 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <ucbhelper/contenthelper.hxx>
+#include <utility>
#include "contentinfo.hxx"
using namespace com::sun::star;
@@ -39,9 +40,9 @@ using namespace com::sun::star;
namespace ucbhelper {
PropertySetInfo::PropertySetInfo(
- const uno::Reference< css::ucb::XCommandEnvironment >& rxEnv,
+ uno::Reference< css::ucb::XCommandEnvironment > xEnv,
ContentImplHelper* pContent )
-: m_xEnv( rxEnv ),
+: m_xEnv(std::move( xEnv )),
m_pContent( pContent )
{
}
@@ -170,9 +171,9 @@ bool PropertySetInfo::queryProperty(
CommandProcessorInfo::CommandProcessorInfo(
- const uno::Reference< css::ucb::XCommandEnvironment >& rxEnv,
+ uno::Reference< css::ucb::XCommandEnvironment > xEnv,
ContentImplHelper* pContent )
-: m_xEnv( rxEnv ),
+: m_xEnv(std::move( xEnv )),
m_pContent( pContent )
{
}
diff --git a/ucbhelper/source/provider/contentinfo.hxx b/ucbhelper/source/provider/contentinfo.hxx
index 9223848321ac..b24a291ccbf3 100644
--- a/ucbhelper/source/provider/contentinfo.hxx
+++ b/ucbhelper/source/provider/contentinfo.hxx
@@ -58,7 +58,7 @@ private:
const css::uno::Sequence< css::beans::Property > & getPropertiesImpl();
public:
- PropertySetInfo( const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv,
+ PropertySetInfo( css::uno::Reference< css::ucb::XCommandEnvironment > xEnv,
ContentImplHelper* pContent );
virtual ~PropertySetInfo() override;
@@ -97,7 +97,7 @@ private:
const css::uno::Sequence< css::ucb::CommandInfo > & getCommandsImpl();
public:
- CommandProcessorInfo( const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv,
+ CommandProcessorInfo( css::uno::Reference< css::ucb::XCommandEnvironment > xEnv,
ContentImplHelper* pContent );
virtual ~CommandProcessorInfo() override;
diff --git a/ucbhelper/source/provider/interactionrequest.cxx b/ucbhelper/source/provider/interactionrequest.cxx
index 95ed4199426e..1bee1771093f 100644
--- a/ucbhelper/source/provider/interactionrequest.cxx
+++ b/ucbhelper/source/provider/interactionrequest.cxx
@@ -29,6 +29,7 @@
#include <osl/diagnose.h>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
+#include <utility>
using namespace com::sun::star;
using namespace ucbhelper;
@@ -49,8 +50,8 @@ struct InteractionRequest_Impl
css::task::XInteractionContinuation > > m_aContinuations;
InteractionRequest_Impl() {}
- explicit InteractionRequest_Impl( const uno::Any & rRequest )
- : m_aRequest( rRequest ) {}
+ explicit InteractionRequest_Impl( uno::Any aRequest )
+ : m_aRequest(std::move( aRequest )) {}
};
}
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index c0bbc86166c2..a15ba5457b82 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -36,6 +36,7 @@
#include <cppuhelper/weakref.hxx>
#include <unordered_map>
+#include <utility>
using namespace com::sun::star;
@@ -60,9 +61,9 @@ struct ContentProviderImplHelper_Impl
namespace ucbhelper {
ContentProviderImplHelper::ContentProviderImplHelper(
- const uno::Reference< uno::XComponentContext >& rxContext )
+ uno::Reference< uno::XComponentContext > xContext )
: m_pImpl( new ucbhelper_impl::ContentProviderImplHelper_Impl ),
- m_xContext( rxContext )
+ m_xContext(std::move( xContext ))
{
}
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index eff10d5d253c..ff89def37253 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -33,6 +33,7 @@
#include <ucbhelper/resultset.hxx>
#include <ucbhelper/resultsetmetadata.hxx>
#include <ucbhelper/macros.hxx>
+#include <utility>
#include <osl/diagnose.h>
using namespace com::sun::star;
@@ -154,21 +155,21 @@ struct ResultSet_Impl
bool m_bAfterLast;
inline ResultSet_Impl(
- const uno::Reference< uno::XComponentContext >& rxContext,
+ uno::Reference< uno::XComponentContext > xContext,
const uno::Sequence< beans::Property >& rProperties,
- const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
- const uno::Reference< css::ucb::XCommandEnvironment >& rxEnv );
+ rtl::Reference< ResultSetDataSupplier > xDataSupplier,
+ uno::Reference< css::ucb::XCommandEnvironment > xEnv );
};
inline ResultSet_Impl::ResultSet_Impl(
- const uno::Reference< uno::XComponentContext >& rxContext,
+ uno::Reference< uno::XComponentContext > xContext,
const uno::Sequence< beans::Property >& rProperties,
- const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
- const uno::Reference< css::ucb::XCommandEnvironment >& rxEnv )
-: m_xContext( rxContext ),
- m_xEnv( rxEnv ),
+ rtl::Reference< ResultSetDataSupplier > xDataSupplier,
+ uno::Reference< css::ucb::XCommandEnvironment > xEnv )
+: m_xContext(std::move( xContext )),
+ m_xEnv(std::move( xEnv )),
m_aProperties( rProperties ),
- m_xDataSupplier( rDataSupplier ),
+ m_xDataSupplier(std::move( xDataSupplier )),
m_nPos( 0 ), // Position is one-based. Zero means: before first element.
m_bWasNull( false ),
m_bAfterLast( false )
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx
index 60f8977d1852..5e96204df0e5 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/ucb/XSourceInitialization.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <ucbhelper/resultsethelper.hxx>
+#include <utility>
#include <osl/diagnose.h>
@@ -47,12 +48,12 @@ namespace ucbhelper {
ResultSetImplHelper::ResultSetImplHelper(
- const uno::Reference< uno::XComponentContext >& rxContext,
- const css::ucb::OpenCommandArgument2& rCommand )
+ uno::Reference< uno::XComponentContext > xContext,
+ css::ucb::OpenCommandArgument2 aCommand )
: m_bStatic( false ),
m_bInitDone( false ),
- m_aCommand( rCommand ),
- m_xContext( rxContext )
+ m_aCommand(std::move( aCommand )),
+ m_xContext(std::move( xContext ))
{
}