diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 09:01:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 13:17:18 +0200 |
commit | c7c49309d0021b0e26c3179dd7adce71431ec7fc (patch) | |
tree | b66fb64d74c5476437f051580a1533bf3e4a1f31 /extensions | |
parent | 7778a1a573ad87fae76810ad67e6808b22f63420 (diff) |
clang-tidy modernize-pass-by-value in extensions
Change-Id: I9f31d6ddea3f99ed3334fa00d0f2c8448f9b9583
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
32 files changed, 105 insertions, 82 deletions
diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index c8ec00b681a7..b2e26ed35af1 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -26,6 +26,7 @@ #include <comphelper/propertysequence.hxx> #include <strings.hrc> #include <componentmodule.hxx> +#include <utility> #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> @@ -41,10 +42,10 @@ namespace abp using namespace ::com::sun::star::sdbc; OAdminDialogInvokation::OAdminDialogInvokation(const Reference< XComponentContext >& _rxContext, - const css::uno::Reference< css::beans::XPropertySet >& _rxDataSource, + css::uno::Reference< css::beans::XPropertySet > _xDataSource, weld::Window* _pMessageParent) :m_xContext(_rxContext) - ,m_xDataSource(_rxDataSource) + ,m_xDataSource(std::move(_xDataSource)) ,m_pMessageParent(_pMessageParent) { DBG_ASSERT(m_xContext.is(), "OAdminDialogInvokation::OAdminDialogInvokation: invalid service factory!"); diff --git a/extensions/source/abpilot/admininvokationimpl.hxx b/extensions/source/abpilot/admininvokationimpl.hxx index 2003809c8727..fef7a11eb388 100644 --- a/extensions/source/abpilot/admininvokationimpl.hxx +++ b/extensions/source/abpilot/admininvokationimpl.hxx @@ -40,7 +40,7 @@ namespace abp public: OAdminDialogInvokation( const css::uno::Reference< css::uno::XComponentContext >& _rxContext, - const css::uno::Reference< css::beans::XPropertySet >& _rDataSource, + css::uno::Reference< css::beans::XPropertySet > _xDataSource, weld::Window* _pMessageParent ); diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index a273635d91cb..f4aa45a708ed 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -25,6 +25,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include "bibconfig.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> @@ -146,9 +147,9 @@ void BibFrameCtrl_Impl::disposing( const lang::EventObject& /*Source*/ ) pController->getFrame()->removeFrameActionListener( this ); } -BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWindow > & xComponent, +BibFrameController_Impl::BibFrameController_Impl( uno::Reference< awt::XWindow > xComponent, BibDataManager* pDataManager) - :m_xWindow( xComponent ) + :m_xWindow(std::move( xComponent )) ,m_xDatMan( pDataManager ) { m_bDisposing = false; diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index be91982ccfe4..9aac2cee0dab 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -27,6 +27,7 @@ #include <cppuhelper/implbase.hxx> #include <rtl/ref.hxx> #include <tools/link.hxx> +#include <utility> #include <vcl/window.hxx> #include <vector> #include <memory> @@ -44,9 +45,9 @@ class BibStatusDispatch public: css::util::URL aURL; css::uno::Reference< css::frame::XStatusListener > xListener; - BibStatusDispatch( const css::util::URL& rURL, const css::uno::Reference< css::frame::XStatusListener >& rRef ) - : aURL( rURL ) - , xListener( rRef ) + BibStatusDispatch( css::util::URL _aURL, css::uno::Reference< css::frame::XStatusListener > xRef ) + : aURL(std::move( _aURL )) + , xListener(std::move( xRef )) {} }; @@ -73,7 +74,7 @@ friend class BibFrameCtrl_Impl; static bool SaveModified(const css::uno::Reference< css::form::runtime::XFormController>& xController); public: - BibFrameController_Impl( const css::uno::Reference< css::awt::XWindow > & xComponent, + BibFrameController_Impl( css::uno::Reference< css::awt::XWindow > xComponent, BibDataManager* pDatMan); virtual ~BibFrameController_Impl() override; diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index fc429b4adf62..f6b60fb92afe 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -30,6 +30,7 @@ #include <o3tl/string_view.hxx> #include <sal/log.hxx> #include <cppuhelper/implbase.hxx> +#include <utility> #include <vcl/event.hxx> #include <vcl/mnemonic.hxx> #include "general.hxx" @@ -476,8 +477,8 @@ BibGeneralPage::~BibGeneralPage() class ChangeListener : public cppu::WeakImplHelper<css::beans::XPropertyChangeListener> { public: - explicit ChangeListener(const css::uno::Reference<css::beans::XPropertySet>& rPropSet) - : m_xPropSet(rPropSet) + explicit ChangeListener(css::uno::Reference<css::beans::XPropertySet> xPropSet) + : m_xPropSet(std::move(xPropSet)) , m_bSelfChanging(false) { } diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index fd74a04e6442..3d6ce59aa6f5 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -31,6 +31,7 @@ #include <o3tl/any.hxx> #include <svtools/miscopt.hxx> #include <svtools/imgdef.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/mnemonic.hxx> @@ -48,9 +49,9 @@ using namespace ::com::sun::star::beans; // Constants -------------------------------------------------------------- -BibToolBarListener::BibToolBarListener(BibToolBar *pTB, const OUString& aStr, ToolBoxItemId nId): +BibToolBarListener::BibToolBarListener(BibToolBar *pTB, OUString aStr, ToolBoxItemId nId): nIndex(nId), - aCommand(aStr), + aCommand(std::move(aStr)), pToolBar(pTB) { } diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx index 4f800f050b66..3e97ec6f4702 100644 --- a/extensions/source/bibliography/toolbar.hxx +++ b/extensions/source/bibliography/toolbar.hxx @@ -44,7 +44,7 @@ protected: public: - BibToolBarListener(BibToolBar *pTB, const OUString& aStr, ToolBoxItemId nId); + BibToolBarListener(BibToolBar *pTB, OUString aStr, ToolBoxItemId nId); virtual ~BibToolBarListener() override; const OUString& GetCommand() const { return aCommand;} diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx index a61df8a6a205..ea6e886d2d13 100644 --- a/extensions/source/dbpilots/unoautopilot.hxx +++ b/extensions/source/dbpilots/unoautopilot.hxx @@ -26,6 +26,7 @@ #include <cppuhelper/typeprovider.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <utility> #include <vcl/svapp.hxx> namespace dbp @@ -41,7 +42,7 @@ namespace dbp OUString aImplementationName, const css::uno::Sequence<OUString>& aSupportedServices) : OUnoAutoPilot_Base(_rxORB), - m_ImplementationName(aImplementationName), + m_ImplementationName(std::move(aImplementationName)), m_SupportedServices(aSupportedServices) { } diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index 322ad7ab9ec7..4ae2f79362fc 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -33,6 +33,7 @@ #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weakref.hxx> #include <map> +#include <utility> namespace logging @@ -63,7 +64,7 @@ namespace logging // </attributes> public: - EventLogger( const Reference< XComponentContext >& _rxContext, const OUString& _rName ); + EventLogger( const Reference< XComponentContext >& _rxContext, OUString _aName ); // XLogger virtual OUString SAL_CALL getName() override; @@ -113,11 +114,11 @@ namespace logging } - EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const OUString& _rName ) + EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, OUString _aName ) :m_aHandlers( m_aMutex ) ,m_nEventNumber( 0 ) ,m_nLogLevel( css::logging::LogLevel::OFF ) - ,m_sName( _rName ) + ,m_sName(std::move( _aName )) { osl_atomic_increment( &m_refCount ); { diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 814c24f4b306..b8d18a454503 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -29,6 +29,7 @@ #include <comphelper/string.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -52,9 +53,9 @@ namespace pcr namespace PropertyLineElement = ::com::sun::star::inspection::PropertyLineElement; - OBrowserLine::OBrowserLine(const OUString& rEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup, + OBrowserLine::OBrowserLine(OUString aEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup, weld::Container* pInitialControlParent) - : m_sEntryName(rEntryName) + : m_sEntryName(std::move(aEntryName)) , m_xBuilder(Application::CreateBuilder(pParent, "modules/spropctrlr/ui/browserline.ui")) , m_xContainer(m_xBuilder->weld_container("BrowserLine")) , m_xFtTitle(m_xBuilder->weld_label("label")) diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index db33b7a5560f..f56370730716 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -68,7 +68,7 @@ namespace pcr bool m_bReadOnly; public: - OBrowserLine(const OUString& rEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup, + OBrowserLine(OUString aEntryName, weld::Container* pParent, weld::SizeGroup* pLabelGroup, weld::Container* pInitialControlParent); ~OBrowserLine(); diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index 1a7232612a29..fc1f35541208 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/inspection/XPropertyControl.hpp> #include <com/sun/star/inspection/XPropertyHandler.hpp> +#include <utility> #include <vcl/weld.hxx> #include <rtl/ref.hxx> @@ -53,10 +54,10 @@ namespace pcr css::uno::Reference< css::inspection::XPropertyHandler > xHandler; - ListBoxLine( const OUString& rName, const BrowserLinePointer& _pLine, const css::uno::Reference< css::inspection::XPropertyHandler >& _rxHandler ) - : aName( rName ), - pLine( _pLine ), - xHandler( _rxHandler ) + ListBoxLine( OUString _aName, BrowserLinePointer _pLine, css::uno::Reference< css::inspection::XPropertyHandler > _xHandler ) + : aName(std::move( _aName )), + pLine(std::move( _pLine )), + xHandler(std::move( _xHandler )) { } }; diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx index 3c66fc8c97fa..b3a862f693b7 100644 --- a/extensions/source/propctrlr/cellbindinghelper.cxx +++ b/extensions/source/propctrlr/cellbindinghelper.cxx @@ -36,6 +36,7 @@ #include "formstrings.hxx" #include <algorithm> +#include <utility> namespace pcr @@ -63,7 +64,7 @@ namespace pcr OUString m_sReference; public: - explicit StringCompare( const OUString& _rReference ) : m_sReference( _rReference ) { } + explicit StringCompare( OUString _aReference ) : m_sReference(std::move( _aReference )) { } bool operator()( std::u16string_view _rCompare ) { diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index d07f524bfdf9..3157152fc240 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -65,6 +65,7 @@ #include <algorithm> #include <iterator> #include <string_view> +#include <utility> namespace pcr { @@ -123,11 +124,11 @@ namespace pcr namespace FormComponentType = css::form::FormComponentType; EventDescription::EventDescription( EventId _nId, const char* _pListenerNamespaceAscii, const char* _pListenerClassAsciiName, - const char* _pListenerMethodAsciiName, TranslateId pDisplayNameResId, const OUString& _sHelpId, const OString& _sUniqueBrowseId ) + const char* _pListenerMethodAsciiName, TranslateId pDisplayNameResId, OUString _sHelpId, OString _sUniqueBrowseId ) :sDisplayName(PcrRes( pDisplayNameResId )) ,sListenerMethodName( OUString::createFromAscii( _pListenerMethodAsciiName ) ) - ,sHelpId( _sHelpId ) - ,sUniqueBrowseId( _sUniqueBrowseId ) + ,sHelpId(std::move( _sHelpId )) + ,sUniqueBrowseId(std::move( _sUniqueBrowseId )) ,nId( _nId ) { OUStringBuffer aQualifiedListenerClass; diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx index 4506f1b066d8..7a9304a3f175 100644 --- a/extensions/source/propctrlr/eventhandler.hxx +++ b/extensions/source/propctrlr/eventhandler.hxx @@ -60,8 +60,8 @@ namespace pcr const char* _pListenerClassAsciiName, const char* _pListenerMethodAsciiName, TranslateId pDisplayNameResId, - const OUString& _sHelpId, - const OString& _sUniqueBrowseId ); + OUString _sHelpId, + OString _sUniqueBrowseId ); }; typedef std::unordered_map< OUString, EventDescription > EventMap; diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx index 08d48747ce75..707ae2bc6b02 100644 --- a/extensions/source/propctrlr/formbrowsertools.hxx +++ b/extensions/source/propctrlr/formbrowsertools.hxx @@ -24,6 +24,7 @@ #include <rtl/ustring.hxx> #include <set> +#include <utility> namespace pcr @@ -54,7 +55,7 @@ namespace pcr OUString m_sName; public: - explicit FindPropertyByName( const OUString& _rName ) : m_sName( _rName ) { } + explicit FindPropertyByName( OUString _aName ) : m_sName(std::move( _aName )) { } bool operator()( const css::beans::Property& _rProp ) const { return m_sName == _rProp.Name; diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx index 6e94aa0d1eb3..f4bcf3cfe523 100644 --- a/extensions/source/propctrlr/formcontroller.cxx +++ b/extensions/source/propctrlr/formcontroller.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/util/VetoException.hpp> #include <cppuhelper/typeprovider.hxx> +#include <utility> namespace pcr @@ -56,12 +57,12 @@ namespace pcr FormController::FormController( const Reference< XComponentContext >& _rxContext, - const OUString& sImplementationName, + OUString sImplementationName, const css::uno::Sequence<OUString>& aSupportedServiceNames, bool _bUseFormFormComponentHandlers ) :OPropertyBrowserController( _rxContext ) ,FormController_PropertyBase1( m_aBHelper ) - ,m_sImplementationName( sImplementationName ) + ,m_sImplementationName(std::move( sImplementationName )) ,m_aSupportedServiceNames( aSupportedServiceNames ) { osl_atomic_increment( &m_refCount ); diff --git a/extensions/source/propctrlr/formcontroller.hxx b/extensions/source/propctrlr/formcontroller.hxx index 8c285160e676..f3415057fc80 100644 --- a/extensions/source/propctrlr/formcontroller.hxx +++ b/extensions/source/propctrlr/formcontroller.hxx @@ -52,7 +52,7 @@ namespace pcr public: FormController( const css::uno::Reference< css::uno::XComponentContext >& _rxContext, - const OUString& sImplementName, + OUString sImplementName, const css::uno::Sequence<OUString>& aSupportedServiceNames, bool _bUseFormFormComponentHandlers ); diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 26c4324056a9..0886e03f4a9d 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -44,6 +44,7 @@ #include <comphelper/interfacecontainer2.hxx> #include <comphelper/componentbase.hxx> #include <rtl/ref.hxx> +#include <utility> #include <tools/diagnose_ex.h> namespace pcr @@ -719,9 +720,9 @@ namespace pcr OUString sPropertyName; Any aNewPropertyValue; - EventTranslation( const OUString& _propertyName, const Any& _newPropertyValue ) - :sPropertyName( _propertyName ) - ,aNewPropertyValue( _newPropertyValue ) + EventTranslation( OUString _propertyName, Any _newPropertyValue ) + :sPropertyName(std::move( _propertyName )) + ,aNewPropertyValue(std::move( _newPropertyValue )) { } }; diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 319ade95605f..d82bf1610e32 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -25,6 +25,7 @@ #include "formstrings.hxx" #include <sal/log.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/svapp.hxx> #include <connectivity/dbtools.hxx> #include <connectivity/dbexception.hxx> @@ -136,14 +137,14 @@ namespace pcr FormLinkDialog::FormLinkDialog(weld::Window* _pParent, const Reference< XPropertySet >& _rxDetailForm, const Reference< XPropertySet >& _rxMasterForm, const Reference< XComponentContext >& _rxContext, const OUString& _sExplanation, - const OUString& _sDetailLabel, - const OUString& _sMasterLabel) + OUString _sDetailLabel, + OUString _sMasterLabel) : GenericDialogController(_pParent, "modules/spropctrlr/ui/formlinksdialog.ui", "FormLinks") , m_xContext ( _rxContext ) , m_xDetailForm( _rxDetailForm ) , m_xMasterForm( _rxMasterForm ) - , m_sDetailLabel(_sDetailLabel) - , m_sMasterLabel(_sMasterLabel) + , m_sDetailLabel(std::move(_sDetailLabel)) + , m_sMasterLabel(std::move(_sMasterLabel)) , m_xExplanation(m_xBuilder->weld_label("explanationLabel")) , m_xDetailLabel(m_xBuilder->weld_label("detailLabel")) , m_xMasterLabel(m_xBuilder->weld_label("masterLabel")) diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx index 80cc086cc156..58e9fe27dea0 100644 --- a/extensions/source/propctrlr/formlinkdialog.hxx +++ b/extensions/source/propctrlr/formlinkdialog.hxx @@ -67,8 +67,8 @@ namespace pcr const css::uno::Reference< css::beans::XPropertySet >& _rxMasterForm, const css::uno::Reference< css::uno::XComponentContext >& _rxContext, const OUString& _sExplanation = OUString(), - const OUString& _sDetailLabel = OUString(), - const OUString& _sMasterLabel = OUString() + OUString _sDetailLabel = OUString(), + OUString _sMasterLabel = OUString() ); virtual ~FormLinkDialog() override; diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index eff907f49b47..c6e1e0d6020e 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -28,6 +28,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <algorithm> +#include <utility> namespace pcr { @@ -46,20 +47,20 @@ namespace pcr sal_uInt32 nUIFlags; OPropertyInfoImpl( - const OUString& rName, + OUString aName, sal_Int32 _nId, - const OUString& aTranslation, + OUString aTranslation, sal_uInt16 nPosId, - const OUString&, + OUString , sal_uInt32 _nUIFlags); }; - OPropertyInfoImpl::OPropertyInfoImpl(const OUString& _rName, sal_Int32 _nId, - const OUString& aString, sal_uInt16 nP, const OUString& sHid, sal_uInt32 _nUIFlags) - :sName(_rName) - ,sTranslation(aString) - ,sHelpId(sHid) + OPropertyInfoImpl::OPropertyInfoImpl(OUString _aName, sal_Int32 _nId, + OUString aString, sal_uInt16 nP, OUString sHid, sal_uInt32 _nUIFlags) + :sName(std::move(_aName)) + ,sTranslation(std::move(aString)) + ,sHelpId(std::move(sHid)) ,nId(_nId) ,nPos(nP) ,nUIFlags(_nUIFlags) diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx index 18ab1d77840d..b39574c7ee31 100644 --- a/extensions/source/propctrlr/listselectiondlg.cxx +++ b/extensions/source/propctrlr/listselectiondlg.cxx @@ -21,6 +21,7 @@ #include "formstrings.hxx" #include <comphelper/sequence.hxx> +#include <utility> #include <tools/diagnose_ex.h> namespace pcr @@ -29,10 +30,10 @@ namespace pcr using namespace ::com::sun::star::beans; ListSelectionDialog::ListSelectionDialog(weld::Window* pParent, const Reference< XPropertySet >& _rxListBox, - const OUString& _rPropertyName, const OUString& _rPropertyUIName) + OUString _sPropertyName, const OUString& _rPropertyUIName) : GenericDialogController(pParent, "modules/spropctrlr/ui/listselectdialog.ui", "ListSelectDialog") , m_xListBox ( _rxListBox ) - , m_sPropertyName( _rPropertyName ) + , m_sPropertyName(std::move( _sPropertyName )) , m_xFrame(m_xBuilder->weld_frame("frame")) , m_xEntries(m_xBuilder->weld_tree_view("treeview")) { diff --git a/extensions/source/propctrlr/listselectiondlg.hxx b/extensions/source/propctrlr/listselectiondlg.hxx index 51469c091856..368e9e9aac94 100644 --- a/extensions/source/propctrlr/listselectiondlg.hxx +++ b/extensions/source/propctrlr/listselectiondlg.hxx @@ -37,7 +37,7 @@ namespace pcr ListSelectionDialog( weld::Window* _pParent, const css::uno::Reference< css::beans::XPropertySet >& _rxListBox, - const OUString& _rPropertyName, + OUString _sPropertyName, const OUString& _rPropertyUIName ); virtual ~ListSelectionDialog() override; diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx index d77280d9fa18..6c9c428d41aa 100644 --- a/extensions/source/propctrlr/propertycomposer.cxx +++ b/extensions/source/propctrlr/propertycomposer.cxx @@ -27,6 +27,7 @@ #include <algorithm> #include <iterator> +#include <utility> namespace pcr @@ -48,7 +49,7 @@ namespace pcr { OUString sPropertyName; const Any& rValue; - SetPropertyValue( const OUString& _rPropertyName, const Any& _rValue ) : sPropertyName( _rPropertyName ), rValue( _rValue ) { } + SetPropertyValue( OUString _aPropertyName, const Any& _rValue ) : sPropertyName(std::move( _aPropertyName )), rValue( _rValue ) { } void operator()( const Reference< XPropertyHandler >& _rHandler ) { _rHandler->setPropertyValue( sPropertyName, rValue ); diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 3c94a3a24bf3..e412508f3aa7 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -23,6 +23,7 @@ #include "linedescriptor.hxx" #include <tools/debug.hxx> +#include <utility> #include <osl/diagnose.h> namespace pcr @@ -370,8 +371,8 @@ namespace pcr { } - OPropertyEditor::PropertyPage::PropertyPage(sal_uInt16 nPagePos, const OUString& rLabel, std::unique_ptr<OBrowserPage> pPage) - : nPos(nPagePos), sLabel(rLabel), xPage(std::move(pPage)) + OPropertyEditor::PropertyPage::PropertyPage(sal_uInt16 nPagePos, OUString aLabel, std::unique_ptr<OBrowserPage> pPage) + : nPos(nPagePos), sLabel(std::move(aLabel)), xPage(std::move(pPage)) { } diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index 5ca271d0d14a..606da6561705 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -46,7 +46,7 @@ namespace pcr OUString sLabel; std::unique_ptr<OBrowserPage> xPage; PropertyPage(); - PropertyPage(sal_uInt16 nPagePos, const OUString& rLabel, std::unique_ptr<OBrowserPage> pPage); + PropertyPage(sal_uInt16 nPagePos, OUString aLabel, std::unique_ptr<OBrowserPage> pPage); }; std::unique_ptr<weld::Container> m_xContainer; diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index 73e205be4ed0..6ed243662b1b 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/sdb/CommandType.hpp> #include <comphelper/propertyvalue.hxx> +#include <utility> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> @@ -90,9 +91,9 @@ namespace pcr SQLCommandDesigner::SQLCommandDesigner( const Reference< XComponentContext >& _rxContext, const ::rtl::Reference< ISQLCommandAdapter >& _rxPropertyAdapter, - const ::dbtools::SharedConnection& _rConnection, const Link<SQLCommandDesigner&,void>& _rCloseLink ) + ::dbtools::SharedConnection _aConnection, const Link<SQLCommandDesigner&,void>& _rCloseLink ) :m_xContext( _rxContext ) - ,m_xConnection( _rConnection ) + ,m_xConnection(std::move( _aConnection )) ,m_xObjectAdapter( _rxPropertyAdapter ) ,m_aCloseLink( _rCloseLink ) { diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx index a72ba11b0571..767506eca7bf 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.hxx +++ b/extensions/source/propctrlr/sqlcommanddesign.hxx @@ -72,7 +72,7 @@ namespace pcr SQLCommandDesigner( const css::uno::Reference< css::uno::XComponentContext >& _rxContext, const ::rtl::Reference< ISQLCommandAdapter >& _rxPropertyAdapter, - const ::dbtools::SharedConnection& _rConnection, + ::dbtools::SharedConnection _aConnection, const Link<SQLCommandDesigner&,void>& _rCloseLink ); diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 143ab1363a22..30dbde907733 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -37,6 +37,7 @@ #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <utility> #include <yesno.hrc> #include <comphelper/types.hxx> #include <o3tl/string_view.hxx> @@ -58,7 +59,7 @@ class StringRepresentation: lang::XInitialization> { public: - explicit StringRepresentation(uno::Reference< uno::XComponentContext > const & context); + explicit StringRepresentation(uno::Reference< uno::XComponentContext > context); StringRepresentation (const StringRepresentation&) = delete; StringRepresentation& operator=(const StringRepresentation&) = delete; @@ -128,8 +129,8 @@ private: } -StringRepresentation::StringRepresentation(uno::Reference< uno::XComponentContext > const & context) : - m_xContext(context) +StringRepresentation::StringRepresentation(uno::Reference< uno::XComponentContext > context) : + m_xContext(std::move(context)) {} // com.sun.star.uno.XServiceInfo: diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index b06e30a2794a..0db920c4c951 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -22,6 +22,7 @@ #include <o3tl/safeint.hxx> #include <osl/thread.hxx> #include <sal/log.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <memory> @@ -129,7 +130,7 @@ public: virtual void SAL_CALL run() override; virtual void SAL_CALL onTerminated() override { delete this; } public: - ScannerThread( const std::shared_ptr<SaneHolder>& pHolder, + ScannerThread( std::shared_ptr<SaneHolder> pHolder, const Reference< css::lang::XEventListener >& listener, ScannerManager* pManager ); virtual ~ScannerThread() override; @@ -137,10 +138,10 @@ public: } -ScannerThread::ScannerThread(const std::shared_ptr<SaneHolder>& pHolder, +ScannerThread::ScannerThread(std::shared_ptr<SaneHolder> pHolder, const Reference< css::lang::XEventListener >& listener, ScannerManager* pManager) - : m_pHolder( pHolder ), m_xListener( listener ), m_pManager( pManager ) + : m_pHolder(std::move( pHolder )), m_xListener( listener ), m_pManager( pManager ) { SAL_INFO("extensions.scanner", "ScannerThread"); } diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index ee83c3f9b436..632724118c98 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -53,6 +53,7 @@ #include <sal/log.hxx> #include <osl/diagnose.h> #include <osl/conditn.hxx> +#include <utility> #include <vcl/svapp.hxx> namespace beans = com::sun::star::beans ; @@ -159,10 +160,10 @@ public: virtual sal_Bool SAL_CALL supportsService(OUString const & serviceName) override; virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - UpdateInformationProvider(const uno::Reference<uno::XComponentContext>& xContext, - const uno::Reference< ucb::XUniversalContentBroker >& xUniversalContentBroker, - const uno::Reference< xml::dom::XDocumentBuilder >& xDocumentBuilder, - const uno::Reference< xml::xpath::XXPathAPI >& xXPathAPI); + UpdateInformationProvider(uno::Reference<uno::XComponentContext> xContext, + uno::Reference< ucb::XUniversalContentBroker > xUniversalContentBroker, + uno::Reference< xml::dom::XDocumentBuilder > xDocumentBuilder, + uno::Reference< xml::xpath::XXPathAPI > xXPathAPI); protected: @@ -199,8 +200,8 @@ class UpdateInformationEnumeration : public ::cppu::WeakImplHelper< container::X { public: UpdateInformationEnumeration(const uno::Reference< xml::dom::XNodeList >& xNodeList, - const rtl::Reference< UpdateInformationProvider >& xUpdateInformationProvider) : - m_xUpdateInformationProvider(xUpdateInformationProvider), + rtl::Reference< UpdateInformationProvider > xUpdateInformationProvider) : + m_xUpdateInformationProvider(std::move(xUpdateInformationProvider)), m_xNodeList(xNodeList), m_nNodes(xNodeList.is() ? xNodeList->getLength() : 0), m_nCount(0) @@ -288,14 +289,14 @@ private: }; UpdateInformationProvider::UpdateInformationProvider( - const uno::Reference<uno::XComponentContext>& xContext, - const uno::Reference< ucb::XUniversalContentBroker >& xUniversalContentBroker, - const uno::Reference< xml::dom::XDocumentBuilder >& xDocumentBuilder, - const uno::Reference< xml::xpath::XXPathAPI >& xXPathAPI) - : m_xContext(xContext) - , m_xUniversalContentBroker(xUniversalContentBroker) - , m_xDocumentBuilder(xDocumentBuilder) - , m_xXPathAPI(xXPathAPI) + uno::Reference<uno::XComponentContext> xContext, + uno::Reference< ucb::XUniversalContentBroker > xUniversalContentBroker, + uno::Reference< xml::dom::XDocumentBuilder > xDocumentBuilder, + uno::Reference< xml::xpath::XXPathAPI > xXPathAPI) + : m_xContext(std::move(xContext)) + , m_xUniversalContentBroker(std::move(xUniversalContentBroker)) + , m_xDocumentBuilder(std::move(xDocumentBuilder)) + , m_xXPathAPI(std::move(xXPathAPI)) , m_aRequestHeaderList(2) , m_nCommandId(0) { |