summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-12 10:39:21 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-12 15:21:02 +0100
commit2362e414ef1533c52215d16431d58edb59900751 (patch)
treef1619811bc0a2aebe7e91801fb35de40eba96156
parent0b90638e34218190633e4bff1d989b29df9eb067 (diff)
cid#1546222 COPY_INSTEAD_OF_MOVE
and cid#1546154 COPY_INSTEAD_OF_MOVE cid#1546120 COPY_INSTEAD_OF_MOVE cid#1546115 COPY_INSTEAD_OF_MOVE cid#1546111 COPY_INSTEAD_OF_MOVE cid#1546096 COPY_INSTEAD_OF_MOVE cid#1546016 COPY_INSTEAD_OF_MOVE cid#1545980 COPY_INSTEAD_OF_MOVE cid#1545942 COPY_INSTEAD_OF_MOVE cid#1545902 COPY_INSTEAD_OF_MOVE cid#1545869 COPY_INSTEAD_OF_MOVE cid#1545853 COPY_INSTEAD_OF_MOVE cid#1545769 COPY_INSTEAD_OF_MOVE cid#1545742 COPY_INSTEAD_OF_MOVE cid#1545735 COPY_INSTEAD_OF_MOVE cid#1545689 COPY_INSTEAD_OF_MOVE Change-Id: If93debe8b00991761cf1876b3fce27b09906749e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161966 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
-rw-r--r--sd/source/console/PresenterToolBar.cxx18
-rw-r--r--sfx2/source/view/viewsh.cxx6
-rw-r--r--stoc/source/corereflection/crbase.cxx2
-rw-r--r--stoc/source/inspect/introspection.cxx2
-rw-r--r--ucb/source/cacher/cacheddynamicresultset.cxx5
-rw-r--r--ucb/source/cacher/cacheddynamicresultsetstub.cxx5
-rw-r--r--vcl/source/control/wizardmachine.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx5
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.hxx3
-rw-r--r--writerfilter/source/ooxml/factoryimpl.py2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx2
14 files changed, 30 insertions, 34 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 48ed3b329b96..ac42a446c67c 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -525,7 +525,7 @@ void TheExtensionManager::modified( ::lang::EventObject const & /*rEvt*/ )
if ( ! s_ExtMgr.is() )
{
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
- s_ExtMgr = that;
+ s_ExtMgr = std::move(that);
}
if ( !extensionURL.isEmpty() )
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 03936b54aee8..22bdb916a642 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1791,7 +1791,7 @@ void AutoRecovery::implts_openConfig()
/* SAFE */ {
osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
- m_xRecoveryCFG = xCFG;
+ m_xRecoveryCFG = std::move(xCFG);
m_nMinSpaceDocSave = nMinSpaceDocSave;
m_nMinSpaceConfigSave = nMinSpaceConfigSave;
} /* SAFE */
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index d3068a666519..cc763e8d6f1f 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1112,7 +1112,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt
m_xStream = xNewStream;
if ( !ParsePackageRawStream() )
{
- m_xStream = xOldStream;
+ m_xStream = std::move(xOldStream);
throw packages::NoRawFormatException(THROW_WHERE );
}
diff --git a/sd/source/console/PresenterToolBar.cxx b/sd/source/console/PresenterToolBar.cxx
index 5e7c770df208..04a37a92cf0c 100644
--- a/sd/source/console/PresenterToolBar.cxx
+++ b/sd/source/console/PresenterToolBar.cxx
@@ -1349,14 +1349,16 @@ void ElementMode::ReadElementMode (
msAction = rpDefaultMode->msAction;
// Read text and font
- OUString sText(rpDefaultMode != nullptr ? rpDefaultMode->maText.GetText() : OUString());
- PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText;
- Reference<container::XHierarchicalNameAccess> xFontNode (
- PresenterConfigurationAccess::GetProperty(xProperties, "Font"), UNO_QUERY);
- PresenterTheme::SharedFontDescriptor pFont(PresenterTheme::ReadFont(
- xFontNode, rpDefaultMode != nullptr ? rpDefaultMode->maText.GetFont()
- : PresenterTheme::SharedFontDescriptor()));
- maText = Text(sText,pFont);
+ {
+ OUString sText(rpDefaultMode != nullptr ? rpDefaultMode->maText.GetText() : OUString());
+ PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText;
+ Reference<container::XHierarchicalNameAccess> xFontNode (
+ PresenterConfigurationAccess::GetProperty(xProperties, "Font"), UNO_QUERY);
+ PresenterTheme::SharedFontDescriptor pFont(PresenterTheme::ReadFont(
+ xFontNode, rpDefaultMode != nullptr ? rpDefaultMode->maText.GetFont()
+ : PresenterTheme::SharedFontDescriptor()));
+ maText = Text(std::move(sText), std::move(pFont));
+ }
// Read bitmaps to display as icons.
Reference<container::XHierarchicalNameAccess> xIconNode (
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index ed7f52331269..ca8db9d63a5d 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1941,17 +1941,13 @@ static OUString impl_retrieveFilterNameFromTypeAndModule(
while ( xEnumeration->hasMoreElements() )
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() );
- OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- "Name",
- OUString() );
-
sal_Int32 nFilterFlags = aFilterPropsHM.getUnpackedValueOrDefault(
"Flags",
sal_Int32( 0 ) );
if ( nFilterFlags & nFlags )
{
- aFoundFilterName = aFilterName;
+ aFoundFilterName = aFilterPropsHM.getUnpackedValueOrDefault("Name", OUString());
break;
}
}
diff --git a/stoc/source/corereflection/crbase.cxx b/stoc/source/corereflection/crbase.cxx
index 439ee5b2229f..6f535ed6698e 100644
--- a/stoc/source/corereflection/crbase.cxx
+++ b/stoc/source/corereflection/crbase.cxx
@@ -234,7 +234,7 @@ Reference< XIdlClass > IdlMemberImpl::getDeclaringClass()
Reference< XIdlClass > xDeclClass( getReflection()->forType( getDeclTypeDescr() ) );
::osl::MutexGuard aGuard( getMutexAccess() );
if (! _xDeclClass.is())
- _xDeclClass = xDeclClass;
+ _xDeclClass = std::move(xDeclClass);
}
return _xDeclClass;
}
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index da208ae3253d..6e6bd048ac2f 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -942,7 +942,7 @@ Reference<XEnumerationAccess> ImplIntrospectionAccess::getXEnumerationAccess()
Reference<XEnumerationAccess> xEnumerationAccess( mxIface, UNO_QUERY );
aGuard.lock();
if( !mxObjEnumerationAccess.is() )
- mxObjEnumerationAccess = xEnumerationAccess;
+ mxObjEnumerationAccess = std::move(xEnumerationAccess);
}
return mxObjEnumerationAccess;
}
diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx
index acb00ef6799f..1ec42873dd25 100644
--- a/ucb/source/cacher/cacheddynamicresultset.cxx
+++ b/ucb/source/cacher/cacheddynamicresultset.cxx
@@ -56,7 +56,7 @@ void CachedDynamicResultSet
new CachedContentResultSet( m_xContext, m_xSourceResultOne, m_xContentIdentifierMapping ) );
std::unique_lock aGuard( m_aMutex );
- m_xMyResultOne = xCache;
+ m_xMyResultOne = std::move(xCache);
}
//virtual
@@ -70,10 +70,9 @@ void CachedDynamicResultSet
new CachedContentResultSet( m_xContext, m_xSourceResultTwo, m_xContentIdentifierMapping ) );
std::unique_lock aGuard( m_aMutex );
- m_xMyResultTwo = xCache;
+ m_xMyResultTwo = std::move(xCache);
}
-
// XInterface methods.
void SAL_CALL CachedDynamicResultSet::acquire()
noexcept
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
index 8d46b6d8236b..e9f508014f1a 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
@@ -57,7 +57,7 @@ void CachedDynamicResultSetStub
new CachedContentResultSetStub( m_xSourceResultOne ) );
std::unique_lock aGuard( m_aMutex );
- m_xMyResultOne = xStub;
+ m_xMyResultOne = std::move(xStub);
}
//virtual
@@ -71,10 +71,9 @@ void CachedDynamicResultSetStub
new CachedContentResultSetStub( m_xSourceResultTwo ) );
std::unique_lock aGuard( m_aMutex );
- m_xMyResultTwo = xStub;
+ m_xMyResultTwo = std::move(xStub);
}
-
// XInterface methods.
void SAL_CALL CachedDynamicResultSetStub::acquire()
noexcept
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 68dd66004a9a..a439059b906d 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -672,7 +672,7 @@ namespace vcl
m_xWizardImpl->aStateHistory = aTravelVirtually;
if ( !ShowPage( _nTargetState ) )
{
- m_xWizardImpl->aStateHistory = aOldStateHistory;
+ m_xWizardImpl->aStateHistory = std::move(aOldStateHistory);
return false;
}
return true;
@@ -707,7 +707,7 @@ namespace vcl
// argh! prepareLeaveCurrentPage succeeded, determineNextState succeeded,
// but ShowPage doesn't? Somebody behaves very strange here...
OSL_FAIL( "RoadmapWizard::skipUntil: very unpolite..." );
- m_xWizardImpl->aStateHistory = aOldStateHistory;
+ m_xWizardImpl->aStateHistory = std::move(aOldStateHistory);
return false;
}
return true;
@@ -1078,7 +1078,7 @@ namespace vcl
m_pImpl->aStateHistory = aTravelVirtually;
if ( !ShowPage( _nTargetState ) )
{
- m_pImpl->aStateHistory = aOldStateHistory;
+ m_pImpl->aStateHistory = std::move(aOldStateHistory);
return false;
}
return true;
@@ -1117,7 +1117,7 @@ namespace vcl
// argh! prepareLeaveCurrentPage succeeded, determineNextState succeeded,
// but ShowPage doesn't? Somebody behaves very strange here...
OSL_FAIL( "WizardMachine::skipUntil: very unpolite..." );
- m_pImpl->aStateHistory = aOldStateHistory;
+ m_pImpl->aStateHistory = std::move(aOldStateHistory);
return false;
}
return true;
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index b43ce2fdce52..d85c3f9b4643 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -259,10 +259,9 @@ OOXMLDocumentImpl::getSubStream(const OUString & rId)
writerfilter::Reference<Stream>::Pointer_t
OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t nType, const sal_Int32 nId)
{
- OOXMLStream::Pointer_t pStream =
- OOXMLDocumentFactory::createStream(mpStream, nType);
// See above, no status indicator for the note stream, either.
- OOXMLDocumentImpl * pDocument = new OOXMLDocumentImpl(pStream, uno::Reference<task::XStatusIndicator>(), mbSkipImages, maMediaDescriptor);
+ OOXMLDocumentImpl * pDocument = new OOXMLDocumentImpl(OOXMLDocumentFactory::createStream(mpStream, nType),
+ uno::Reference<task::XStatusIndicator>(), mbSkipImages, maMediaDescriptor);
pDocument->setXNoteId(nId);
pDocument->setModel(getModel());
pDocument->setDrawPage(getDrawPage());
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index a3f9dd85382a..146bc5d61631 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -99,7 +99,8 @@ private:
OOXMLFactory() = delete;
static OOXMLFactory_ns::Pointer_t getFactoryForNamespace(Id id);
- static css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element);
+ static css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler,
+ const OOXMLFactory_ns::Pointer_t& pFactory, Token_t Element);
};
}
diff --git a/writerfilter/source/ooxml/factoryimpl.py b/writerfilter/source/ooxml/factoryimpl.py
index c68d5ba06160..40618b95faca 100644
--- a/writerfilter/source/ooxml/factoryimpl.py
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -21,7 +21,7 @@ def getElementsByTagNamesNS(parent, ns, names, ret=minidom.NodeList()):
def createFastChildContextFromFactory(model):
print("""uno::Reference<xml::sax::XFastContextHandler> OOXMLFactory::createFastChildContextFromFactory
-(OOXMLFastContextHandler* pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element)
+(OOXMLFastContextHandler* pHandler, const OOXMLFactory_ns::Pointer_t& pFactory, Token_t Element)
{
uno::Reference <xml::sax::XFastContextHandler> aResult;
const Id nDefine = pHandler->getDefine();
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index be53d05e669a..1e4bda6ab01c 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1735,7 +1735,7 @@ Reference< util::XNumberFormatsSupplier > const & DialogImport::getNumberFormats
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (! _xSupplier.is())
{
- _xSupplier = xSupplier;
+ _xSupplier = std::move(xSupplier);
}
}
return _xSupplier;