cui/source/dialogs/SpellDialog.cxx                      |    4 ++--
 editeng/source/misc/svxacorr.cxx                        |    2 +-
 sc/source/ui/docshell/docsh.cxx                         |    2 +-
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |    2 +-
 sw/source/core/frmedt/fecopy.cxx                        |    2 +-
 sw/source/core/undo/untbl.cxx                           |    2 +-
 sw/source/core/undo/untblk.cxx                          |    4 +---
 sw/source/filter/writer/writer.cxx                      |    2 +-
 sw/source/ui/dbui/mmresultdialogs.cxx                   |    2 +-
 vcl/source/graphic/GraphicObject2.cxx                   |    2 +-
 10 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit 8416b3b8ce6c640976f2490495678cd3562b3835
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 5 08:31:59 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Dec 5 11:13:45 2025 +0100

    cid#1675328 Variable copied when it could be moved
    
    and
    
    cid#1660521 Variable copied when it could be moved
    cid#1660513 Variable copied when it could be moved
    cid#1660502 Variable copied when it could be moved
    cid#1660458 Variable copied when it could be moved
    cid#1660399 Variable copied when it could be moved
    cid#1660300 Variable copied when it could be moved
    cid#1660011 Variable copied when it could be moved
    cid#1659730 Variable copied when it could be moved
    cid#1659713 Variable copied when it could be moved
    cid#1557959 Variable copied when it could be moved
    
    Change-Id: I974cda301c10ce5c5c79a95d3ef0453195a9e31d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195053
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 1d45601f91c9..59ce2fc5c1b1 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2098,7 +2098,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 
             aPortion1.sText = m_xEditEngine->GetText(ESelection(0, 0, 0, 
nTextLen));
 
-            aRet.push_back(aPortion1);
+            aRet.push_back(std::move(aPortion1));
         }
         else
         {
@@ -2144,7 +2144,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
                 svx::SpellPortion aPortion2;
                 aPortion2.eLanguage = eLang;
                 aPortion2.sText = aLeftOverText.makeStringAndClear();
-                aRet.push_back( aPortion2 );
+                aRet.push_back(std::move(aPortion2));
             }
             else if (!aLeftOverText.isEmpty() && !aRet.empty())
             {   // we just need to append the left-over text to the last 
portion (which had no errors)
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index c03328447b71..6bfc0898cfea 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2082,7 +2082,7 @@ SvxAutoCorrect::SearchWordsInList(
             auto pRet = lcl_SearchWordsInList(&rList, rTxt, rStt, nEndPos);
             if (pRet)
             {
-                rLang = aLanguageTag;
+                rLang = std::move(aLanguageTag);
                 return pRet;
             }
         }
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index db598baae194..923a97253d0d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1474,7 +1474,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
             ScDocRowHeightUpdater::TabRanges aRecalcRanges(0, 
m_pDocument->MaxRow());
             ErrCode eError = DBaseImport( rMedium.GetPhysicalName(),
                     ScGlobal::GetCharsetValue(sItStr), aColWidthParam, 
aRecalcRanges.maRanges );
-            aRecalcRowRangesArray.push_back(aRecalcRanges);
+            aRecalcRowRangesArray.push_back(std::move(aRecalcRanges));
 
             if (eError != ERRCODE_NONE)
             {
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 17b31a15bb6d..366dd891b67e 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -453,7 +453,7 @@ static void GetTextAreaOutline(
                     }
 
 
-                    rParagraph.vCharacters.push_back( aCharacterData );
+                    
rParagraph.vCharacters.push_back(std::move(aCharacterData));
                 }
             }
 
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ee28fb587a26..9f725eb5537f 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -940,7 +940,7 @@ SwFEShell::Paste(SwDoc& rClpDoc, bool const bNestedTable)
                 else
                     aInsertion.first->GetPoint()->SetContent(
                         aInsertion.first->GetPointContentNode()->Len() );
-                aCopyVector.push_back( aInsertion );
+                aCopyVector.push_back(std::move(aInsertion));
             }
             // If there are no text portions left but there are some more
             // cursor positions to fill we have to restart with the first
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 500aa8262467..bed589f78dde 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1316,7 +1316,7 @@ void SaveBox::SaveContentAttrs( SwDoc& rDoc )
                     pSet->Put( *pCNd->GetpSwAttrSet() );
                 }
 
-                m_Ptrs.pContentAttrs->push_back(pSet);
+                m_Ptrs.pContentAttrs->push_back(std::move(pSet));
             }
         }
     }
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index bc58080ed32c..d17b744a0973 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -152,9 +152,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool 
bScanFlys,
             if( !m_pFrameFormats ||
                 m_pFrameFormats->end() == ( it = std::find( 
m_pFrameFormats->begin(), m_pFrameFormats->end(), pFormat ) ) )
             {
-                std::shared_ptr<SwUndoInsLayFormat> const pFlyUndo =
-                    std::make_shared<SwUndoInsLayFormat>(pFormat, 
SwNodeOffset(0), 0);
-                m_FlyUndos.push_back(pFlyUndo);
+                
m_FlyUndos.push_back(std::make_shared<SwUndoInsLayFormat>(pFormat, 
SwNodeOffset(0), 0));
             }
             else
                 m_pFrameFormats->erase( it );
diff --git a/sw/source/filter/writer/writer.cxx 
b/sw/source/filter/writer/writer.cxx
index 56ae833b6dfd..9175fabf6393 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -175,7 +175,7 @@ Writer::NewUnoCursor(SwDoc & rDoc, SwNodeOffset const 
nStartIdx, SwNodeOffset co
         OSL_FAIL( "No more ContentNode at StartPos" );
     }
 
-    auto const pNew = rDoc.CreateUnoCursor(SwPosition(aStt), false);
+    std::shared_ptr<SwUnoCursor> pNew = rDoc.CreateUnoCursor(SwPosition(aStt), 
false);
     pNew->SetMark();
     aStt = nEndIdx;
     pCNode = aStt.GetNode().GetContentNode();
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index fea693fe7ffa..879d35ec8809 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -997,7 +997,7 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, 
SendDocumentsHdl_Impl, weld::Button&, voi
             {
                 if( pFilter->GetUserData() == FILTER_WW8 && 
pFilter->CanExport() )
                 {
-                    pSfxFlt = pFilter;
+                    pSfxFlt = std::move(pFilter);
                     break;
                 }
                 pFilter = aIter.Next();
diff --git a/vcl/source/graphic/GraphicObject2.cxx 
b/vcl/source/graphic/GraphicObject2.cxx
index d0549386d1de..85d6154ede0a 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -451,7 +451,7 @@ void GraphicObject::ImplTransformBitmap( Bitmap&            
rBmp,
             aBmp2.Scale(Size(nPadTotalWidth, nPadTotalHeight));
             aBmp2.Erase( Color(ColorAlpha,0,0,0,0) );
             aBmp2.CopyPixel( tools::Rectangle( Point(nPadLeft, nPadTop), 
aBmpSize ), tools::Rectangle( Point(0, 0), aBmpSize ), rBmp );
-            rBmp = aBmp2;
+            rBmp = std::move(aBmp2);
         }
     }
 

Reply via email to