summaryrefslogtreecommitdiff
path: root/extensions/source/bibliography
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 09:01:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 13:17:18 +0200
commitc7c49309d0021b0e26c3179dd7adce71431ec7fc (patch)
treeb66fb64d74c5476437f051580a1533bf3e4a1f31 /extensions/source/bibliography
parent7778a1a573ad87fae76810ad67e6808b22f63420 (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/source/bibliography')
-rw-r--r--extensions/source/bibliography/framectr.cxx5
-rw-r--r--extensions/source/bibliography/framectr.hxx9
-rw-r--r--extensions/source/bibliography/general.cxx5
-rw-r--r--extensions/source/bibliography/toolbar.cxx5
-rw-r--r--extensions/source/bibliography/toolbar.hxx2
5 files changed, 15 insertions, 11 deletions
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;}