diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 06:43:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 09:05:19 +0200 |
commit | 9fe2ead3d5355224dd94d6462b0ddc6100f6d4e3 (patch) | |
tree | 56746904f7c6428882d0e6b85a7b77f4853b535b /svx/source/tbxctrls | |
parent | 0db7e46536fc23d5201ed9ff610a8ae0efd09a96 (diff) |
loplugin:moveparam in svx
Change-Id: I92fe2882c948e7297e5d54963647b4aa054f8f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123241
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewWindow.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx index 8a96feeb43c9..64e6ed7822fe 100644 --- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx +++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx @@ -155,8 +155,8 @@ StylesPreviewToolBoxControl::createItemWindow(const css::uno::Reference<css::awt { SolarMutexGuard aSolarMutexGuard; - m_xVclBox = VclPtr<StylesPreviewWindow_Impl>::Create(pParent, m_aDefaultStyles, - m_xDispatchProvider); + m_xVclBox = VclPtr<StylesPreviewWindow_Impl>::Create( + pParent, std::vector(m_aDefaultStyles), m_xDispatchProvider); xItemWindow = VCLUnoHelper::GetInterface(m_xVclBox); } } diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index fc31ea9444b8..d1a43c135848 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -353,11 +353,11 @@ void StyleItemController::DrawText(vcl::RenderContext& rRenderContext) } StylesPreviewWindow_Base::StylesPreviewWindow_Base( - weld::Builder& xBuilder, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) : m_xDispatchProvider(xDispatchProvider) , m_xStylesView(xBuilder.weld_icon_view("stylesview")) - , m_aDefaultStyles(aDefaultStyles) + , m_aDefaultStyles(std::move(aDefaultStyles)) { m_xStylesView->connect_selection_changed(LINK(this, StylesPreviewWindow_Base, Selected)); m_xStylesView->connect_item_activated(LINK(this, StylesPreviewWindow_Base, DoubleClick)); @@ -477,11 +477,11 @@ void StylesPreviewWindow_Base::UpdateStylesList() } StylesPreviewWindow_Impl::StylesPreviewWindow_Impl( - vcl::Window* pParent, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , StylesPreviewWindow_Base(*m_xBuilder, aDefaultStyles, xDispatchProvider) + , StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xDispatchProvider) { SetOptimalSize(); } |