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(); } }