summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-23 14:13:05 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-23 19:52:50 +0100
commit9a6298aedb663513c039efccc516dec3188dd8fa (patch)
tree068a77e35769a4ba0de3aa66b09d1a467ba31faa /sw
parentf82b8bf05a76ad9cc3fe950f4180c90bce56d79b (diff)
cid#1546006 COPY_INSTEAD_OF_MOVE
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 <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/tabsh.cxx11
1 files changed, 6 insertions, 5 deletions
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<SwWebView*>( &rSh.GetView()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
- std::shared_ptr<SwTableRep> pTableRep(::lcl_TableParamToItemSet(aCoreSet, rSh));
+ std::shared_ptr<SwTableRep> 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<const SfxStringItem *>(pItem)->GetValue());
- auto pRequest = std::make_shared<SfxRequest>(rReq);
+ auto xRequest = std::make_shared<SfxRequest>(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);
}