sw/source/core/crsr/crstrvl.cxx | 2 +- sw/source/core/doc/docedt.cxx | 2 +- sw/source/core/edit/edlingu.cxx | 4 ++-- sw/source/core/edit/edsect.cxx | 2 +- sw/source/core/layout/trvlfrm.cxx | 10 +++++----- sw/source/core/unocore/unoobj.cxx | 8 ++++---- sw/source/uibase/uno/unotxvw.cxx | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit 948e99fb30a98120e9c8281d5158faf9370e0a6f Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Nov 22 17:21:58 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Nov 24 12:52:17 2024 +0100 cid#1555216 COPY_INSTEAD_OF_MOVE and cid#1555525 COPY_INSTEAD_OF_MOVE cid#1555562 COPY_INSTEAD_OF_MOVE cid#1555676 COPY_INSTEAD_OF_MOVE cid#1556099 COPY_INSTEAD_OF_MOVE cid#1556527 COPY_INSTEAD_OF_MOVE cid#1556607 COPY_INSTEAD_OF_MOVE cid#1557084 COPY_INSTEAD_OF_MOVE cid#1557141 COPY_INSTEAD_OF_MOVE cid#1557937 COPY_INSTEAD_OF_MOVE cid#1556099 COPY_INSTEAD_OF_MOVE cid#1557774 COPY_INSTEAD_OF_MOVE Change-Id: Ifd716627d985dd43f4d1a9ce3df151e519fab03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177163 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index fc7aac7814d4..f2e4d72ac7cf 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2015,7 +2015,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, { SwCallLink aLk( *this ); // watch Cursor-Moves SwCursorSaveState aSaveState( *m_pCurrentCursor ); - *m_pCurrentCursor->GetPoint() = aPos; + *m_pCurrentCursor->GetPoint() = std::move(aPos); if( m_pCurrentCursor->IsSelOvr( SwCursorSelOverFlags::CheckNodeSection | SwCursorSelOverFlags::Toggle) ) bRet = false; diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index c5dc09a64f3b..bf1d9d3679e6 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -428,7 +428,7 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev ) if( pOldTextNd == rPam.GetBound().GetContentNode() ) rPam.GetBound() = aAlphaPos; if( pOldTextNd == rPam.GetBound( false ).GetContentNode() ) - rPam.GetBound( false ) = aAlphaPos; + rPam.GetBound( false ) = std::move(aAlphaPos); } // delete the Node, at last! SwNode::Merge const eOldMergeFlag(pOldTextNd->GetRedlineMergeFlag()); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d2d3a3d4b842..e9900882a391 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -837,7 +837,7 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos, aPos.SetContent( nBegin + nLeft ); SwPaM* pCursor = GetCursor(); - *pCursor->GetPoint() = aPos; + *pCursor->GetPoint() = std::move(aPos); pCursor->SetMark(); ExtendSelection( true, nLen - nLeft - nRight ); // don't determine the rectangle in the current line @@ -1667,7 +1667,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl *pCursor->GetMark() = *pCursor->GetPoint(); } pCursor->SetMark(); - *pCursor->GetMark() = aStart; + *pCursor->GetMark() = std::move(aStart); CreatePortion(xAlt, pGrammarResult, false, false); } } diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 77fd2e7b3dc9..8059a313f3ac 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -460,7 +460,7 @@ void SwEditShell::DoSpecialInsert() // insert a new text node, and set the cursor GetDoc()->getIDocumentContentOperations().AppendTextNode( aInsertPos ); - *pCursorPos = aInsertPos; + *pCursorPos = std::move(aInsertPos); // call AttrChangeNotify for the UI CallChgLnk(); diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 38d0248e4e9e..65a6f7e8fdf7 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -293,11 +293,11 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, if (bConsiderBackground && bTestBackground && bBackRet) { - (*pPos) = aBackPos; + (*pPos) = std::move(aBackPos); } else if (!bBackRet) { - (*pPos) = aTextPos; + (*pPos) = std::move(aTextPos); } else // bBackRet && !(bConsiderBackground && bTestBackground) { @@ -328,7 +328,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, // previous character; to get a better measure from // lcl_getDistance, extend that to a rectangle over // the entire character. - SwPosition nextTextPos(prevTextPos); + SwPosition nextTextPos(std::move(prevTextPos)); nextTextPos.AdjustContent(+1); SwRect nextTextRect; pTextFrame->GetCharRect(nextTextRect, nextTextPos); @@ -375,11 +375,11 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, if ( bValidTextDistance && bValidBackDistance && basegfx::fTools::more( nTextDistance, nBackDistance ) ) { - (*pPos) = aBackPos; + (*pPos) = std::move(aBackPos); } else { - (*pPos) = aTextPos; + (*pPos) = std::move(aTextPos); } } } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index bee8090f4fe0..0d7b29bf9ccf 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -814,12 +814,12 @@ lcl_ForceIntoMeta(SwPaM & rCursor, case META_CHECK_BOTH: if (*rCursor.Start() < start) { - *rCursor.Start() = start; + *rCursor.Start() = std::move(start); bRet = false; } if (*rCursor.End() > end) { - *rCursor.End() = end; + *rCursor.End() = std::move(end); bRet = false; } break; @@ -866,13 +866,13 @@ bool lcl_ForceIntoContentControl(SwPaM& rCursor, const uno::Reference<text::XTex case CONTENT_CONTROL_CHECK_BOTH: if (*rCursor.Start() < aStart) { - *rCursor.Start() = aStart; + *rCursor.Start() = std::move(aStart); bRet = false; } if (*rCursor.End() > aEnd) { - *rCursor.End() = aEnd; + *rCursor.End() = std::move(aEnd); bRet = false; } break; diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index f48457b483ee..e7d4ca9f76cd 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1054,12 +1054,12 @@ void SwXTextViewCursor::gotoRange( auto [pParamLeft, pParamRight] = rDestPam.StartEnd(); // SwPosition* // Now four SwPositions are there, two of them are needed, but which? if(aOwnRight > *pParamRight) - *aOwnPaM.GetPoint() = aOwnRight; + *aOwnPaM.GetPoint() = std::move(aOwnRight); else *aOwnPaM.GetPoint() = *pParamRight; aOwnPaM.SetMark(); if(aOwnLeft < *pParamLeft) - *aOwnPaM.GetMark() = aOwnLeft; + *aOwnPaM.GetMark() = std::move(aOwnLeft); else *aOwnPaM.GetMark() = *pParamLeft; }