diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-25 22:08:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-26 11:52:39 +0100 |
commit | aa318cc3160841c2b22479cee7bf8941cf7e0d96 (patch) | |
tree | 3103f6eebc95f1638e52004b7b23d0f3bd7026f0 | |
parent | 8148dd6ed3c61eaf5f9fe3a060ecda9d11611f39 (diff) |
cid#1559937 COPY_INSTEAD_OF_MOVE
and
cid#1559939 COPY_INSTEAD_OF_MOVE
Change-Id: Ic5e581aff9e12c8c6277355b0a8bc99a155dc63e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161290
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 71b0d0970fc3..290025929d5a 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1346,7 +1346,7 @@ void SAL_CALL ColorPicker::startExecuteModal( const css::uno::Reference< css::ui { std::shared_ptr<ColorPickerDialog> xDlg = std::make_shared<ColorPickerDialog>(Application::GetFrameWeld(mxParent), mnColor, mnMode); rtl::Reference<ColorPicker> xThis(this); - weld::DialogController::runAsync(xDlg, [xThis, xDlg, xListener] (sal_Int32 nResult) { + weld::DialogController::runAsync(xDlg, [xThis=std::move(xThis), xDlg, xListener] (sal_Int32 nResult) { if (nResult) xThis->mnColor = xDlg->GetColor(); diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index a98149ff30bb..5943ce3b8f27 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -406,7 +406,7 @@ void PaletteManager::PopupColorPicker(weld::Window* pParent, const OUString& aCo m_pColorDlg->SetColor(rInitialColor); m_pColorDlg->SetMode(svtools::ColorPickerMode::Modify); std::shared_ptr<PaletteManager> xSelf(shared_from_this()); - m_pColorDlg->ExecuteAsync(pParent, [xSelf, aCommandCopy] (sal_Int32 nResult) { + m_pColorDlg->ExecuteAsync(pParent, [xSelf=std::move(xSelf), aCommandCopy] (sal_Int32 nResult) { if (nResult == RET_OK) { Color aLastColor = xSelf->m_pColorDlg->GetColor(); |