summaryrefslogtreecommitdiff
path: root/framework/inc/uielement
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 10:44:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 12:12:15 +0200
commitc60ad041e8f48759062d652ca20216c424768fa4 (patch)
tree73f2839e672f91b4262d79fe88bc0b8af1c44ff4 /framework/inc/uielement
parent826b0fc9aacbe58c998aec8ebba3401c0a68a015 (diff)
clang-tidy modernize-pass-by-value in framework
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/inc/uielement')
-rw-r--r--framework/inc/uielement/buttontoolbarcontroller.hxx4
-rw-r--r--framework/inc/uielement/menubarmanager.hxx9
-rw-r--r--framework/inc/uielement/menubarwrapper.hxx3
-rw-r--r--framework/inc/uielement/statusbaritem.hxx2
-rw-r--r--framework/inc/uielement/statusbarmanager.hxx4
-rw-r--r--framework/inc/uielement/statusbarwrapper.hxx2
-rw-r--r--framework/inc/uielement/styletoolbarcontroller.hxx2
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx4
-rw-r--r--framework/inc/uielement/uielement.hxx13
9 files changed, 22 insertions, 21 deletions
diff --git a/framework/inc/uielement/buttontoolbarcontroller.hxx b/framework/inc/uielement/buttontoolbarcontroller.hxx
index d35b3d7f2c75..759775ef8b65 100644
--- a/framework/inc/uielement/buttontoolbarcontroller.hxx
+++ b/framework/inc/uielement/buttontoolbarcontroller.hxx
@@ -45,9 +45,9 @@ class ButtonToolbarController final : public css::frame::XStatusListener,
public ::cppu::OWeakObject
{
public:
- ButtonToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ ButtonToolbarController( css::uno::Reference< css::uno::XComponentContext > xContext,
ToolBox* pToolBar,
- const OUString& aCommand );
+ OUString aCommand );
virtual ~ButtonToolbarController() override;
// XInterface
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index 710c788f2dcc..61bec0443240 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <unordered_map>
+#include <utility>
#include <vector>
#include <com/sun/star/frame/XFrame.hpp>
@@ -130,12 +131,12 @@ class MenuBarManager final :
struct MenuItemHandler
{
MenuItemHandler( sal_uInt16 aItemId,
- css::uno::Reference< css::frame::XStatusListener > const & xManager,
- css::uno::Reference< css::frame::XDispatch > const & rDispatch ) :
+ css::uno::Reference< css::frame::XStatusListener > xManager,
+ css::uno::Reference< css::frame::XDispatch > xDispatch ) :
nItemId( aItemId ),
bMadeInvisible ( false ),
- xSubMenuManager( xManager ),
- xMenuItemDispatch( rDispatch ) {}
+ xSubMenuManager(std::move( xManager )),
+ xMenuItemDispatch(std::move( xDispatch )) {}
sal_uInt16 nItemId;
bool bMadeInvisible;
diff --git a/framework/inc/uielement/menubarwrapper.hxx b/framework/inc/uielement/menubarwrapper.hxx
index 66a5716a8f0d..d696ec6c3f38 100644
--- a/framework/inc/uielement/menubarwrapper.hxx
+++ b/framework/inc/uielement/menubarwrapper.hxx
@@ -33,8 +33,7 @@ class MenuBarWrapper final : public UIConfigElementWrapperBase,
{
public:
- MenuBarWrapper(
- const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ MenuBarWrapper( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~MenuBarWrapper() override;
// XInterface, XTypeProvider
diff --git a/framework/inc/uielement/statusbaritem.hxx b/framework/inc/uielement/statusbaritem.hxx
index 44fecd1dff68..b9597bd2ab57 100644
--- a/framework/inc/uielement/statusbaritem.hxx
+++ b/framework/inc/uielement/statusbaritem.hxx
@@ -37,7 +37,7 @@ public:
explicit StatusbarItem(
StatusBar *pStatusBar,
sal_uInt16 nId,
- const OUString& aCommand );
+ OUString aCommand );
virtual ~StatusbarItem() override;
void disposing(std::unique_lock<std::mutex>&) override;
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index ba2dbd9a31c0..c893e4abdc69 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -45,8 +45,8 @@ class StatusBarManager final: public ::cppu::WeakImplHelper<
friend class FrameworkStatusBar;
public:
- StatusBarManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
+ StatusBarManager( css::uno::Reference< css::uno::XComponentContext > xContext,
+ css::uno::Reference< css::frame::XFrame > xFrame,
StatusBar* pStatusBar );
virtual ~StatusBarManager() override;
diff --git a/framework/inc/uielement/statusbarwrapper.hxx b/framework/inc/uielement/statusbarwrapper.hxx
index 84b2befb459d..203ae6956a16 100644
--- a/framework/inc/uielement/statusbarwrapper.hxx
+++ b/framework/inc/uielement/statusbarwrapper.hxx
@@ -31,7 +31,7 @@ class StatusBarWrapper final : public UIConfigElementWrapperBase
{
public:
StatusBarWrapper(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~StatusBarWrapper() override;
// XComponent
diff --git a/framework/inc/uielement/styletoolbarcontroller.hxx b/framework/inc/uielement/styletoolbarcontroller.hxx
index b7bbd8a11782..45b1ad7eccce 100644
--- a/framework/inc/uielement/styletoolbarcontroller.hxx
+++ b/framework/inc/uielement/styletoolbarcontroller.hxx
@@ -34,7 +34,7 @@ class StyleDispatcher final : public cppu::WeakImplHelper< css::frame::XDispatch
{
public:
StyleDispatcher( const css::uno::Reference< css::frame::XFrame >& rFrame,
- const css::uno::Reference< css::util::XURLTransformer >& rUrlTransformer,
+ css::uno::Reference< css::util::XURLTransformer > xUrlTransformer,
const css::util::URL& rURL );
// XDispatch
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 3ac9ef15012a..1cfddd99ef45 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -115,11 +115,11 @@ class ToolBarManager final : public ToolbarManager_Base
public:
ToolBarManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< css::frame::XFrame >& rFrame,
- const OUString& rResourceName,
+ OUString aResourceName,
ToolBox* pToolBar );
ToolBarManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< css::frame::XFrame >& rFrame,
- const OUString& rResourceName,
+ OUString aResourceName,
weld::Toolbar* pToolBar,
weld::Builder* pBuilder );
virtual ~ToolBarManager() override;
diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx
index f236f943082b..8e6f0c7de470 100644
--- a/framework/inc/uielement/uielement.hxx
+++ b/framework/inc/uielement/uielement.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <rtl/ustring.hxx>
+#include <utility>
#include <vcl/toolbox.hxx>
namespace framework
@@ -65,12 +66,12 @@ struct UIElement
m_nStyle( ButtonType::SYMBOLONLY )
{}
- UIElement( const OUString& rName,
- const OUString& rType,
- const css::uno::Reference< css::ui::XUIElement >& rUIElement
- ) : m_aType( rType ),
- m_aName( rName ),
- m_xUIElement( rUIElement ),
+ UIElement( OUString aName,
+ OUString aType,
+ css::uno::Reference< css::ui::XUIElement > xUIElement
+ ) : m_aType(std::move( aType )),
+ m_aName(std::move( aName )),
+ m_xUIElement(std::move( xUIElement )),
m_bFloating( false ),
m_bVisible( true ),
m_bUserActive( false ),