sc/source/ui/drawfunc/drawsh.cxx      |    2 +-
 sc/source/ui/drawfunc/drtxtob.cxx     |    2 +-
 sc/source/ui/view/tabvwshb.cxx        |    2 +-
 sc/source/ui/view/tabvwshf.cxx        |   16 ++++++++--------
 sd/source/ui/func/futxtatt.cxx        |    2 +-
 sd/source/ui/table/tableobjectbar.cxx |    2 +-
 sw/source/uibase/shells/drawdlg.cxx   |    2 +-
 sw/source/uibase/shells/drwbassh.cxx  |    2 +-
 sw/source/uibase/shells/drwtxtsh.cxx  |    2 +-
 sw/source/uibase/shells/tabsh.cxx     |    2 +-
 sw/source/uibase/uiview/viewdlg2.cxx  |    2 +-
 11 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit f0f60a8138d9abc66d3135d56cf3735abe1c7a5d
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 19:05:42 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jan 28 21:08:20 2024 +0100

    cid#1588088 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1588087 COPY_INSTEAD_OF_MOVE
    cid#1588085 COPY_INSTEAD_OF_MOVE
    cid#1588084 COPY_INSTEAD_OF_MOVE
    cid#1588083 COPY_INSTEAD_OF_MOVE
    cid#1588082 COPY_INSTEAD_OF_MOVE
    cid#1588081 COPY_INSTEAD_OF_MOVE
    cid#1588080 COPY_INSTEAD_OF_MOVE
    cid#1588079 COPY_INSTEAD_OF_MOVE
    cid#1588078 COPY_INSTEAD_OF_MOVE
    cid#1588077 COPY_INSTEAD_OF_MOVE
    cid#1588076 COPY_INSTEAD_OF_MOVE
    cid#1588073 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ibd0fc37ed1f93e0c092e0ce2ef04b28b4df4bccf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162665
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 19e455fd2169..33be79c566d9 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -562,7 +562,7 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
     auto xRequest = std::make_shared<SfxRequest>(rReq);
     rReq.Ignore(); // the 'old' request is not relevant any more
     pDlg->StartExecuteAsync(
-        [pDlg, xRequest, bHasMarked, pView] (sal_Int32 nResult)->void
+        [pDlg, xRequest=std::move(xRequest), bHasMarked, pView] (sal_Int32 
nResult)->void
         {
             if ( RET_OK == nResult )
             {
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index b283e0546b6a..a36691161c1a 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -891,7 +891,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
                     auto xRequest = std::make_shared<SfxRequest>(rReq);
                     rReq.Ignore(); // the 'old' request is not relevant any 
more
                     pDlg->StartExecuteAsync(
-                        [this, pDlg, pArgs, aNewAttr, bSet, xRequest, pView] 
(sal_Int32 nResult) mutable -> void
+                        [this, pDlg, pArgs, aNewAttr, bSet, 
xRequest=std::move(xRequest), pView] (sal_Int32 nResult) mutable -> void
                         {
                             if ( RET_OK == nResult )
                                 aNewAttr.Put( *pDlg->GetOutputItemSet() );
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index c959be484d8b..a4f43f1d2302 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -407,7 +407,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
                 auto xRequest = std::make_shared<SfxRequest>(rReq);
                 rReq.Ignore(); // the 'old' request is not relevant any more
                 pDialog->StartExecuteAsync(
-                    [pDialog, xRequest] (sal_Int32 nResult)->void
+                    [pDialog, xRequest=std::move(xRequest)] (sal_Int32 
nResult)->void
                     {
                         if (nResult == RET_OK)
                             pDialog->Apply();
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 0440fe8ac019..f302d83aaf24 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -691,8 +691,8 @@ void ScTabViewShell::ExecuteMoveTable( SfxRequest& rReq )
             // is selected.
             pDlg->EnableRenameTable(nTabSelCount == 1);
 
-            std::shared_ptr<SfxRequest> pReq = 
std::make_shared<SfxRequest>(rReq);
-            pDlg->StartExecuteAsync([this, pDlg, pReq,
+            std::shared_ptr<SfxRequest> xReq = 
std::make_shared<SfxRequest>(rReq);
+            pDlg->StartExecuteAsync([this, pDlg, xReq=std::move(xReq),
                                      nContextMenuTab](sal_Int32 nResult) {
 
                 OUString aTableName;
@@ -727,18 +727,18 @@ void ScTabViewShell::ExecuteMoveTable( SfxRequest& rReq )
                             }
                         }
                     }
-                    pReq->AppendItem(SfxStringItem(FID_TAB_MOVE, 
aFoundDocName));
+                    xReq->AppendItem(SfxStringItem(FID_TAB_MOVE, 
aFoundDocName));
                     // 1-based table, if not APPEND
                     SCTAB nBasicTab = (nContextMenuTab <= MAXTAB)
                                           ? (nContextMenuTab + 1)
                                           : nContextMenuTab;
-                    pReq->AppendItem(
+                    xReq->AppendItem(
                         SfxUInt16Item(FN_PARAM_1, 
static_cast<sal_uInt16>(nBasicTab)));
-                    pReq->AppendItem(SfxBoolItem(FN_PARAM_2, bCopy));
+                    xReq->AppendItem(SfxBoolItem(FN_PARAM_2, bCopy));
 
                     if (bDoItAsync)
                     {
-                        pReq->Done();
+                        xReq->Done();
 
                         // send move or copy request
                         MoveTable(nDocument, nTargetIndex, bCopy, &aTableName, 
true,
@@ -815,7 +815,7 @@ void ScTabViewShell::ExecuteMoveTable( SfxRequest& rReq )
         auto xRequest = std::make_shared<SfxRequest>(rReq);
         rReq.Ignore(); // the 'old' request is not relevant any more
         pDlg->StartExecuteAsync(
-            [this, pDlg, xRequest] (sal_Int32 nResult)->void
+            [this, pDlg, xRequest=std::move(xRequest)] (sal_Int32 
nResult)->void
             {
                 if (nResult == RET_OK)
                 {
@@ -891,7 +891,7 @@ void ScTabViewShell::ExecuteInsertTable(SfxRequest& rReq)
         VclPtr<AbstractScInsertTableDlg> 
pDlg(pFact->CreateScInsertTableDlg(GetFrameWeld(), rViewData,
             nTabSelCount, nSlot == FID_INS_TABLE_EXT));
         pDlg->StartExecuteAsync(
-            [this, pDlg, xRequest] (sal_Int32 nResult)->void
+            [this, pDlg, xRequest=std::move(xRequest)] (sal_Int32 
nResult)->void
             {
                 if (nResult == RET_OK)
                     DoInsertTableFromDialog(*xRequest, pDlg);
diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx
index 9d9ce86fee67..31f211aa2ee6 100644
--- a/sd/source/ui/func/futxtatt.cxx
+++ b/sd/source/ui/func/futxtatt.cxx
@@ -64,7 +64,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq )
     rReq.Ignore(); // the 'old' request is not relevant any more
     auto pView = mpView; // copy vars we need, FuTextAttrDlg object will be 
gone by the time the dialog completes
     pDlg->StartExecuteAsync(
-        [pDlg, xRequest, pView] (sal_Int32 nResult)->void
+        [pDlg, xRequest=std::move(xRequest), pView] (sal_Int32 nResult)->void
         {
             if (nResult == RET_OK)
             {
diff --git a/sd/source/ui/table/tableobjectbar.cxx 
b/sd/source/ui/table/tableobjectbar.cxx
index bd19915692e8..2f60f0882376 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -132,7 +132,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
                                                                nSlotId == 
SID_TABLE_INSERT_COL_DLG,
                                                                
SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) );
             pDlg->StartExecuteAsync(
-                [pDlg, xRequest, nSlotId, xController, pBindings] (sal_Int32 
nResult) mutable ->void
+                [pDlg, xRequest=std::move(xRequest), nSlotId, xController, 
pBindings] (sal_Int32 nResult) mutable ->void
                 {
                     if (nResult == RET_OK)
                     {
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index 6d4573ac7a04..6c9aee83debd 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -65,7 +65,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
             auto xRequest = std::make_shared<SfxRequest>(rReq);
             rReq.Ignore(); // the 'old' request is not relevant any more
             pDlg->StartExecuteAsync(
-                [pDlg, xRequest, pView, pSh] (sal_Int32 nResult)->void
+                [pDlg, xRequest=std::move(xRequest), pView, pSh] (sal_Int32 
nResult)->void
                 {
                     if (nResult == RET_OK)
                     {
diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index 2e09143e0335..09f85b7ccbc9 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -145,7 +145,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq)
                         SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
                         VclPtr<SfxAbstractDialog> 
pDlg(pFact->CreateSwWrapDlg(GetView().GetFrameWeld(), aSet, pSh));
                         pDlg->StartExecuteAsync(
-                            [pDlg, pSh, xRequest] (sal_Int32 nResult)->void
+                            [pDlg, pSh, xRequest=std::move(xRequest)] 
(sal_Int32 nResult)->void
                             {
                                 if (nResult == RET_OK)
                                 {
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx 
b/sw/source/uibase/shells/drwtxtsh.cxx
index 209e3bf0a04a..ae5d6879cecb 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -445,7 +445,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
                 auto xRequest = std::make_shared<SfxRequest>(rReq);
                 rReq.Ignore(); // the 'old' request is not relevant any more
                 pDlg->StartExecuteAsync(
-                    [this, pDlg, xRequest] (sal_Int32 nResult)->void
+                    [this, pDlg, xRequest=std::move(xRequest)] (sal_Int32 
nResult)->void
                     {
                         if (nResult == RET_OK)
                         {
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 4e17153d166f..48ef761818dd 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -996,7 +996,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
                 VclPtr<SvxAbstractInsRowColDlg> 
pDlg(pFact->CreateSvxInsRowColDlg(GetView().GetFrameWeld(),
                                                                                
         nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand()));
                 pDlg->StartExecuteAsync(
-                    [this, pDlg, xRequest, nSlot] (sal_Int32 nResult)->void
+                    [this, pDlg, xRequest=std::move(xRequest), nSlot] 
(sal_Int32 nResult)->void
                     {
                         if (nResult == RET_OK)
                         {
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx 
b/sw/source/uibase/uiview/viewdlg2.cxx
index 696ce623a0a6..bd2b9509e6d9 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -70,7 +70,7 @@ void SwView::ExecDlgExt(SfxRequest& rReq)
             auto xRequest = std::make_shared<SfxRequest>(rReq);
             rReq.Ignore(); // the 'old' request is not relevant any more
             pDialog->StartExecuteAsync(
-                [pDialog, xRequest] (sal_Int32 nResult)->void
+                [pDialog, xRequest=std::move(xRequest)] (sal_Int32 
nResult)->void
                 {
                     if (nResult == RET_OK)
                         pDialog->Apply();

Reply via email to