diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-01 09:03:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-01 14:17:45 +0200 |
commit | 292887379812dd9df00c3f129e21d17dd56519a9 (patch) | |
tree | 2ff27072a1ed0563bd1705d5445c23ed4c139a2a /fpicker/source | |
parent | acb65a60be43d5ac146c2fc16c6f2a5f6879be99 (diff) |
clang-tidy modernize-pass-by-value in fpicker
Change-Id: I9940338307241958e478ec6919068454d3a07b9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker/source')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 5 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.cxx | 13 | ||||
-rw-r--r-- | fpicker/source/office/contentenumeration.hxx | 5 | ||||
-rw-r--r-- | fpicker/source/office/fileview.hxx | 5 | ||||
-rw-r--r-- | fpicker/source/office/fpinteraction.cxx | 5 | ||||
-rw-r--r-- | fpicker/source/office/fpinteraction.hxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 7 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.hxx | 2 |
8 files changed, 25 insertions, 19 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 1ffb35fbf842..3d06627dac24 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -31,6 +31,7 @@ #include <tools/debug.hxx> #include <algorithm> +#include <utility> namespace svt @@ -139,8 +140,8 @@ namespace svt struct ControlPropertyLookup { OUString m_sLookup; - explicit ControlPropertyLookup(const OUString& rLookup) - : m_sLookup(rLookup) + explicit ControlPropertyLookup(OUString aLookup) + : m_sLookup(std::move(aLookup)) { } diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index c69ab90e8649..7410e0c96faa 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -23,6 +23,7 @@ #include "iodlg.hxx" #include "RemoteFilesDialog.hxx" +#include <utility> #include <vector> #include <algorithm> #include <sal/log.hxx> @@ -56,13 +57,13 @@ protected: UnoFilterList m_aSubFilters; public: - FilterEntry( const OUString& _rTitle, const OUString& _rFilter ) - :m_sTitle( _rTitle ) - ,m_sFilter( _rFilter ) + FilterEntry( OUString _aTitle, OUString _aFilter ) + :m_sTitle(std::move( _aTitle )) + ,m_sFilter(std::move( _aFilter )) { } - FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ); + FilterEntry( OUString _aTitle, const UnoFilterList& _rSubFilters ); const OUString& getTitle() const { return m_sTitle; } const OUString& getFilter() const { return m_sFilter; } @@ -80,8 +81,8 @@ public: }; -FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ) - :m_sTitle( _rTitle ) +FilterEntry::FilterEntry( OUString _aTitle, const UnoFilterList& _rSubFilters ) + :m_sTitle(std::move( _aTitle )) ,m_aSubFilters( _rSubFilters ) { } diff --git a/fpicker/source/office/contentenumeration.hxx b/fpicker/source/office/contentenumeration.hxx index 68277e6a4830..b1c07afcf1c4 100644 --- a/fpicker/source/office/contentenumeration.hxx +++ b/fpicker/source/office/contentenumeration.hxx @@ -28,6 +28,7 @@ #include <ucbhelper/content.hxx> #include <rtl/ustring.hxx> #include <tools/datetime.hxx> +#include <utility> namespace svt { @@ -132,8 +133,8 @@ namespace svt FolderDescriptor() { } - explicit FolderDescriptor( const OUString& _rURL ) - :sURL( _rURL ) + explicit FolderDescriptor( OUString _aURL ) + :sURL(std::move( _aURL )) { } }; diff --git a/fpicker/source/office/fileview.hxx b/fpicker/source/office/fileview.hxx index 19ddd60e1e15..e2f132029de9 100644 --- a/fpicker/source/office/fileview.hxx +++ b/fpicker/source/office/fileview.hxx @@ -20,6 +20,7 @@ #include <memory> #include <com/sun/star/uno/Sequence.h> +#include <utility> #include <vcl/weld.hxx> #include <rtl/ustring.hxx> @@ -176,8 +177,8 @@ struct SvtContentEntry bool mbIsFolder; OUString maURL; - SvtContentEntry( const OUString& rURL, bool bIsFolder ) : - mbIsFolder( bIsFolder ), maURL( rURL ) {} + SvtContentEntry( OUString aURL, bool bIsFolder ) : + mbIsFolder( bIsFolder ), maURL(std::move( aURL )) {} }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx index 16ea3368ae08..9d3591d7586b 100644 --- a/fpicker/source/office/fpinteraction.cxx +++ b/fpicker/source/office/fpinteraction.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/task/XInteractionRetry.hpp> #include <sal/log.hxx> +#include <utility> namespace svt @@ -34,8 +35,8 @@ namespace svt using namespace ::com::sun::star::task; using namespace ::com::sun::star::ucb; - OFilePickerInteractionHandler::OFilePickerInteractionHandler( const css::uno::Reference< css::task::XInteractionHandler >& _rxMaster ) - :m_xMaster( _rxMaster ) + OFilePickerInteractionHandler::OFilePickerInteractionHandler( css::uno::Reference< css::task::XInteractionHandler > _xMaster ) + :m_xMaster(std::move( _xMaster )) ,m_bUsed( false ) ,m_eInterceptions( OFilePickerInteractionHandler::E_NOINTERCEPTION ) { diff --git a/fpicker/source/office/fpinteraction.hxx b/fpicker/source/office/fpinteraction.hxx index 6aac9c18dcb6..84f4a43d60a4 100644 --- a/fpicker/source/office/fpinteraction.hxx +++ b/fpicker/source/office/fpinteraction.hxx @@ -55,7 +55,7 @@ namespace svt EInterceptedInteractions m_eInterceptions; // enable/disable interception of some special interactions public: - explicit OFilePickerInteractionHandler( const css::uno::Reference< css::task::XInteractionHandler >& _rxMaster ); + explicit OFilePickerInteractionHandler( css::uno::Reference< css::task::XInteractionHandler > _xMaster ); // some generic functions void enableInterceptions( EInterceptedInteractions eInterceptions ); diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 070664576a69..e9e8e00491fa 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -30,14 +30,15 @@ #include <svtools/imagemgr.hxx> #include <svl/svlresid.hxx> #include <svl/svl.hrc> +#include <utility> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::utl; -SvtFileDialogFilter_Impl::SvtFileDialogFilter_Impl( const OUString& rName, const OUString& rType ) - : m_aName( rName ) - , m_aType( rType ) +SvtFileDialogFilter_Impl::SvtFileDialogFilter_Impl( OUString aName, OUString aType ) + : m_aName(std::move( aName )) + , m_aType(std::move( aType )) { m_aType = m_aType.toAsciiLowerCase(); } diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index 1ae0dc652547..caac91793c59 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -48,7 +48,7 @@ private: OUString m_aType; // filter wildcard - if empty, the entry marks a group public: - SvtFileDialogFilter_Impl( const OUString& rName, const OUString& rType ); + SvtFileDialogFilter_Impl( OUString aName, OUString aType ); ~SvtFileDialogFilter_Impl(); const OUString& GetName() const { return m_aName; } |