cid#1555652 COPY_INSTEAD_OF_MOVE

and

cid#1555655 COPY_INSTEAD_OF_MOVE
cid#1555658 COPY_INSTEAD_OF_MOVE
cid#1555665 COPY_INSTEAD_OF_MOVE
cid#1555667 COPY_INSTEAD_OF_MOVE
cid#1555670 COPY_INSTEAD_OF_MOVE
cid#1555675 COPY_INSTEAD_OF_MOVE
cid#1555684 COPY_INSTEAD_OF_MOVE
cid#1555687 COPY_INSTEAD_OF_MOVE
cid#1556539 COPY_INSTEAD_OF_MOVE
cid#1556542 COPY_INSTEAD_OF_MOVE
cid#1557448 COPY_INSTEAD_OF_MOVE
cid#1557449 COPY_INSTEAD_OF_MOVE

Change-Id: I3567528e559bca0031c4f5b46801e3130073633b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170448
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-07-13 21:13:00 +01:00
parent 990490781c
commit 309dc58aee
12 changed files with 23 additions and 25 deletions

View File

@ -353,8 +353,8 @@ namespace comphelper
throw IllegalTypeException(u"Unsupported key type."_ustr, *this );
// init members
m_aData.m_aKeyType = aKeyType;
m_aData.m_aValueType = aValueType;
m_aData.m_aKeyType = std::move(aKeyType);
m_aData.m_aValueType = std::move(aValueType);
m_aData.m_pKeyCompare = std::move(pComparator);
m_aData.m_pValues.emplace( *m_aData.m_pKeyCompare );
m_aData.m_bMutable = bMutable;

View File

@ -272,7 +272,7 @@ Reference< XConnection> OConnectionPool::getPooledConnection(TConnectionMap::ite
TActiveConnectionInfo aActiveInfo;
aActiveInfo.aPos = _rIter;
aActiveInfo.xPooledConnection = xPooledConnection;
m_aActiveConnections[xConnection] = aActiveInfo;
m_aActiveConnections[xConnection] = std::move(aActiveInfo);
}
return xConnection;
}

View File

@ -73,7 +73,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
if (!bIsChild)
return;
ShapePtr pCurrParent(mpParentShape);
ShapePtr xCurrParent(mpParentShape);
if (rAtom.getExistingShape())
{
@ -101,8 +101,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
{
pShape->setInternalName(rAtom.getName());
pCurrParent->addChild(pShape);
pCurrParent = pShape;
xCurrParent->addChild(pShape);
xCurrParent = pShape;
rAtom.addNodeShape(pShape);
mrDgm.getLayout()->getPresPointShapeMap()[pNewNode] = pShape;
}
@ -120,7 +120,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
// set new parent for children
ShapePtr xPreviousParent(mpParentShape);
mpParentShape = pCurrParent;
mpParentShape = std::move(xCurrParent);
// process children
meLookFor = LAYOUT_NODE;

View File

@ -291,7 +291,7 @@ void SAL_CALL ScVbaEventListener::windowActivated( const lang::EventObject& rEve
processWindowActivateEvent( mpActiveWindow, false );
// fire activation event for the new window
processWindowActivateEvent( pWindow, true );
mpActiveWindow = pWindow;
mpActiveWindow = std::move(pWindow);
}
}

View File

@ -152,12 +152,10 @@ bool SdPPTFilter::Import()
{
/* check if there is a dualstorage, then the
document is probably a PPT95 containing PPT97 */
rtl::Reference<SotStorage> xDualStorage;
OUString sDualStorage( u"PP97_DUALSTORAGE"_ustr );
if ( pStorage->IsContained( sDualStorage ) )
{
xDualStorage = pStorage->OpenSotStorage( sDualStorage, StreamMode::STD_READ );
pStorage = xDualStorage;
pStorage = pStorage->OpenSotStorage(sDualStorage, StreamMode::STD_READ);
}
if (pStorage->IsContained(u"\011DRMContent"_ustr))
{

View File

@ -404,14 +404,14 @@ ErrCode SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std:
if (!sTypeName.isEmpty())
{
std::shared_ptr<const SfxFilter> pNewFilter;
std::shared_ptr<const SfxFilter> xNewFilter;
if (!aFilterName.isEmpty())
// Type detection returned a suitable filter for this. Use it.
pNewFilter = SfxFilter::GetFilterByName(aFilterName);
xNewFilter = SfxFilter::GetFilterByName(aFilterName);
// fdo#78742 respect requested document service if set
if (!pNewFilter || (!m_rImpl.aName.isEmpty()
&& m_rImpl.aName != pNewFilter->GetServiceName()))
if (!xNewFilter || (!m_rImpl.aName.isEmpty()
&& m_rImpl.aName != xNewFilter->GetServiceName()))
{
// detect filter by given type
// In case of this matcher is bound to a particular document type:
@ -420,12 +420,12 @@ ErrCode SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std:
// This "wrong" type will be sorted out now because we match only allowed filters to the detected type
uno::Sequence< beans::NamedValue > lQuery { { u"Name"_ustr, css::uno::Any(sTypeName) } };
pNewFilter = GetFilterForProps(lQuery, nMust, nDont);
xNewFilter = GetFilterForProps(lQuery, nMust, nDont);
}
if (pNewFilter)
if (xNewFilter)
{
rpFilter = pNewFilter;
rpFilter = std::move(xNewFilter);
return ERRCODE_NONE;
}
}

View File

@ -259,7 +259,7 @@ namespace sfx2
::std::for_each(
aFilterClasses.begin(),
aFilterClasses.end(),
ReadGlobalFilter( aFilterClassesNode, aClassReferrer )
ReadGlobalFilter( std::move(aFilterClassesNode), aClassReferrer )
);
}

View File

@ -155,7 +155,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const OUString& rSequenceName
sal_uInt32 nIndex = m_aPropSeq.getLength();
m_aPropSeq.realloc( nIndex + 1 );
auto pPropSeq = m_aPropSeq.getArray();
pPropSeq[ nIndex ] = aValue;
pPropSeq[ nIndex ] = std::move(aValue);
m_aPropHashMap[ rSequenceName ] = nIndex;
pSeqAny = &pPropSeq[ nIndex ].Value;

View File

@ -1121,7 +1121,7 @@ void SwWrtShell::InsertContentControl(SwContentControlType eType)
}
SwContentControlListItem aListItem;
aListItem.m_aValue = aPlaceholder;
pContentControl->SetListItems({ aListItem });
pContentControl->SetListItems({ std::move(aListItem) });
break;
}
case SwContentControlType::PICTURE:

View File

@ -248,7 +248,7 @@ static uno::Any lcl_GetPropertyFromParaStyleSheetNoNum(PropertyIds eId, StyleShe
if (pEntry == pNewEntry) //fdo#49587
break;
pEntry = pNewEntry;
pEntry = std::move(pNewEntry);
}
return uno::Any();
}
@ -5997,7 +5997,7 @@ void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference<css::dra
if (!bSuccess)
{
aNewGrabBagSeq.realloc(aNewGrabBagSeq.size() + 1);
aNewGrabBagSeq.getArray()[aNewGrabBagSeq.size() - 1] = aLinkProp;
aNewGrabBagSeq.getArray()[aNewGrabBagSeq.size() - 1] = std::move(aLinkProp);
bSuccess = true;
}
}

View File

@ -2402,7 +2402,7 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& rState)
aBuf.append("0");
aBuf.append(static_cast<sal_Int32>(ch), 16);
}
m_aStates.top().getDestinationText() = aBuf;
m_aStates.top().getDestinationText() = std::move(aBuf);
}
}
popState();

View File

@ -1974,7 +1974,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
return false;
}
rTheAbsURIRef = aNewURI;
rTheAbsURIRef = std::move(aNewURI);
return true;
}