sc/source/ui/docshell/docsh4.cxx     |    2 +-
 sc/source/ui/view/tabvwsha.cxx       |    2 +-
 sc/source/ui/view/viewfunc.cxx       |    7 ++-----
 sw/source/uibase/shells/annotsh.cxx  |    2 +-
 sw/source/uibase/shells/drwtxtex.cxx |    2 +-
 5 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit c711535b98da9c47adf9444d7133b63dadc6384f
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Feb 3 14:30:35 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Feb 4 10:30:14 2024 +0100

    cid#1591492 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1591489 COPY_INSTEAD_OF_MOVE
    cid#1591488 COPY_INSTEAD_OF_MOVE
    cid#1591485 COPY_INSTEAD_OF_MOVE
    cid#1591483 COPY_INSTEAD_OF_MOVE
    cid#1591482 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I944ddb05042fbfe53f73eac2c16f3263cf3a4594
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162955
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 34916e553c30..30dc4eb57014 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1437,7 +1437,7 @@ void ScDocShell::ExecuteChartSource(SfxRequest& rReq)
         ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
         VclPtr<AbstractScColRowLabelDlg> 
pDlg(pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders));
         pDlg->StartExecuteAsync(
-            [this, pDlg, xRequest, bUndo, bMultiRange, aChartName, 
aRangeListRef, bAddRange,
+            [this, pDlg, xRequest=std::move(xRequest), bUndo, bMultiRange, 
aChartName, aRangeListRef, bAddRange,
              nCol1, nRow1, nCol2, nRow2, nTab] (sal_Int32 nResult)->void
             {
                 if (nResult == RET_OK)
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index df7233dcd288..1a33903d241f 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -1582,7 +1582,7 @@ void ScTabViewShell::ExecuteStyleEdit(SfxRequest& rReq, 
SfxStyleSheetBase* pStyl
     auto xRequest = std::make_shared<SfxRequest>(rReq);
     rReq.Ignore(); // the 'old' request is not relevant any more
     pDlg->StartExecuteAsync(
-        [this, pDlg, xRequest, pStyleSheet, nRetMask, xOldSet, nSlotId, 
bAddUndo, bUndo,
+        [this, pDlg, xRequest=std::move(xRequest), pStyleSheet, nRetMask, 
xOldSet, nSlotId, bAddUndo, bUndo,
             aOldData=rOldData, aNewData=rNewData, aOldName, eFamily, 
bStyleToMarked, bListAction,
             pEditObject, aSelection]
         (sal_Int32 nResult) mutable -> void
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index ed5de281b5bc..d551f5af7b29 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -725,17 +725,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB 
nTab,
         }
 
         OUString aFormula( rString );
-        std::shared_ptr< ScTokenArray > pArr;
 
         FormulaProcessingContext context_instance{
-            aPosPtr, aCompPtr, xModificator,  pArr,           nullptr,        
pData,
+            aPosPtr, aCompPtr, xModificator,  nullptr,        nullptr,        
pData,
             rMark,   *this,    OUString(),    aFormula,       rString,        
nCol,
             nRow,    nTab,     bMatrixExpand, bNumFmtChanged, bRecord
         };
 
-        std::shared_ptr<FormulaProcessingContext> context = 
std::make_shared<FormulaProcessingContext>(context_instance);
-
-        parseAndCorrectFormula(context);
+        
parseAndCorrectFormula(std::make_shared<FormulaProcessingContext>(context_instance));
     }
     else
     {
diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index 90fda625b172..5e75f096c194 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -490,7 +490,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
                 auto xRequest = std::make_shared<SfxRequest>(rReq);
                 rReq.Ignore(); // the 'old' request is not relevant any more
                 pDlg->StartExecuteAsync(
-                    [this, pDlg, xRequest, nEEWhich, aNewAttr2=aNewAttr, pOLV] 
(sal_Int32 nResult) mutable ->void
+                    [this, pDlg, xRequest=std::move(xRequest), nEEWhich, 
aNewAttr2=aNewAttr, pOLV] (sal_Int32 nResult) mutable ->void
                     {
                         if (nResult == RET_OK)
                         {
diff --git a/sw/source/uibase/shells/drwtxtex.cxx 
b/sw/source/uibase/shells/drwtxtex.cxx
index 102a7ec2960e..241eeeaaa32c 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -367,7 +367,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
                 auto xRequest = std::make_shared<SfxRequest>(rReq);
                 rReq.Ignore(); // the 'old' request is not relevant any more
                 pDlg->StartExecuteAsync(
-                    [this, pDlg, xRequest, nEEWhich, aNewAttr2=aNewAttr, pOLV, 
bRestoreSelection, aOldSelection] (sal_Int32 nResult) mutable ->void
+                    [this, pDlg, xRequest=std::move(xRequest), nEEWhich, 
aNewAttr2=aNewAttr, pOLV, bRestoreSelection, aOldSelection] (sal_Int32 nResult) 
mutable ->void
                     {
                         if (nResult == RET_OK)
                         {

Reply via email to