From 57301e8ebe59a0757fc47c8e5c8b6aad5237ef7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 6 Mar 2026 16:33:28 +0000 Subject: [PATCH] cid#1684041 Variable copied when it could be moved MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1684043 Variable copied when it could be moved cid#1684048 Variable copied when it could be moved cid#1684049 Variable copied when it could be moved cid#1684050 Variable copied when it could be moved Change-Id: I9745b94b2c171c76c760ae406094622702b4d251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201143 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sc/source/ui/view/tabvwsha.cxx | 6 ++++-- svx/source/svdraw/svdogrp.cxx | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 4024ef519f7a..e2a2ebe382c1 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -1050,7 +1050,8 @@ void ScTabViewShell::ExecStyle( SfxRequest& rReq ) case SID_STYLE_SHOW: case SID_STYLE_NEW_BY_EXAMPLE: { - auto lambda = [pStylePool, nSlotId, xOldData, xNewData, eFamily, this](SfxRequest& rRequest, const OUString& rStyleName) + auto lambda = [pStylePool, nSlotId, xOldData=std::move(xOldData), + xNewData=std::move(xNewData), eFamily, this](SfxRequest& rRequest, const OUString& rStyleName) { SfxStyleSheetBase* pApplyStyleSheet = pStylePool->Find(rStyleName, eFamily); xOldData->InitFromStyle(pApplyStyleSheet); @@ -1070,7 +1071,8 @@ void ScTabViewShell::ExecStyle( SfxRequest& rReq ) auto xDlg = std::make_shared(pDialogParent, *pStylePool, eFamily); auto xRequest = std::make_shared(rReq); rReq.Ignore(); - weld::GenericDialogController::runAsync(xDlg,[xDlg, xRequest, lambda](sal_Int32 nResult){ + weld::GenericDialogController::runAsync(xDlg,[xDlg, xRequest=std::move(xRequest), + lambda=std::move(lambda)](sal_Int32 nResult){ if (nResult == RET_OK) { lambda(*xRequest, xDlg->GetName()); } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index de1fda977380..39d03efbf5f0 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -842,9 +842,7 @@ void SdrObjGroup::SetDescription(const OUString& rStr) aOrigDescription = OUString::fromUtf8(aDiagramModel.get("origDesc", "")); // parse content to a new Diagram DataModel - std::shared_ptr aNewHelper(svx::diagram::DiagramHelperFactory_svx::getDiagramHelperFactory_svx().createDiagramHelper_svx(aDiagramModel)); - - mp_DiagramHelper = aNewHelper; + mp_DiagramHelper = svx::diagram::DiagramHelperFactory_svx::getDiagramHelperFactory_svx().createDiagramHelper_svx(aDiagramModel); mp_DiagramHelper->getRootShape() = getUnoShape(); } }