comphelper/source/container/container.cxx                         |    5 ++-
 comphelper/source/container/enumhelper.cxx                        |   15 
+++++-----
 comphelper/source/eventattachermgr/eventattachermgr.cxx           |   13 
++++----
 comphelper/source/misc/backupfilehelper.cxx                       |    9 +++---
 comphelper/source/misc/instancelocker.cxx                         |   13 
++++----
 comphelper/source/misc/instancelocker.hxx                         |    6 ++--
 comphelper/source/misc/interaction.cxx                            |    9 +++---
 comphelper/source/misc/mimeconfighelper.cxx                       |    5 ++-
 comphelper/source/misc/officerestartmanager.hxx                   |    5 ++-
 comphelper/source/misc/stillreadwriteinteraction.cxx              |    5 ++-
 comphelper/source/misc/string.cxx                                 |    3 +-
 comphelper/source/misc/threadpool.cxx                             |    5 ++-
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |    5 ++-
 comphelper/source/officeinstdir/officeinstallationdirectories.hxx |    2 -
 comphelper/source/property/propertycontainerhelper.cxx            |    3 +-
 comphelper/source/property/propertysethelper.cxx                  |    5 ++-
 comphelper/source/streaming/seekableinput.cxx                     |    9 +++---
 include/comphelper/SetFlagContextHelper.hxx                       |    8 ++---
 include/comphelper/anycompare.hxx                                 |    5 ++-
 include/comphelper/asyncnotification.hxx                          |    5 ++-
 include/comphelper/container.hxx                                  |    2 -
 include/comphelper/enumhelper.hxx                                 |    6 ++--
 include/comphelper/interaction.hxx                                |    4 +-
 include/comphelper/mimeconfighelper.hxx                           |    2 -
 include/comphelper/propertysethelper.hxx                          |    2 -
 include/comphelper/propertysetinfo.hxx                            |    4 +-
 include/comphelper/seekableinput.hxx                              |    4 +-
 include/comphelper/stillreadwriteinteraction.hxx                  |    2 -
 include/comphelper/string.hxx                                     |    2 -
 include/comphelper/threadpool.hxx                                 |    2 -
 include/comphelper/traceevent.hxx                                 |    5 ++-
 include/comphelper/unique_disposing_ptr.hxx                       |    5 ++-
 include/comphelper/weakeventlistener.hxx                          |    5 ++-
 33 files changed, 100 insertions(+), 80 deletions(-)

New commits:
commit 24c709655e5c1ca51c6c6da7ef0cb733354f6d20
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 26 09:30:35 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 26 10:31:44 2022 +0200

    clang-tidy modernize-pass-by-value in comphelper
    
    Change-Id: I29074d801eaef57f160ce14b943b21831b327ecf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134979
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/container/container.cxx 
b/comphelper/source/container/container.cxx
index 1a6132e0d65a..7b2432723360 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/container/XChild.hpp>
 #include <comphelper/container.hxx>
 #include <o3tl/any.hxx>
+#include <utility>
 #include <osl/diagnose.h>
 
 
@@ -29,8 +30,8 @@ namespace comphelper
 {
 
 
-IndexAccessIterator::IndexAccessIterator(css::uno::Reference< 
css::uno::XInterface> const & xStartingPoint)
-    :m_xStartingPoint(xStartingPoint)
+IndexAccessIterator::IndexAccessIterator(css::uno::Reference< 
css::uno::XInterface> xStartingPoint)
+    :m_xStartingPoint(std::move(xStartingPoint))
 {
     OSL_ENSURE(m_xStartingPoint.is(), 
"IndexAccessIterator::IndexAccessIterator : no starting point !");
 }
diff --git a/comphelper/source/container/enumhelper.cxx 
b/comphelper/source/container/enumhelper.cxx
index b5fe864c8820..bc9ae43e44ad 100644
--- a/comphelper/source/container/enumhelper.cxx
+++ b/comphelper/source/container/enumhelper.cxx
@@ -21,13 +21,14 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
+#include <utility>
 
 namespace comphelper
 {
 
-OEnumerationByName::OEnumerationByName(const 
css::uno::Reference<css::container::XNameAccess>& _rxAccess)
-    :m_aNames(_rxAccess->getElementNames())
-    ,m_xAccess(_rxAccess)
+OEnumerationByName::OEnumerationByName(css::uno::Reference<css::container::XNameAccess>
 _xAccess)
+    :m_aNames(_xAccess->getElementNames())
+    ,m_xAccess(_xAccess)
     ,m_nPos(0)
     ,m_bListening(false)
 {
@@ -35,10 +36,10 @@ OEnumerationByName::OEnumerationByName(const 
css::uno::Reference<css::container:
 }
 
 
-OEnumerationByName::OEnumerationByName(const 
css::uno::Reference<css::container::XNameAccess>& _rxAccess,
+OEnumerationByName::OEnumerationByName(const 
css::uno::Reference<css::container::XNameAccess> _xAccess,
                                        std::vector<OUString> _aNames  )
     :m_aNames(std::move(_aNames))
-    ,m_xAccess(_rxAccess)
+    ,m_xAccess(std::move(_xAccess))
     ,m_nPos(0)
     ,m_bListening(false)
 {
@@ -147,8 +148,8 @@ const OUString& OEnumerationByName::getElement(sal_Int32 
nIndex) const
 }
 
 
-OEnumerationByIndex::OEnumerationByIndex(const css::uno::Reference< 
css::container::XIndexAccess >& _rxAccess)
-    :m_xAccess(_rxAccess)
+OEnumerationByIndex::OEnumerationByIndex(css::uno::Reference< 
css::container::XIndexAccess > _xAccess)
+    :m_xAccess(std::move(_xAccess))
     ,m_nPos(0)
     ,m_bListening(false)
 {
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx 
b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index a08c6cf4777a..1c9f1a23cdc6 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -49,6 +49,7 @@
 
 #include <deque>
 #include <algorithm>
+#include <utility>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::io;
@@ -140,8 +141,8 @@ class AttacherAllListener_Impl : public WeakImplHelper< 
XAllListener >
     /// @throws CannotConvertException
     void convertToEventReturn( Any & rRet, const Type & rRetType );
 public:
-    AttacherAllListener_Impl( ImplEventAttacherManager* pManager_, const 
OUString &rScriptType_,
-                                const OUString & rScriptCode_ );
+    AttacherAllListener_Impl( ImplEventAttacherManager* pManager_, OUString 
aScriptType_,
+                                OUString aScriptCode_ );
 
     // Methods of XAllListener
     virtual void SAL_CALL firing(const AllEventObject& Event) override;
@@ -156,12 +157,12 @@ public:
 AttacherAllListener_Impl::AttacherAllListener_Impl
 (
     ImplEventAttacherManager*   pManager_,
-    const OUString &             rScriptType_,
-    const OUString &             rScriptCode_
+    OUString              aScriptType_,
+    OUString              aScriptCode_
 )
     : mxManager( pManager_ )
-    , aScriptType( rScriptType_ )
-    , aScriptCode( rScriptCode_ )
+    , aScriptType(std::move( aScriptType_ ))
+    , aScriptCode(std::move( aScriptCode_ ))
 {
 }
 
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 22bd5c5a851f..d225b9f301d9 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -19,6 +19,7 @@
 #include <deque>
 #include <memory>
 #include <string_view>
+#include <utility>
 #include <vector>
 #include <zlib.h>
 
@@ -221,8 +222,8 @@ namespace
         {
         }
 
-        ExtensionInfoEntry(const OString& rName, bool bEnabled)
-        :   maName(rName),
+        ExtensionInfoEntry(OString aName, bool bEnabled)
+        :   maName(std::move(aName)),
             maRepository(USER),
             mbEnabled(bEnabled)
         {
@@ -995,13 +996,13 @@ namespace
         PackedFileEntry(
             sal_uInt32 nFullFileSize,
             sal_uInt32 nCrc32,
-            FileSharedPtr const & rFile,
+            FileSharedPtr xFile,
             bool bDoCompress)
         :   mnFullFileSize(nFullFileSize),
             mnPackFileSize(nFullFileSize),
             mnOffset(0),
             mnCrc32(nCrc32),
-            maFile(rFile),
+            maFile(std::move(xFile)),
             mbDoCompress(bDoCompress)
         {
         }
diff --git a/comphelper/source/misc/instancelocker.cxx 
b/comphelper/source/misc/instancelocker.cxx
index 2b1e89604e6a..84c8054ecbb8 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -30,6 +30,7 @@
 #include <com/sun/star/frame/DoubleInitializationException.hpp>
 #include <com/sun/star/embed/Actions.hpp>
 #include <com/sun/star/embed/XActionsApproval.hpp>
+#include <utility>
 
 #include "instancelocker.hxx"
 
@@ -188,13 +189,13 @@ uno::Sequence< OUString > SAL_CALL 
OInstanceLocker::getSupportedServiceNames()
 // OLockListener
 
 
-OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& 
xWrapper,
-                    const uno::Reference< uno::XInterface >& xInstance,
+OLockListener::OLockListener( uno::WeakReference< lang::XComponent > xWrapper,
+                    uno::Reference< uno::XInterface > xInstance,
                     sal_Int32 nMode,
-                    const uno::Reference< embed::XActionsApproval >& rApproval 
)
-: m_xInstance( xInstance )
-, m_xApproval( rApproval )
-, m_xWrapper( xWrapper )
+                    uno::Reference< embed::XActionsApproval > xApproval )
+: m_xInstance(std::move( xInstance ))
+, m_xApproval(std::move( xApproval ))
+, m_xWrapper(std::move( xWrapper ))
 , m_bDisposed( false )
 , m_bInitialized( false )
 , m_nMode( nMode )
diff --git a/comphelper/source/misc/instancelocker.hxx 
b/comphelper/source/misc/instancelocker.hxx
index 7391c5d7d365..6a050c7f437c 100644
--- a/comphelper/source/misc/instancelocker.hxx
+++ b/comphelper/source/misc/instancelocker.hxx
@@ -85,10 +85,10 @@ class OLockListener : public ::cppu::WeakImplHelper< 
css::util::XCloseListener,
     sal_Int32 m_nMode;
 
 public:
-    OLockListener(  const css::uno::WeakReference< css::lang::XComponent >& 
xWrapper,
-                    const css::uno::Reference< css::uno::XInterface >& 
xInstance,
+    OLockListener(  css::uno::WeakReference< css::lang::XComponent > xWrapper,
+                    css::uno::Reference< css::uno::XInterface > xInstance,
                     sal_Int32 nMode,
-                    const css::uno::Reference< css::embed::XActionsApproval >& 
rApproval );
+                    css::uno::Reference< css::embed::XActionsApproval > 
xApproval );
 
     virtual ~OLockListener() override;
 
diff --git a/comphelper/source/misc/interaction.cxx 
b/comphelper/source/misc/interaction.cxx
index e1fd64d9b04b..9e7b1706d111 100644
--- a/comphelper/source/misc/interaction.cxx
+++ b/comphelper/source/misc/interaction.cxx
@@ -20,6 +20,7 @@
 #include <comphelper/interaction.hxx>
 
 #include <comphelper/sequence.hxx>
+#include <utility>
 #include <osl/diagnose.h>
 
 
@@ -30,14 +31,14 @@ namespace comphelper
     using namespace ::com::sun::star::uno;
     using namespace ::com::sun::star::task;
 
-    OInteractionRequest::OInteractionRequest(const Any& _rRequestDescription)
-        :m_aRequest(_rRequestDescription)
+    OInteractionRequest::OInteractionRequest(Any _aRequestDescription)
+        :m_aRequest(std::move(_aRequestDescription))
     {
     }
 
-    OInteractionRequest::OInteractionRequest(const Any& rRequestDescription,
+    OInteractionRequest::OInteractionRequest(Any aRequestDescription,
             std::vector<Reference<XInteractionContinuation>>&& rContinuations)
-        : m_aRequest(rRequestDescription)
+        : m_aRequest(std::move(aRequestDescription))
         , m_aContinuations(std::move(rContinuations))
     {
     }
diff --git a/comphelper/source/misc/mimeconfighelper.cxx 
b/comphelper/source/misc/mimeconfighelper.cxx
index 3b234b6591ae..7f402b6351ec 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -33,14 +33,15 @@
 #include <comphelper/documentconstants.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <rtl/ustrbuf.hxx>
+#include <utility>
 
 
 using namespace ::com::sun::star;
 using namespace comphelper;
 
 
-MimeConfigurationHelper::MimeConfigurationHelper( const uno::Reference< 
uno::XComponentContext >& rxContext )
-: m_xContext( rxContext )
+MimeConfigurationHelper::MimeConfigurationHelper( uno::Reference< 
uno::XComponentContext > xContext )
+: m_xContext(std::move( xContext ))
 {
     if ( !m_xContext.is() )
         throw uno::RuntimeException();
diff --git a/comphelper/source/misc/officerestartmanager.hxx 
b/comphelper/source/misc/officerestartmanager.hxx
index 8b3658a8e892..bc95668b9399 100644
--- a/comphelper/source/misc/officerestartmanager.hxx
+++ b/comphelper/source/misc/officerestartmanager.hxx
@@ -26,6 +26,7 @@
 
 #include <osl/mutex.hxx>
 #include <cppuhelper/implbase.hxx>
+#include <utility>
 
 namespace comphelper
 {
@@ -41,8 +42,8 @@ class OOfficeRestartManager : public ::cppu::WeakImplHelper< 
css::task::XRestart
     bool m_bRestartRequested;
 
 public:
-    explicit OOfficeRestartManager( const css::uno::Reference< 
css::uno::XComponentContext >& xContext )
-    : m_xContext( xContext )
+    explicit OOfficeRestartManager( css::uno::Reference< 
css::uno::XComponentContext > xContext )
+    : m_xContext(std::move( xContext ))
     , m_bOfficeInitialized( false )
     , m_bRestartRequested( false )
     {}
diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx 
b/comphelper/source/misc/stillreadwriteinteraction.cxx
index 7bf48b2d97b2..88bc25bc46cb 100644
--- a/comphelper/source/misc/stillreadwriteinteraction.cxx
+++ b/comphelper/source/misc/stillreadwriteinteraction.cxx
@@ -30,14 +30,15 @@
 #include <com/sun/star/ucb/AuthenticationRequest.hpp>
 
 #include <com/sun/star/ucb/CertificateValidationRequest.hpp>
+#include <utility>
 
 namespace comphelper{
 
 StillReadWriteInteraction::StillReadWriteInteraction(const 
css::uno::Reference< css::task::XInteractionHandler >& xHandler,
-                                                     const 
css::uno::Reference< css::task::XInteractionHandler >& xAuxiliaryHandler)
+                                                     css::uno::Reference< 
css::task::XInteractionHandler > xAuxiliaryHandler)
              : m_bUsed                    (false)
              , m_bHandledByMySelf         (false)
-             , m_xAuxiliaryHandler(xAuxiliaryHandler)
+             , m_xAuxiliaryHandler(std::move(xAuxiliaryHandler))
 {
     std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > 
lInterceptions;
     lInterceptions.reserve(4);
diff --git a/comphelper/source/misc/string.cxx 
b/comphelper/source/misc/string.cxx
index 0041f53d153d..979964f17552 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -21,6 +21,7 @@
 
 #include <cstddef>
 #include <string_view>
+#include <utility>
 #include <vector>
 #include <algorithm>
 
@@ -495,7 +496,7 @@ sal_Int32 compareNatural( const OUString & rLHS, const 
OUString & rRHS,
 
 NaturalStringSorter::NaturalStringSorter(
     const uno::Reference< uno::XComponentContext > &rContext,
-    const lang::Locale &rLocale) : m_aLocale(rLocale)
+    lang::Locale aLocale) : m_aLocale(std::move(aLocale))
 {
     m_xCollator = i18n::Collator::create( rContext );
     m_xCollator->loadDefaultCollator(m_aLocale, 0);
diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index 48ff4af2d7c6..00fee7d8eb59 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -19,6 +19,7 @@
 #include <thread>
 #include <chrono>
 #include <comphelper/debuggerinfo.hxx>
+#include <utility>
 
 #if defined HAVE_VALGRIND_HEADERS
 #include <valgrind/memcheck.h>
@@ -304,8 +305,8 @@ bool ThreadPool::isTaskTagDone(const 
std::shared_ptr<ThreadTaskTag>& pTag)
     return pTag->isDone();
 }
 
-ThreadTask::ThreadTask(const std::shared_ptr<ThreadTaskTag>& pTag)
-    : mpTag(pTag)
+ThreadTask::ThreadTask(std::shared_ptr<ThreadTaskTag> xTag)
+    : mpTag(std::move(xTag))
 {
 }
 
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx 
b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index fb0359a748f7..4cb3eb5e3702 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -30,6 +30,7 @@
 #include <osl/file.hxx>
 #include <com/sun/star/util/theMacroExpander.hpp>
 #include <comphelper/fileurl.hxx>
+#include <utility>
 
 #include "officeinstallationdirectories.hxx"
 
@@ -78,8 +79,8 @@ constexpr OUStringLiteral 
g_aOfficeBrandDirMacro(u"$(brandbaseurl)");
 constexpr OUStringLiteral g_aUserDirMacro(u"$(userdataurl)");
 
 OfficeInstallationDirectories::OfficeInstallationDirectories(
-        const uno::Reference< uno::XComponentContext > & xCtx )
-: m_xCtx( xCtx )
+        uno::Reference< uno::XComponentContext > xCtx )
+: m_xCtx(std::move( xCtx ))
 {
 }
 
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx 
b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
index f3546831f408..cc0881c236fd 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
@@ -41,7 +41,7 @@ class OfficeInstallationDirectories : public cppu::BaseMutex, 
public UnoImplBase
 {
 public:
     explicit OfficeInstallationDirectories(
-        const css::uno::Reference< css::uno::XComponentContext > & xCtx );
+        css::uno::Reference< css::uno::XComponentContext > xCtx );
     virtual ~OfficeInstallationDirectories() override;
 
     // XOfficeInstallationDirectories
diff --git a/comphelper/source/property/propertycontainerhelper.cxx 
b/comphelper/source/property/propertycontainerhelper.cxx
index 5fd6053ce100..7ff224bec741 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/beans/UnknownPropertyException.hpp>
 
 #include <algorithm>
+#include <utility>
 
 
 namespace comphelper
@@ -51,7 +52,7 @@ namespace
     struct PropertyDescriptionNameMatch
     {
         OUString const m_rCompare;
-        explicit PropertyDescriptionNameMatch( const OUString& _rCompare ) : 
m_rCompare( _rCompare ) { }
+        explicit PropertyDescriptionNameMatch( OUString _aCompare ) : 
m_rCompare(std::move( _aCompare )) { }
 
         bool operator() (const PropertyDescription& x ) const
         {
diff --git a/comphelper/source/property/propertysethelper.cxx 
b/comphelper/source/property/propertysethelper.cxx
index 1568aca9b49d..519b0705fadd 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -23,6 +23,7 @@
 #include <rtl/ref.hxx>
 
 #include <memory>
+#include <utility>
 
 using namespace ::comphelper;
 using namespace ::com::sun::star;
@@ -41,8 +42,8 @@ static PropertyMapEntry const * find( const 
rtl::Reference<PropertySetInfo>& mxI
 }
 
 
-PropertySetHelper::PropertySetHelper( 
rtl::Reference<comphelper::PropertySetInfo> const & xInfo ) noexcept
-    : mxInfo(xInfo)
+PropertySetHelper::PropertySetHelper( 
rtl::Reference<comphelper::PropertySetInfo> xInfo ) noexcept
+    : mxInfo(std::move(xInfo))
 {
 }
 
diff --git a/comphelper/source/streaming/seekableinput.cxx 
b/comphelper/source/streaming/seekableinput.cxx
index bd30aa354620..3508f933ee26 100644
--- a/comphelper/source/streaming/seekableinput.cxx
+++ b/comphelper/source/streaming/seekableinput.cxx
@@ -26,6 +26,7 @@
 
 
 #include <comphelper/seekableinput.hxx>
+#include <utility>
 
 using namespace ::com::sun::star;
 
@@ -57,10 +58,10 @@ static void copyInputToOutput_Impl( const uno::Reference< 
io::XInputStream >& xI
 
 
 OSeekableInputWrapper::OSeekableInputWrapper(
-            const uno::Reference< io::XInputStream >& xInStream,
-            const uno::Reference< uno::XComponentContext >& rxContext )
-: m_xContext( rxContext )
-, m_xOriginalStream( xInStream )
+            uno::Reference< io::XInputStream > xInStream,
+            uno::Reference< uno::XComponentContext > xContext )
+: m_xContext(std::move( xContext ))
+, m_xOriginalStream(std::move( xInStream ))
 {
     if ( !m_xContext.is() )
         throw uno::RuntimeException();
diff --git a/include/comphelper/SetFlagContextHelper.hxx 
b/include/comphelper/SetFlagContextHelper.hxx
index 1f1e2743cea9..b1b15eabba26 100644
--- a/include/comphelper/SetFlagContextHelper.hxx
+++ b/include/comphelper/SetFlagContextHelper.hxx
@@ -13,6 +13,7 @@
 #include <com/sun/star/uno/XCurrentContext.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <uno/current_context.hxx>
+#include <utility>
 
 namespace comphelper
 {
@@ -20,10 +21,9 @@ namespace comphelper
 class SetFlagContext final : public 
cppu::WeakImplHelper<css::uno::XCurrentContext>
 {
 public:
-    explicit SetFlagContext(const OUString& sName,
-                            css::uno::Reference<css::uno::XCurrentContext> 
const& xContext)
-        : m_sName(sName)
-        , mxNextContext(xContext)
+    explicit SetFlagContext(OUString sName, 
css::uno::Reference<css::uno::XCurrentContext> xContext)
+        : m_sName(std::move(sName))
+        , mxNextContext(std::move(xContext))
     {
     }
     SetFlagContext(const SetFlagContext&) = delete;
diff --git a/include/comphelper/anycompare.hxx 
b/include/comphelper/anycompare.hxx
index 782c7f19951f..3618106db34f 100644
--- a/include/comphelper/anycompare.hxx
+++ b/include/comphelper/anycompare.hxx
@@ -28,6 +28,7 @@
 #include <comphelper/extract.hxx>
 
 #include <memory>
+#include <utility>
 
 
 namespace comphelper
@@ -103,8 +104,8 @@ namespace comphelper
     class StringCollationPredicateLess final : public IKeyPredicateLess
     {
     public:
-        StringCollationPredicateLess( css::uno::Reference< 
css::i18n::XCollator > const & i_collator )
-            :m_collator( i_collator )
+        StringCollationPredicateLess( css::uno::Reference< 
css::i18n::XCollator >  i_collator )
+            :m_collator(std::move( i_collator ))
         {
         }
 
diff --git a/include/comphelper/asyncnotification.hxx 
b/include/comphelper/asyncnotification.hxx
index 891495319c27..ea6b067ccd94 100644
--- a/include/comphelper/asyncnotification.hxx
+++ b/include/comphelper/asyncnotification.hxx
@@ -28,6 +28,7 @@
 #include <salhelper/thread.hxx>
 #include <salhelper/simplereferenceobject.hxx>
 #include <memory>
+#include <utility>
 
 namespace comphelper
 {
@@ -207,8 +208,8 @@ namespace comphelper
         EventObjectType const m_aEvent;
 
     public:
-        EventHolder( const EventObjectType& _rEvent )
-            :m_aEvent( _rEvent )
+        EventHolder( EventObjectType _aEvent )
+            :m_aEvent(std::move( _aEvent ))
         {
         }
 
diff --git a/include/comphelper/container.hxx b/include/comphelper/container.hxx
index 03a7e96de77c..84acfc5b0fc5 100644
--- a/include/comphelper/container.hxx
+++ b/include/comphelper/container.hxx
@@ -47,7 +47,7 @@ protected:
         // That is the path from the root node to m_xCurrentObject
 
 public:
-    IndexAccessIterator(css::uno::Reference< css::uno::XInterface> const & 
xStartingPoint);
+    IndexAccessIterator(css::uno::Reference< css::uno::XInterface> 
xStartingPoint);
 
     virtual ~IndexAccessIterator();
 
diff --git a/include/comphelper/enumhelper.hxx 
b/include/comphelper/enumhelper.hxx
index cf89e90fe11d..fb26de48971d 100644
--- a/include/comphelper/enumhelper.hxx
+++ b/include/comphelper/enumhelper.hxx
@@ -48,8 +48,8 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName final :
     std::mutex m_aLock;
 
 public:
-    OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
>& _rxAccess);
-    OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
>& _rxAccess,
+    OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
> _xAccess);
+    OEnumerationByName(const css::uno::Reference< css::container::XNameAccess 
> _xAccess,
                        std::vector<OUString>             _aNames  );
     virtual ~OEnumerationByName() override;
 
@@ -78,7 +78,7 @@ class COMPHELPER_DLLPUBLIC OEnumerationByIndex final :
     std::mutex m_aLock;
 
 public:
-    OEnumerationByIndex(const css::uno::Reference< 
css::container::XIndexAccess >& _rxAccess);
+    OEnumerationByIndex(css::uno::Reference< css::container::XIndexAccess > 
_xAccess);
     virtual ~OEnumerationByIndex() override;
 
     virtual sal_Bool SAL_CALL hasMoreElements(  ) override;
diff --git a/include/comphelper/interaction.hxx 
b/include/comphelper/interaction.hxx
index 4c9f61948c80..0f783e946daf 100644
--- a/include/comphelper/interaction.hxx
+++ b/include/comphelper/interaction.hxx
@@ -98,8 +98,8 @@ namespace comphelper
                     m_aContinuations;   /// all registered continuations
 
     public:
-        OInteractionRequest(const css::uno::Any& _rRequestDescription);
-        OInteractionRequest(const css::uno::Any& rRequestDescription,
+        OInteractionRequest(css::uno::Any aRequestDescription);
+        OInteractionRequest(css::uno::Any aRequestDescription,
             
std::vector<css::uno::Reference<css::task::XInteractionContinuation>>&& 
rContinuations);
 
         /// add a new continuation
diff --git a/include/comphelper/mimeconfighelper.hxx 
b/include/comphelper/mimeconfighelper.hxx
index 83f5c41cb267..5dd99664a70a 100644
--- a/include/comphelper/mimeconfighelper.hxx
+++ b/include/comphelper/mimeconfighelper.hxx
@@ -50,7 +50,7 @@ class COMPHELPER_DLLPUBLIC MimeConfigurationHelper
 
 public:
 
-    MimeConfigurationHelper( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
+    MimeConfigurationHelper( css::uno::Reference< css::uno::XComponentContext 
> xContext );
 
 
     static OUString GetStringClassIDRepresentation( const css::uno::Sequence< 
sal_Int8 >& aClassID );
diff --git a/include/comphelper/propertysethelper.hxx 
b/include/comphelper/propertysethelper.hxx
index 131465dc0f46..a4746a02fad9 100644
--- a/include/comphelper/propertysethelper.hxx
+++ b/include/comphelper/propertysethelper.hxx
@@ -62,7 +62,7 @@ protected:
     virtual css::uno::Any _getPropertyDefault( const 
comphelper::PropertyMapEntry* pEntry );
 
 public:
-    PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> const & 
xInfo ) noexcept;
+    PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> xInfo ) 
noexcept;
     virtual ~PropertySetHelper() noexcept;
 
     // XPropertySet
diff --git a/include/comphelper/propertysetinfo.hxx 
b/include/comphelper/propertysetinfo.hxx
index 82bbb81cd6c4..4f7ac39c29f3 100644
--- a/include/comphelper/propertysetinfo.hxx
+++ b/include/comphelper/propertysetinfo.hxx
@@ -28,7 +28,7 @@
 #include <o3tl/span.hxx>
 #include <o3tl/typed_flags_set.hxx>
 #include <unordered_map>
-#include <vector>
+#include <utility>
 
 enum class PropertyMoreFlags : sal_uInt8 {
     NONE            = 0x00,
@@ -53,7 +53,7 @@ struct PropertyMapEntry
 
     PropertyMapEntry(OUString _aName, sal_Int32 _nHandle, css::uno::Type const 
& _rType,
                      sal_Int16 _nAttributes, sal_uInt8 _nMemberId, 
PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE)
-        : maName( _aName )
+        : maName(std::move( _aName ))
         , maType( _rType )
         , mnHandle( _nHandle )
         , mnAttributes( _nAttributes )
diff --git a/include/comphelper/seekableinput.hxx 
b/include/comphelper/seekableinput.hxx
index 5c2e6be07c6e..0c2092f7b849 100644
--- a/include/comphelper/seekableinput.hxx
+++ b/include/comphelper/seekableinput.hxx
@@ -53,8 +53,8 @@ private:
 
 public:
     OSeekableInputWrapper(
-                const css::uno::Reference< css::io::XInputStream >& xInStream,
-                const css::uno::Reference< css::uno::XComponentContext >& 
rxContext );
+                css::uno::Reference< css::io::XInputStream > xInStream,
+                css::uno::Reference< css::uno::XComponentContext > xContext );
 
     virtual ~OSeekableInputWrapper() override;
 
diff --git a/include/comphelper/stillreadwriteinteraction.hxx 
b/include/comphelper/stillreadwriteinteraction.hxx
index 2bc8fa4f049e..fb03a7ad1d84 100644
--- a/include/comphelper/stillreadwriteinteraction.hxx
+++ b/include/comphelper/stillreadwriteinteraction.hxx
@@ -43,7 +43,7 @@ private:
 
 public:
     StillReadWriteInteraction(const css::uno::Reference< 
css::task::XInteractionHandler >& xHandler,
-                              const css::uno::Reference< 
css::task::XInteractionHandler >& xAuxiliaryHandler);
+                              css::uno::Reference< 
css::task::XInteractionHandler > xAuxiliaryHandler);
 
     void resetInterceptions();
     void resetErrorStates();
diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx
index 86ca9c4d8ecb..cbed62679f3c 100644
--- a/include/comphelper/string.hxx
+++ b/include/comphelper/string.hxx
@@ -350,7 +350,7 @@ private:
 public:
     NaturalStringSorter(
         const css::uno::Reference< css::uno::XComponentContext > &rContext,
-        const css::lang::Locale &rLocale);
+        css::lang::Locale aLocale);
     sal_Int32 compare(const OUString &rLHS, const OUString &rRHS) const
     {
         return compareNatural(rLHS, rRHS, m_xCollator, m_xBI, m_aLocale);
diff --git a/include/comphelper/threadpool.hxx 
b/include/comphelper/threadpool.hxx
index ec128b1422bd..a3c3091ce483 100644
--- a/include/comphelper/threadpool.hxx
+++ b/include/comphelper/threadpool.hxx
@@ -36,7 +36,7 @@ protected:
     /// once pushed ThreadTasks are destroyed by the pool
     virtual   ~ThreadTask() {}
 public:
-    ThreadTask(const std::shared_ptr<ThreadTaskTag>& pTag);
+    ThreadTask(std::shared_ptr<ThreadTaskTag> pTag);
 };
 
 /// A very basic thread-safe thread pool implementation
diff --git a/include/comphelper/traceevent.hxx 
b/include/comphelper/traceevent.hxx
index 665118636ca1..a0fe9cae1d16 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -15,6 +15,7 @@
 #include <atomic>
 #include <map>
 #include <memory>
+#include <utility>
 #include <vector>
 
 #include <osl/process.h>
@@ -84,9 +85,9 @@ protected:
     const int m_nPid;
     const OUString m_sArgs;
 
-    TraceEvent(const OUString& sArgs)
+    TraceEvent(OUString sArgs)
         : m_nPid(s_bRecording ? getPid() : 1)
-        , m_sArgs(sArgs)
+        , m_sArgs(std::move(sArgs))
     {
     }
 
diff --git a/include/comphelper/unique_disposing_ptr.hxx 
b/include/comphelper/unique_disposing_ptr.hxx
index 7bed79c43110..5994799fc4bb 100644
--- a/include/comphelper/unique_disposing_ptr.hxx
+++ b/include/comphelper/unique_disposing_ptr.hxx
@@ -18,6 +18,7 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
 #include <o3tl/deleter.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 
 namespace comphelper
@@ -76,9 +77,9 @@ private:
         unique_disposing_ptr<T>& m_rItem;
         bool const mbComponentDLL;
     public:
-        TerminateListener(const css::uno::Reference< css::lang::XComponent > 
&rComponent,
+        TerminateListener(css::uno::Reference< css::lang::XComponent > 
xComponent,
             unique_disposing_ptr<T>& rItem, bool bComponentDLL) :
-                    m_xComponent(rComponent),
+                    m_xComponent(std::move(xComponent)),
                     m_rItem(rItem),
                     mbComponentDLL(bComponentDLL)
         {
diff --git a/include/comphelper/weakeventlistener.hxx 
b/include/comphelper/weakeventlistener.hxx
index dc26966115fc..d64f302d8066 100644
--- a/include/comphelper/weakeventlistener.hxx
+++ b/include/comphelper/weakeventlistener.hxx
@@ -27,6 +27,7 @@
 #include <comphelper/comphelperdllapi.h>
 #include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
+#include <utility>
 
 namespace com::sun::star::uno { class XWeak; }
 
@@ -73,10 +74,10 @@ namespace comphelper
     protected:
         OWeakListenerAdapterBase(
             const css::uno::Reference< css::uno::XWeak >& _rxListener,
-            const css::uno::Reference< css::uno::XInterface >& _rxBroadcaster
+            css::uno::Reference< css::uno::XInterface > _xBroadcaster
         )
             :m_aListener    (  _rxListener )
-            ,m_xBroadcaster ( _rxBroadcaster )
+            ,m_xBroadcaster (std::move( _xBroadcaster ))
         {
         }
 

Reply via email to