From 9a6298aedb663513c039efccc516dec3188dd8fa Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 23 Dec 2023 14:13:05 +0000 Subject: cid#1546006 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1545999 COPY_INSTEAD_OF_MOVE cid#1545995 COPY_INSTEAD_OF_MOVE cid#1545994 COPY_INSTEAD_OF_MOVE cid#1545989 COPY_INSTEAD_OF_MOVE cid#1545982 COPY_INSTEAD_OF_MOVE cid#1545977 COPY_INSTEAD_OF_MOVE cid#1545970 COPY_INSTEAD_OF_MOVE cid#1545856 COPY_INSTEAD_OF_MOVE cid#1545845 COPY_INSTEAD_OF_MOVE cid#1545838 COPY_INSTEAD_OF_MOVE cid#1545776 COPY_INSTEAD_OF_MOVE cid#1545774 COPY_INSTEAD_OF_MOVE cid#1545744 COPY_INSTEAD_OF_MOVE cid#1545719 COPY_INSTEAD_OF_MOVE cid#1545716 COPY_INSTEAD_OF_MOVE cid#1545687 COPY_INSTEAD_OF_MOVE cid#1545648 COPY_INSTEAD_OF_MOVE cid#1545643 COPY_INSTEAD_OF_MOVE cid#1545641 COPY_INSTEAD_OF_MOVE cid#1545604 COPY_INSTEAD_OF_MOVE cid#1545531 COPY_INSTEAD_OF_MOVE cid#1545530 COPY_INSTEAD_OF_MOVE cid#1545524 COPY_INSTEAD_OF_MOVE cid#1545516 COPY_INSTEAD_OF_MOVE cid#1545501 COPY_INSTEAD_OF_MOVE cid#1545486 COPY_INSTEAD_OF_MOVE Change-Id: Idcf3e27bb9e81b6a77d5ef75c9376eb1d6aff8c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161245 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/uibase/shells/tabsh.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 87df4f059d0d..736c70f20d79 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -608,7 +608,7 @@ void SwTableShell::Execute(SfxRequest &rReq) FieldUnit eMetric = ::GetDfltMetric(dynamic_cast( &rSh.GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); - std::shared_ptr pTableRep(::lcl_TableParamToItemSet(aCoreSet, rSh)); + std::shared_ptr xTableRep(::lcl_TableParamToItemSet(aCoreSet, rSh)); aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); rSh.GetTableAttr(aCoreSet); @@ -627,13 +627,14 @@ void SwTableShell::Execute(SfxRequest &rReq) if (pItem) pDlg->SetCurPageId(static_cast(pItem)->GetValue()); - auto pRequest = std::make_shared(rReq); + auto xRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more const bool bTableMode = rSh.IsTableMode(); SwPaM* pCursor = bTableMode ? rSh.GetTableCrs() : rSh.GetCursor(); // tdf#142165 use table cursor if in table mode auto vCursors = CopyPaMRing(*pCursor); // tdf#135636 make a copy to use at later apply - pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh, vCursors, bTableMode](sal_Int32 nResult){ + pDlg->StartExecuteAsync([pDlg, xRequest=std::move(xRequest), xTableRep=std::move(xTableRep), + &rBindings, &rSh, vCursors=std::move(vCursors), bTableMode](sal_Int32 nResult){ if (RET_OK == nResult) { if (!bTableMode && rSh.IsTableMode()) // tdf#140977 drop current table-cursor if setting a replacement @@ -650,8 +651,8 @@ void SwTableShell::Execute(SfxRequest &rReq) const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); //to record FN_INSERT_TABLE correctly - pRequest->SetSlot(FN_FORMAT_TABLE_DLG); - pRequest->Done(*pOutSet); + xRequest->SetSlot(FN_FORMAT_TABLE_DLG); + xRequest->Done(*pOutSet); ItemSetToTableParam(*pOutSet, rSh); } -- cgit