summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbcontrl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-20 09:51:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-21 08:59:50 +0200
commit85f4938719180e1e344b28c073f909df6f972f96 (patch)
tree21aa235575692503cf2a2d40f0e63b7aad661b9f /svx/source/tbxctrls/tbcontrl.cxx
parentcf69bb4f503eb8b3966d5caf825e0c05264a369e (diff)
clang-tidy modernize-pass-by-value in svx
Change-Id: Iedd87d321f4d161574df87629fdd6c7714ff31c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls/tbcontrl.cxx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index f19f683d71b0..70063a04980b 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -120,10 +120,10 @@ namespace
class SvxStyleBox_Base
{
public:
- SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget, const OUString& rCommand, SfxStyleFamily eFamily,
+ SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget, OUString rCommand, SfxStyleFamily eFamily,
const Reference<XDispatchProvider>& rDispatchProvider,
- const Reference<XFrame>& _xFrame,const OUString& rClearFormatKey,
- const OUString& rMoreKey, bool bInSpecialMode, SvxStyleToolBoxControl& rCtrl);
+ const Reference<XFrame>& _xFrame, OUString aClearFormatKey,
+ OUString aMoreKey, bool bInSpecialMode, SvxStyleToolBoxControl& rCtrl);
virtual ~SvxStyleBox_Base()
{
@@ -836,12 +836,12 @@ class SfxStyleControllerItem_Impl : public SfxStatusListener
#define ITEM_HEIGHT 30
SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget,
- const OUString& rCommand,
+ OUString aCommand,
SfxStyleFamily eFamily,
const Reference< XDispatchProvider >& rDispatchProvider,
const Reference< XFrame >& _xFrame,
- const OUString& rClearFormatKey,
- const OUString& rMoreKey,
+ OUString _aClearFormatKey,
+ OUString _aMoreKey,
bool bInSpec, SvxStyleToolBoxControl& rCtrl)
: m_rCtrl(rCtrl)
, m_xMenuBuilder(Application::CreateBuilder(nullptr, "svx/ui/stylemenu.ui"))
@@ -853,9 +853,9 @@ SvxStyleBox_Base::SvxStyleBox_Base(std::unique_ptr<weld::ComboBox> xWidget,
, bRelease( true )
, m_xDispatchProvider( rDispatchProvider )
, m_xFrame(_xFrame)
- , m_aCommand( rCommand )
- , aClearFormatKey( rClearFormatKey )
- , aMoreKey( rMoreKey )
+ , m_aCommand(std::move( aCommand ))
+ , aClearFormatKey(std::move( _aClearFormatKey ))
+ , aMoreKey(std::move( _aMoreKey ))
, bInSpecialMode( bInSpec )
{
m_xWidget->connect_changed(LINK(this, SvxStyleBox_Base, SelectHdl));
@@ -1760,22 +1760,22 @@ IMPL_LINK(SvxFontNameBox_Base, DumpAsPropertyTreeHdl, tools::JsonWriter&, rJsonW
rJsonWriter.put("command", ".uno:CharFontName");
}
-ColorWindow::ColorWindow(const OUString& rCommand,
- std::shared_ptr<PaletteManager> const & rPaletteManager,
+ColorWindow::ColorWindow(OUString rCommand,
+ std::shared_ptr<PaletteManager> xPaletteManager,
ColorStatus& rColorStatus,
sal_uInt16 nSlotId,
const Reference< XFrame >& rFrame,
const MenuOrToolMenuButton& rMenuButton,
- TopLevelParentFunction const& rTopLevelParentFunction,
- ColorSelectFunction const & rColorSelectFunction)
+ TopLevelParentFunction aTopLevelParentFunction,
+ ColorSelectFunction aColorSelectFunction)
: WeldToolbarPopup(rFrame, rMenuButton.get_widget(), "svx/ui/colorwindow.ui", "palette_popup_window")
, theSlotId(nSlotId)
- , maCommand(rCommand)
+ , maCommand(std::move(rCommand))
, maMenuButton(rMenuButton)
- , mxPaletteManager(rPaletteManager)
+ , mxPaletteManager(std::move(xPaletteManager))
, mrColorStatus(rColorStatus)
- , maTopLevelParentFunction(rTopLevelParentFunction)
- , maColorSelectFunction(rColorSelectFunction)
+ , maTopLevelParentFunction(std::move(aTopLevelParentFunction))
+ , maColorSelectFunction(std::move(aColorSelectFunction))
, mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true)))
, mxRecentColorSet(new SvxColorValueSet(nullptr))
, mxPaletteListBox(m_xBuilder->weld_combo_box("palette_listbox"))
@@ -3973,13 +3973,13 @@ void ColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton)
createColorWindow();
}
-ColorListBox::ColorListBox(std::unique_ptr<weld::MenuButton> pControl, TopLevelParentFunction const& rTopLevelParentFunction)
+ColorListBox::ColorListBox(std::unique_ptr<weld::MenuButton> pControl, TopLevelParentFunction aTopLevelParentFunction)
: m_xButton(std::move(pControl))
, m_aColorWrapper(this)
, m_aAutoDisplayColor(Application::GetSettings().GetStyleSettings().GetDialogColor())
, m_nSlotId(0)
, m_bShowNoneButton(false)
- , m_aTopLevelParentFunction(rTopLevelParentFunction)
+ , m_aTopLevelParentFunction(std::move(aTopLevelParentFunction))
{
m_xButton->connect_toggled(LINK(this, ColorListBox, ToggleHdl));
m_aSelectedColor = svx::NamedThemedColor::FromNamedColor(GetAutoColor(m_nSlotId));
@@ -4125,10 +4125,10 @@ MenuOrToolMenuButton::MenuOrToolMenuButton(weld::MenuButton* pMenuButton)
{
}
-MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar* pToolbar, const OString& rIdent)
+MenuOrToolMenuButton::MenuOrToolMenuButton(weld::Toolbar* pToolbar, OString aIdent)
: m_pMenuButton(nullptr)
, m_pToolbar(pToolbar)
- , m_aIdent(rIdent)
+ , m_aIdent(std::move(aIdent))
, m_pControl(nullptr)
, m_nId(0)
{