cid#1684041 Variable copied when it could be moved

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 <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2026-03-06 20:09:07 +01:00
parent d81ce666bb
commit 57301e8ebe
2 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -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<SfxNewStyleDlg>(pDialogParent, *pStylePool, eFamily);
auto xRequest = std::make_shared<SfxRequest>(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());
}
+1 -3
View File
@@ -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<svx::diagram::DiagramHelper_svx> 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();
}
}