summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-19 09:01:40 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-19 12:09:11 +0200
commit3693894529856ed0ee84357bf8a5c60d57c8d215 (patch)
treed0e8d66a7ecc95af42ae1bc4470d172ad319a9a3
parent647bbcd7f3adc2146dbb003d80d9811c355f1311 (diff)
cid#1554837 COPY_INSTEAD_OF_MOVE
and cid#1554847 COPY_INSTEAD_OF_MOVE cid#1554850 COPY_INSTEAD_OF_MOVE cid#1554857 COPY_INSTEAD_OF_MOVE cid#1554860 COPY_INSTEAD_OF_MOVE cid#1554870 COPY_INSTEAD_OF_MOVE cid#1554874 COPY_INSTEAD_OF_MOVE cid#1557899 COPY_INSTEAD_OF_MOVE cid#1608424 COPY_INSTEAD_OF_MOVE cid#1608402 COPY_INSTEAD_OF_MOVE Change-Id: Iaa6e39cf24cd56cdc4a9be5cbf2b8073a1f635c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170722 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx4
-rw-r--r--sd/source/filter/ppt/pptin.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx11
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--test/source/style/xstyleloader.cxx2
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx2
-rw-r--r--vcl/source/bitmap/BitmapColorQuantizationFilter.cxx2
-rw-r--r--xmloff/source/style/xmlimppr.cxx2
10 files changed, 19 insertions, 16 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 42cfdec8b2f0..195ff401e5a7 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1084,7 +1084,7 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
pFallback = elem.second; // alternative
}
if ( !pTypeInfo ) // just a fallback
- pTypeInfo = pFallback ? pFallback : queryTypeInfoByType(DataType::VARCHAR, _rTypeInfo);
+ pTypeInfo = pFallback ? std::move(pFallback) : queryTypeInfoByType(DataType::VARCHAR, _rTypeInfo);
OSL_ENSURE(pTypeInfo,"checkColumns: can't find a type which is usable as a key!");
return pTypeInfo;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index d9446a886f8a..c3054cfb4a1a 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -3628,7 +3628,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if(aStartArrow.Count())
{
- mapCurShape->maShapePolyPoly = aStartArrow;
+ mapCurShape->maShapePolyPoly = std::move(aStartArrow);
if( bUseElementId ) // #i124825# aElementId is optional, may be zero
{
@@ -3640,7 +3640,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if(aEndArrow.Count())
{
- mapCurShape->maShapePolyPoly = aEndArrow;
+ mapCurShape->maShapePolyPoly = std::move(aEndArrow);
if( bUseElementId ) // #i124825# aElementId is optional, may be zero
{
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 3b3b545e503d..0afb14a5b59e 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2703,15 +2703,15 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData
pMediaObj->SetMergedItemSet( pObj->GetMergedItemSet() );
//--remove object from maAnimations list and add the new object instead
- Ppt97AnimationPtr pAnimation;
+ Ppt97AnimationPtr xAnimation;
{
tAnimationMap::iterator aFound = maAnimations.find( pObj.get() );
if( aFound != maAnimations.end() )
{
- pAnimation = (*aFound).second;
+ xAnimation = (*aFound).second;
maAnimations.erase(aFound);
}
- maAnimations[pMediaObj.get()] = pAnimation;
+ maAnimations[pMediaObj.get()] = std::move(xAnimation);
}
pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 54659137d7a2..2f7b4da1c703 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -791,12 +791,15 @@ namespace drawinglayer::primitive2d
if(!aLine.isDefault() || !aText.isDefault())
{
// try shadow
- const attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
- const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
+ attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
+ attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
- return attribute::SdrLineEffectsTextAttribute(aLine, aLineStartEnd, aShadow, aText,
- aGlow, nSoftEdgeRadius);
+ return attribute::SdrLineEffectsTextAttribute(std::move(aLine),
+ std::move(aLineStartEnd),
+ std::move(aShadow),
+ std::move(aText),
+ std::move(aGlow), nSoftEdgeRadius);
}
return attribute::SdrLineEffectsTextAttribute();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index e2b60e60daa4..f92c44cea183 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -2023,7 +2023,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rReq.Ignore(); // the 'old' request is not relevant any more
auto pWrtSh = &rWrtSh;
pDlg->StartExecuteAsync(
- [pDlg, pFieldBM, pWrtSh, xRequest] (sal_Int32 nResult)->void
+ [pDlg, pFieldBM, pWrtSh, xRequest=std::move(xRequest)] (sal_Int32 nResult)->void
{
if (nResult == RET_OK)
{
diff --git a/test/source/style/xstyleloader.cxx b/test/source/style/xstyleloader.cxx
index 7bbcb81e436c..50dd629c254d 100644
--- a/test/source/style/xstyleloader.cxx
+++ b/test/source/style/xstyleloader.cxx
@@ -76,7 +76,7 @@ void XStyleLoader::testLoadStylesFromStream()
uno::Any aTmp;
aTmp <<= xInputStream;
aInputStream.Value = aTmp;
- aOptions.getArray()[nLength] = aInputStream;
+ aOptions.getArray()[nLength] = std::move(aInputStream);
xStyleLoader->loadStylesFromURL(u"private:stream"_ustr, aOptions);
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
index cf134baaebf6..8b0f2b11a7a0 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -745,7 +745,7 @@ void DAVResourceAccess::POST(
rOutputStream,
DAVRequestEnvironment(
new DAVAuthListener_Impl( xEnv, m_aURL ),
- aHeaders ) );
+ std::move(aHeaders) ) );
}
catch (DAVException const& e)
{
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index df3329ea947d..6df122660db2 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -362,7 +362,7 @@ const std::vector< LanguageType >& LocaleDataWrapper::getInstalledLanguageTypes(
if ( eLang != LANGUAGE_DONTKNOW )
xLang.push_back(eLang);
}
- rInstalledLanguageTypes = xLang;
+ rInstalledLanguageTypes = std::move(xLang);
return rInstalledLanguageTypes;
}
diff --git a/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx b/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
index 9014bfe5dd3f..df57b5d44246 100644
--- a/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
+++ b/vcl/source/bitmap/BitmapColorQuantizationFilter.cxx
@@ -189,7 +189,7 @@ BitmapEx BitmapColorQuantizationFilter::execute(BitmapEx const& aBitmapEx) const
const MapMode aMap(aBitmap.GetPrefMapMode());
const Size aSize(aBitmap.GetPrefSize());
- aBitmap = aNewBmp;
+ aBitmap = std::move(aNewBmp);
aBitmap.SetPrefMapMode(aMap);
aBitmap.SetPrefSize(aSize);
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 32749a94c8a8..2af2092378f9 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -253,7 +253,7 @@ void SvXMLImportPropertyMapper::importXMLAttribute(
if( nReference == -1 )
rProperties.push_back( aNewProperty );
else
- rProperties[nReference] = aNewProperty;
+ rProperties[nReference] = std::move(aNewProperty);
}
else
{