cid#1554844 COPY_INSTEAD_OF_MOVE

and

cid#1554878 COPY_INSTEAD_OF_MOVE
cid#1554907 COPY_INSTEAD_OF_MOVE
cid#1555082 COPY_INSTEAD_OF_MOVE
cid#1555224 COPY_INSTEAD_OF_MOVE
cid#1555301 COPY_INSTEAD_OF_MOVE
cid#1555378 COPY_INSTEAD_OF_MOVE
cid#1555395 COPY_INSTEAD_OF_MOVE
cid#1555452 COPY_INSTEAD_OF_MOVE
cid#1555466 COPY_INSTEAD_OF_MOVE
cid#1555514 COPY_INSTEAD_OF_MOVE
cid#1555566 COPY_INSTEAD_OF_MOVE
cid#1555753 COPY_INSTEAD_OF_MOVE
cid#1555782 COPY_INSTEAD_OF_MOVE
cid#1555825 COPY_INSTEAD_OF_MOVE
cid#1555842 COPY_INSTEAD_OF_MOVE
cid#1555891 COPY_INSTEAD_OF_MOVE
cid#1555917 COPY_INSTEAD_OF_MOVE
cid#1555961 COPY_INSTEAD_OF_MOVE
cid#1556021 COPY_INSTEAD_OF_MOVE
cid#1556055 COPY_INSTEAD_OF_MOVE
cid#1556307 COPY_INSTEAD_OF_MOVE
cid#1556349 COPY_INSTEAD_OF_MOVE
cid#1556436 COPY_INSTEAD_OF_MOVE
cid#1556665 COPY_INSTEAD_OF_MOVE
cid#1556696 COPY_INSTEAD_OF_MOVE
cid#1556718 COPY_INSTEAD_OF_MOVE
cid#1556775 COPY_INSTEAD_OF_MOVE
cid#1556835 COPY_INSTEAD_OF_MOVE
cid#1556877 COPY_INSTEAD_OF_MOVE
cid#1556994 COPY_INSTEAD_OF_MOVE
cid#1557010 COPY_INSTEAD_OF_MOVE
cid#1557074 COPY_INSTEAD_OF_MOVE
cid#1557111 COPY_INSTEAD_OF_MOVE
cid#1557142 COPY_INSTEAD_OF_MOVE
cid#1557163 COPY_INSTEAD_OF_MOVE
cid#1557164 COPY_INSTEAD_OF_MOVE
cid#1557214 COPY_INSTEAD_OF_MOVE
cid#1557254 COPY_INSTEAD_OF_MOVE
cid#1557322 COPY_INSTEAD_OF_MOVE
cid#1557327 COPY_INSTEAD_OF_MOVE
cid#1557492 COPY_INSTEAD_OF_MOVE
cid#1557565 COPY_INSTEAD_OF_MOVE
cid#1557663 COPY_INSTEAD_OF_MOVE
cid#1557798 COPY_INSTEAD_OF_MOVE

Change-Id: I2ae9c184dcc18d44a65437e18c49e16b27f4d81d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-10-14 08:50:12 +01:00
parent 3efad499bf
commit 23d7910c1e
38 changed files with 52 additions and 52 deletions

View file

@ -325,7 +325,7 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int64 i )
// set states
pChild->SetStates();
xChild = pChild;
xChild = std::move(pChild);
// insert into menu item list
m_aAccessibleChildren[i] = xChild;

View file

@ -1124,7 +1124,7 @@ static bool lcl_moveSeriesOrCheckIfMoveIsAllowed(
}
}
}
xFormerChartType = xCurrentChartType;
xFormerChartType = std::move(xCurrentChartType);
}
}
}
@ -1762,7 +1762,7 @@ Diagram::tTemplateWithServiceName
if (xTempl.is() && xTempl->matchesTemplate2(this, true))
{
aResult.xChartTypeTemplate = xTempl;
aResult.xChartTypeTemplate = std::move(xTempl);
aResult.sServiceName = aServiceNames[ i ];
bTemplateFound = true;
}

View file

@ -241,7 +241,7 @@ InterpretedData StockDataInterpreter::interpretDataSource(
xSeries = new DataSeries;
assert( xSeries.is() );
xSeries->setData( aSequences[nGroupIndex][nSeriesIdx] );
pResultSerie[nSeriesIdx] = xSeries;
pResultSerie[nSeriesIdx] = std::move(xSeries);
}
catch( const uno::Exception & )
{

View file

@ -2816,7 +2816,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
// set CID to symbol for selection
if( xShape.is() )
{
aEntry.xSymbol = xSymbolGroup;
aEntry.xSymbol = std::move(xSymbolGroup);
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) );
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
@ -2932,7 +2932,7 @@ std::vector<ViewLegendSymbol> VSeriesPlotter::createSymbolsForSeries(
// set CID to symbol for selection
if (xShape.is())
{
aEntry.xSymbol = xSymbolGroup;
aEntry.xSymbol = std::move(xSymbolGroup);
aResult.push_back(aEntry);
}
}

View file

@ -241,7 +241,7 @@ codemaker::UnoType::Sort TypeManager::decompose(
}
}
if (entity != nullptr) {
*entity = ent;
*entity = std::move(ent);
}
return
codemaker::UnoType::Sort::InstantiatedPolymorphicStruct;

View file

@ -159,7 +159,7 @@ void Access::markChildAsModified(rtl::Reference< ChildAccess > const & child) {
parent->modifiedChildren_.emplace(
p->getNameInternal(),
ModifiedChild(static_cast< ChildAccess * >(p.get()), false));
p = parent;
p = std::move(parent);
}
}
@ -2287,7 +2287,7 @@ rtl::Reference< Access > Access::getNotificationRoot() {
if (!parent.is()) {
return p;
}
p = parent;
p = std::move(parent);
}
}

View file

@ -544,7 +544,7 @@ SQLHANDLE OConnection::createStatementHandle()
{
rtl::Reference xConnection(new OConnection(m_pDriverHandleCopy,m_xDriver.get()));
xConnection->Construct(m_sURL,getConnectionInfo());
xConnectionTemp = xConnection;
xConnectionTemp = std::move(xConnection);
bNew = true;
}
}

View file

@ -700,7 +700,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void)
if( pDshLst->Load() )
{
pDashList = pDshLst;
pDashList = std::move(pDshLst);
static_cast<SvxLineTabDialog*>(GetDialogController())->SetNewDashList( pDashList );
m_xLbLineStyles->clear();

View file

@ -797,7 +797,7 @@ void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow, ORowSetRow const & _rK
rtl::Reference aCopy(
new ORowSetValueVector(*m_aParameterValueForCache));
(*aCopy)[i] = (*_rInsertRow)[parameterName.second.nPosition];
m_aUpdatedParameter[i_nBookmark] = aCopy;
m_aUpdatedParameter[i_nBookmark] = std::move(aCopy);
bChanged = true;
}
++aParaValuesIter;

View file

@ -730,7 +730,7 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
assert(thread.is() == (stat == IPC_STATUS_OK));
if (stat == IPC_STATUS_OK) {
pGlobal = new RequestHandler;
pGlobal->mIpcThread = thread;
pGlobal->mIpcThread = std::move(thread);
pGlobal->mIpcThread->start(pGlobal.get());
}
return stat;

View file

@ -1195,7 +1195,7 @@ rtl::Reference<SdrObject> SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData
rtl::Reference<SdrObject> pGroup = new SdrObjGroup(*pSdrModel);
pGroup->GetSubList()->NbcInsertObject( pRet.get() );
pGroup->GetSubList()->NbcInsertObject( pTObj.get() );
pRet = pGroup;
pRet = std::move(pGroup);
}
else
pRet = pTObj.get();

View file

@ -276,14 +276,14 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>&
if (!pBasicReader->lastReadWasFormattedFake())
{
// yes -> all fine
m_xAggregate = pBasicReader;
m_xAggregate = std::move(pBasicReader);
}
else
{ // no -> substitute it with a formatted model
// let the formatted model do the reading
m_xFormattedPart.set(new OFormattedModel(m_xContext));
m_xFormattedPart->read(_rxInStream);
m_pEditPart = pBasicReader;
m_pEditPart = std::move(pBasicReader);
m_xAggregate.set( m_xFormattedPart, UNO_QUERY );
}
}

View file

@ -345,7 +345,7 @@ void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::uno::XCompon
xInteractionHandler = pQuietInteraction.get();
if ( o_ppQuietInteraction != nullptr )
{
*o_ppQuietInteraction = pQuietInteraction;
*o_ppQuietInteraction = std::move(pQuietInteraction);
}
}

View file

@ -300,7 +300,7 @@ rtl::Reference<XFContentContainer> LwpBulletStyleMgr::AddBulletList(
{
theItem->Add(prevList.get());
}
prevList = theList;
prevList = std::move(theList);
}
return InnerItem;
}

View file

@ -514,7 +514,7 @@ LwpHeaderLayout* LwpPageLayout::GetHeaderLayout()
SAL_WARN("lwp", "loop in layout");
break;
}
xLay = xNext;
xLay = std::move(xNext);
}
return nullptr;
}
@ -534,7 +534,7 @@ LwpFooterLayout* LwpPageLayout::GetFooterLayout()
SAL_WARN("lwp", "loop in layout");
break;
}
xLay = xNext;
xLay = std::move(xNext);
}
return nullptr;
}

View file

@ -422,7 +422,7 @@ bool ZipPackageStream::ParsePackageRawStream()
return false;
}
m_xBaseEncryptionData = xTempEncrData;
m_xBaseEncryptionData = std::move(xTempEncrData);
SetIsEncrypted ( true );
// it's already compressed and encrypted
m_bToBeEncrypted = m_bToBeCompressed = false;

View file

@ -342,7 +342,7 @@ void ScSelectionTransferObj::CreateDrawData()
pTransferObj->SetDrawPersist(aDragShellRef); // keep persist for ole objects alive
pTransferObj->SetDragSource( pDrawView ); // copies selection
mxDrawData = pTransferObj;
mxDrawData = std::move(pTransferObj);
}
}
OSL_ENSURE( mxDrawData.is(), "can't create DrawData" );

View file

@ -3034,13 +3034,13 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId)
if (it != maDocShells.end())
{
it->second.maShell->DoClose();
it->second.maShell = xDocShell;
it->second.maShell = std::move(xDocShell);
it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
}
else
{
SrcShell aSrcDoc;
aSrcDoc.maShell = xDocShell;
aSrcDoc.maShell = std::move(xDocShell);
aSrcDoc.maLastAccess = tools::Time(tools::Time::SYSTEM);
cacheNewDocShell(nFileId, aSrcDoc);
}

View file

@ -1527,8 +1527,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
return;
}
pNotesMaster = pNewNotesMaster;
pMaster = pNewMaster;
pNotesMaster = std::move(pNewNotesMaster);
pMaster = std::move(pNewMaster);
// layout name needs to be unique
aTargetNewLayoutName = pMaster->GetLayoutName();

View file

@ -766,7 +766,7 @@ static bool updateMotionPathImpl( CustomAnimationPane& rPane, ::sd::View& rView,
rtl::Reference< MotionPathTag > xTag( *aMIter );
if( !xTag->isDisposed() )
{
xMotionPathTag = xTag;
xMotionPathTag = std::move(xTag);
rOldTags.erase( aMIter );
}
}

View file

@ -910,7 +910,7 @@ void AnnotationManagerImpl::onSelectionChanged()
rtl::Reference<SdPage> xPage = mrBase.GetMainViewShell()->getCurrentPage();
if (xPage != mxCurrentPage)
{
mxCurrentPage = xPage;
mxCurrentPage = std::move(xPage);
UpdateTags(true);
}
}

View file

@ -454,7 +454,7 @@ ShutdownIcon* ShutdownIcon::createInstance()
try {
rtl::Reference<ShutdownIcon> pIcon(new ShutdownIcon( comphelper::getProcessComponentContext() ));
pIcon->init ();
pShutdownIcon = pIcon;
pShutdownIcon = std::move(pIcon);
} catch (...) {
}

View file

@ -106,7 +106,7 @@ storeError OStoreDirectory_Impl::create (
m_nPath = rtl_crc32 (m_nPath, "/", 1);
// Save page manager, and descriptor.
m_xManager = xManager;
m_xManager = std::move(xManager);
m_aDescr = xNode->m_aDescr;
return store_E_None;

View file

@ -87,7 +87,7 @@ storeError OStoreLockBytes::create (
if (eErrCode != store_E_None)
return eErrCode;
m_xManager = xManager;
m_xManager = std::move(xManager);
m_xNode = xNode;
m_bWriteable = (eMode != storeAccessMode::ReadOnly);

View file

@ -135,7 +135,7 @@ Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible( const Sdr
{
pAcc->Init();
}
mxShapes[pObj] = pAcc;
mxShapes[pObj] = std::move(pAcc);
// Create event and inform listeners of the object creation.
CommitChange( AccessibleEventId::CHILD, Any( xAccessibleShape ), Any( Reference<XAccessible>() ) );

View file

@ -255,7 +255,7 @@ void SvxPixelCtlAccessible::NotifyChild(tools::Long nIndex,bool bSelect ,bool bC
{
xNewChild->CheckChild();
}
m_xCurChild = xNewChild;
m_xCurChild = std::move(xNewChild);
}
rtl::Reference<SvxPixelCtlAccessibleChild> SvxPixelCtlAccessible::CreateChild (tools::Long nIndex,Point mPoint)

View file

@ -2612,7 +2612,7 @@ rtl::Reference<SdrObject> SdrObject::ConvertToContourObj(SdrObject* pRet1, bool
for (const rtl::Reference<SdrObject>& pIterObj : *pObjList2)
pGroup->GetSubList()->NbcInsertObject(ConvertToContourObj(pIterObj.get(), bForceLineDash).get());
pRet = pGroup;
pRet = std::move(pGroup);
}
else
{

View file

@ -977,7 +977,7 @@ rtl::Reference<SdrObject> SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAdd
}
else
{
pRetval = pLineFill;
pRetval = std::move(pLineFill);
}
}

View file

@ -156,7 +156,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sa
xAccessibleCell->Init();
maChildMap[xCell] = xAccessibleCell;
xChild = xAccessibleCell;
xChild = std::move(xAccessibleCell);
}
return xChild;
}
@ -268,7 +268,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
}
// move still existing cell from temporary child map to our child map
maChildMap[xCell] = xAccessibleCell;
maChildMap[xCell] = std::move(xAccessibleCell);
aTempChildMap.erase( iter );
}
else
@ -276,7 +276,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/
rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCell, nChildIndex, mrShapeTreeInfo ) );
xAccessibleCell->Init();
maChildMap[xCell] = xAccessibleCell;
maChildMap[xCell] = std::move(xAccessibleCell);
}
++nChildIndex;

View file

@ -598,7 +598,7 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount )
{
TableColumnRef xNewCol( new TableColumn( this, nIndex+nOffset ) );
maColumns[nIndex+nOffset] = xNewCol;
aNewColumns[nOffset] = xNewCol;
aNewColumns[nOffset] = std::move(xNewCol);
}
const bool bUndo(mpTableObj->IsInserted() && rModel.IsUndoEnabled());
@ -788,7 +788,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount )
{
TableRowRef xNewRow( new TableRow( this, nIndex+nOffset, nColCount ) );
maRows[nIndex+nOffset] = xNewRow;
aNewRows[nOffset] = xNewRow;
aNewRows[nOffset] = std::move(xNewRow);
}
if( bUndo )

View file

@ -177,7 +177,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
pClonedSdrShape->setUnoShape(pShape);
// pShape->InvalidateSdrObject();
// pShape->Create(pClonedSdrShape, this);
pObj = pClonedSdrShape;
pObj = std::move(pClonedSdrShape);
bNeededToClone = true;
}

View file

@ -4678,7 +4678,7 @@ void SAL_CALL SwXTextTableStyle::replaceByName(const OUString& rName, const uno:
xStyleToReplaceWith->SetBoxFormat(&m_pTableAutoFormat->GetBoxFormat(nBoxFormat));
m_pTableAutoFormat->GetBoxFormat(nBoxFormat).SetXObject(xStyleToReplaceWith);
// make this SwXTextTableStyle use new SwXTextCellStyle
m_aCellStyles[nCellStyle] = xStyleToReplaceWith;
m_aCellStyles[nCellStyle] = std::move(xStyleToReplaceWith);
}
void SAL_CALL SwXTextTableStyle::removeByName(const OUString& /*Name*/)

View file

@ -3805,7 +3805,7 @@ void WW8Export::PrepareStorage()
ErrCodeMsg SwWW8Writer::WriteStorage()
{
rtl::Reference<SotStorage> pOrigStg;
rtl::Reference<SotStorage> xOrigStg;
uno::Reference< packages::XPackageEncryption > xPackageEncryption;
std::shared_ptr<SvStream> pSotStorageStream;
uno::Sequence< beans::NamedValue > aEncryptionData;
@ -3831,7 +3831,7 @@ ErrCodeMsg SwWW8Writer::WriteStorage()
{
// We have an encryptor
// Create new temporary storage for content
pOrigStg = m_pStg;
xOrigStg = m_pStg;
pSotStorageStream = std::make_shared<SvMemoryStream>();
m_pStg = new SotStorage(*pSotStorageStream);
}
@ -3854,7 +3854,7 @@ ErrCodeMsg SwWW8Writer::WriteStorage()
uno::Reference<io::XInputStream > xInputStream(new utl::OSeekableInputStreamWrapper(pSotStorageStream.get(), false));
uno::Sequence<beans::NamedValue> aStreams = xPackageEncryption->encrypt(xInputStream);
m_pStg = pOrigStg;
m_pStg = std::move(xOrigStg);
for (const beans::NamedValue& aStreamData : aStreams)
{
// To avoid long paths split and open substorages recursively

View file

@ -541,7 +541,7 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( std::u16string
{ // the group is already cached
if ( !sCompleteGroupName.isEmpty() )
{ // the group still exists -> return it
xGroup = pSwGroup;
xGroup = std::move(pSwGroup);
break;
}
else
@ -602,7 +602,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
&& pEntry->GetEntryName() == rEntryName
)
{
xReturn = pEntry;
xReturn = std::move(pEntry);
break;
}

View file

@ -7008,7 +7008,7 @@ void SVTXFormattedField::setFormatsSupplier(const css::uno::Reference< css::util
if (!pNew)
return; // TODO : how to process ?
m_xCurrentSupplier = pNew;
m_xCurrentSupplier = std::move(pNew);
if (!pField)
return;

View file

@ -193,7 +193,7 @@ void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode >
throw IllegalArgumentException();
xImpl->mbIsInserted = true;
mxRootNode = xImpl;
mxRootNode = std::move(xImpl);
Reference< XTreeNode > xParentNode;
broadcastImpl( aGuard, structure_changed, xParentNode, mxRootNode );

View file

@ -580,7 +580,7 @@ Found findEntity(
}
e->kind
= unoidl::detail::SourceProviderEntity::KIND_EXTERNAL;
e->entity = ent;
e->entity = std::move(ent);
}
break;
case unoidl::detail::SourceProviderEntity::KIND_MODULE:

View file

@ -282,7 +282,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTOCContext::cr
xContext = xNewBodyContext;
if ( !xBodyContextRef.is() || !xBodyContextRef->HasContent() )
{
xBodyContextRef = xNewBodyContext;
xBodyContextRef = std::move(xNewBodyContext);
}
}
else if (nElement == XML_ELEMENT(TEXT, aIndexSourceElementMap[eIndexType]))