diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-13 15:48:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-13 18:11:03 +0200 |
commit | 0f01b42e73af0e0baa57a353554a53d936c4f5e2 (patch) | |
tree | d928509c347cb0651cb040b4d99dde72417f515e /connectivity | |
parent | 646c6ddd91a98afddf914e3889cb269fc814c060 (diff) |
clang-tidy modernize-pass-by-value in connectivity
Change-Id: I1f1b609254c7f8cfba14c248167f81b51684d8e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
86 files changed, 337 insertions, 280 deletions
diff --git a/connectivity/inc/sdbcx/VIndex.hxx b/connectivity/inc/sdbcx/VIndex.hxx index c31bf5c4e20d..5d597efe3a4c 100644 --- a/connectivity/inc/sdbcx/VIndex.hxx +++ b/connectivity/inc/sdbcx/VIndex.hxx @@ -61,7 +61,7 @@ namespace connectivity::sdbcx public: OIndex(bool _bCase); OIndex( const OUString& Name, - const OUString& Catalog, + OUString Catalog, bool _isUnique, bool _isPrimaryKeyIndex, bool _isClustered, diff --git a/connectivity/inc/sdbcx/VKey.hxx b/connectivity/inc/sdbcx/VKey.hxx index 1c4e51dc7f32..df17eba8729f 100644 --- a/connectivity/inc/sdbcx/VKey.hxx +++ b/connectivity/inc/sdbcx/VKey.hxx @@ -30,6 +30,7 @@ #include <cppuhelper/basemutex.hxx> #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp> #include <memory> +#include <utility> namespace connectivity::sdbcx { @@ -41,11 +42,11 @@ namespace connectivity::sdbcx sal_Int32 m_Type; sal_Int32 m_UpdateRule; sal_Int32 m_DeleteRule; - KeyProperties(const OUString& ReferencedTable, + KeyProperties(OUString ReferencedTable, sal_Int32 Type, sal_Int32 UpdateRule, sal_Int32 DeleteRule) - :m_ReferencedTable(ReferencedTable), + :m_ReferencedTable(std::move(ReferencedTable)), m_Type(Type), m_UpdateRule(UpdateRule), m_DeleteRule(DeleteRule) @@ -75,7 +76,7 @@ namespace connectivity::sdbcx virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override; public: OKey(bool _bCase); - OKey(const OUString& Name,const std::shared_ptr<KeyProperties>& _rProps,bool _bCase); + OKey(const OUString& Name,std::shared_ptr<KeyProperties> _xProps,bool _bCase); virtual ~OKey( ) override; diff --git a/connectivity/inc/sdbcx/VKeyColumn.hxx b/connectivity/inc/sdbcx/VKeyColumn.hxx index 5adf3e0aab9d..59b26131db9f 100644 --- a/connectivity/inc/sdbcx/VKeyColumn.hxx +++ b/connectivity/inc/sdbcx/VKeyColumn.hxx @@ -35,7 +35,7 @@ namespace connectivity::sdbcx virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; public: OKeyColumn(bool _bCase); - OKeyColumn( const OUString& ReferencedColumn, + OKeyColumn( OUString ReferencedColumn, const OUString& Name, const OUString& TypeName, const OUString& DefaultValue, diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index e1d492f9f51e..26a241e3f829 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -22,6 +22,7 @@ #include <o3tl/string_view.hxx> #include <tools/wldcrd.hxx> #include <comphelper/sequence.hxx> +#include <utility> using namespace connectivity; using namespace utl; @@ -120,8 +121,8 @@ const TInstalledDrivers& DriversConfigImpl::getInstalledDrivers(const uno::Refer return m_aDrivers; } -DriversConfig::DriversConfig(const uno::Reference< uno::XComponentContext >& _rxORB) -:m_xORB(_rxORB) +DriversConfig::DriversConfig(uno::Reference< uno::XComponentContext > _xORB) +:m_xORB(std::move(_xORB)) { } diff --git a/connectivity/source/commontools/ParameterSubstitution.cxx b/connectivity/source/commontools/ParameterSubstitution.cxx index ca96cf331406..6fa55780803f 100644 --- a/connectivity/source/commontools/ParameterSubstitution.cxx +++ b/connectivity/source/commontools/ParameterSubstitution.cxx @@ -20,6 +20,7 @@ #include <connectivity/sqlparse.hxx> #include <comphelper/sequenceashashmap.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> namespace connectivity { @@ -28,7 +29,7 @@ namespace connectivity using namespace ::com::sun::star::lang; using namespace ::com::sun::star; - ParameterSubstitution::ParameterSubstitution(const css::uno::Reference< css::uno::XComponentContext >& _rxContext ) : m_xContext(_rxContext) + ParameterSubstitution::ParameterSubstitution(css::uno::Reference< css::uno::XComponentContext > _xContext ) : m_xContext(std::move(_xContext)) { } void SAL_CALL ParameterSubstitution::initialize( const uno::Sequence< uno::Any >& _aArguments ) diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index 21f5e638a651..da4935dc618d 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -38,6 +38,7 @@ #endif #include <algorithm> #include <stack> +#include <utility> namespace connectivity { @@ -56,8 +57,8 @@ class ConstantValueExpression : public ExpressionNode public: - explicit ConstantValueExpression( ORowSetValueDecoratorRef const & rValue ) : - maValue( rValue ) + explicit ConstantValueExpression( ORowSetValueDecoratorRef aValue ) : + maValue(std::move( aValue )) { } virtual ORowSetValueDecoratorRef evaluate(const ODatabaseMetaDataResultSet::ORow& /*_aRow*/ ) const override @@ -81,10 +82,10 @@ class BinaryFunctionExpression : public ExpressionNode public: - BinaryFunctionExpression( const ExpressionFunct eFunct, const std::shared_ptr<ExpressionNode>& rFirstArg, const std::shared_ptr<ExpressionNode>& rSecondArg ) : + BinaryFunctionExpression( const ExpressionFunct eFunct, std::shared_ptr<ExpressionNode> xFirstArg, std::shared_ptr<ExpressionNode> xSecondArg ) : meFunct( eFunct ), - mpFirstArg( rFirstArg ), - mpSecondArg( rSecondArg ) + mpFirstArg(std::move( xFirstArg )), + mpSecondArg(std::move( xSecondArg )) { } virtual ORowSetValueDecoratorRef evaluate(const ODatabaseMetaDataResultSet::ORow& _aRow ) const override @@ -93,13 +94,13 @@ public: switch(meFunct) { case ExpressionFunct::Equation: - aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue() == mpSecondArg->evaluate(_aRow )->getValue() ); + aRet = new ORowSetValueDecorator( ORowSetValue(mpFirstArg->evaluate(_aRow )->getValue() == mpSecondArg->evaluate(_aRow )->getValue()) ); break; case ExpressionFunct::And: - aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() && mpSecondArg->evaluate(_aRow )->getValue().getBool() ); + aRet = new ORowSetValueDecorator( ORowSetValue(mpFirstArg->evaluate(_aRow )->getValue().getBool() && mpSecondArg->evaluate(_aRow )->getValue().getBool()) ); break; case ExpressionFunct::Or: - aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() || mpSecondArg->evaluate(_aRow )->getValue().getBool() ); + aRet = new ORowSetValueDecorator( ORowSetValue(mpFirstArg->evaluate(_aRow )->getValue().getBool() || mpSecondArg->evaluate(_aRow )->getValue().getBool()) ); break; default: break; @@ -148,8 +149,8 @@ class ConstantFunctor public: - explicit ConstantFunctor( const ParserContextSharedPtr& rContext ) : - mpContext( rContext ) + explicit ConstantFunctor( ParserContextSharedPtr xContext ) : + mpContext(std::move( xContext )) { } void operator()( StringIteratorT rFirst,StringIteratorT rSecond) const @@ -166,8 +167,8 @@ class IntConstantFunctor ParserContextSharedPtr mpContext; public: - explicit IntConstantFunctor( const ParserContextSharedPtr& rContext ) : - mpContext( rContext ) + explicit IntConstantFunctor( ParserContextSharedPtr xContext ) : + mpContext(std::move( xContext )) { } void operator()( sal_Int32 n ) const @@ -190,9 +191,9 @@ class BinaryFunctionFunctor public: - BinaryFunctionFunctor( const ExpressionFunct eFunct, const ParserContextSharedPtr& rContext ) : + BinaryFunctionFunctor( const ExpressionFunct eFunct, ParserContextSharedPtr xContext ) : meFunct( eFunct ), - mpContext( rContext ) + mpContext(std::move( xContext )) { } @@ -223,8 +224,8 @@ class UnaryFunctionExpression : public ExpressionNode std::shared_ptr<ExpressionNode> mpArg; public: - explicit UnaryFunctionExpression( const std::shared_ptr<ExpressionNode>& rArg ) : - mpArg( rArg ) + explicit UnaryFunctionExpression( std::shared_ptr<ExpressionNode> xArg ) : + mpArg(std::move( xArg )) { } virtual ORowSetValueDecoratorRef evaluate(const ODatabaseMetaDataResultSet::ORow& _aRow ) const override @@ -242,8 +243,8 @@ class UnaryFunctionFunctor public: - explicit UnaryFunctionFunctor(const ParserContextSharedPtr& rContext) - : mpContext(rContext) + explicit UnaryFunctionFunctor(ParserContextSharedPtr xContext) + : mpContext(std::move(xContext)) { } void operator()( StringIteratorT, StringIteratorT ) const @@ -290,8 +291,8 @@ public: @param rParserContext Contains context info for the parser */ - explicit ExpressionGrammar( const ParserContextSharedPtr& rParserContext ) : - mpParserContext( rParserContext ) + explicit ExpressionGrammar( ParserContextSharedPtr xParserContext ) : + mpParserContext(std::move( xParserContext )) { } diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index ebe45c028207..9e0b9ac2dd07 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -18,6 +18,7 @@ */ #include <connectivity/dbcharset.hxx> +#include <utility> #include <osl/diagnose.h> #include <rtl/tencinfo.h> @@ -129,15 +130,15 @@ namespace dbtools } - CharsetIteratorDerefHelper:: CharsetIteratorDerefHelper(const rtl_TextEncoding _eEncoding, const OUString& _rIanaName ) + CharsetIteratorDerefHelper:: CharsetIteratorDerefHelper(const rtl_TextEncoding _eEncoding, OUString _aIanaName ) :m_eEncoding( _eEncoding ) - ,m_aIanaName( _rIanaName ) + ,m_aIanaName(std::move( _aIanaName )) { } - OCharsetMap::CharsetIterator::CharsetIterator(const OCharsetMap* _pContainer, OCharsetMap::TextEncBag::const_iterator const & _aPos ) + OCharsetMap::CharsetIterator::CharsetIterator(const OCharsetMap* _pContainer, OCharsetMap::TextEncBag::const_iterator _aPos ) :m_pContainer( _pContainer ) - ,m_aPos( _aPos ) + ,m_aPos(std::move( _aPos )) { OSL_ENSURE( m_pContainer, "OCharsetMap::CharsetIterator::CharsetIterator : invalid container!" ); } diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index bdff15cafa82..bbf3b408ae01 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -116,13 +116,13 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) aRow[13] = new ORowSetValueDecorator(OUString("B")); aRows.push_back(aRow); - aRow[11] = new ORowSetValueDecorator(true); + aRow[11] = new ORowSetValueDecorator(ORowSetValue(true)); aRow[13] = new ORowSetValueDecorator(OUString("Y")); aRows.push_back(aRow); aRow[1] = new ORowSetValueDecorator(OUString("TIMESTAMP")); aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP); - aRow[11] = new ORowSetValueDecorator(false); + aRow[11] = new ORowSetValueDecorator(ORowSetValue(false)); aRow[13] = new ORowSetValueDecorator(OUString("T")); aRows.push_back(aRow); @@ -291,7 +291,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( if(unique && !getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))) continue; - aRow[4] = new ORowSetValueDecorator(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))); + aRow[4] = new ORowSetValueDecorator(ORowSetValue(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))); aRow[6] = new ORowSetValueDecorator(*pBegin); auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xIndex); diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 3ac8b806499b..d091335f5495 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -26,6 +26,7 @@ #include <algorithm> #include <memory> +#include <utility> using namespace connectivity; @@ -38,10 +39,10 @@ ONDXKey::ONDXKey() { } -ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec) +ONDXKey::ONDXKey(ORowSetValue aVal, sal_Int32 eType, sal_uInt32 nRec) : ONDXKey_BASE(eType) , nRecord(nRec) - , xValue(rVal) + , xValue(std::move(aVal)) { } diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index a2ce922ff193..338d4e397d3f 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -21,14 +21,15 @@ #include "NDatabaseMetaData.hxx" #include <connectivity/dbexception.hxx> #include <strings.hrc> +#include <utility> using namespace connectivity::evoab; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::sdbc; -OEvoabResultSetMetaData::OEvoabResultSetMetaData(const OUString& _aTableName) - : m_aTableName(_aTableName) +OEvoabResultSetMetaData::OEvoabResultSetMetaData(OUString _aTableName) + : m_aTableName(std::move(_aTableName)) { } diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx index 66fffb984e4f..e79d347b1c4d 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx @@ -40,7 +40,7 @@ namespace connectivity::evoab protected: virtual ~OEvoabResultSetMetaData() override; public: - explicit OEvoabResultSetMetaData(const OUString& _aTableName); + explicit OEvoabResultSetMetaData(OUString _aTableName); /// @throws css::sdbc::SQLException void setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns); sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const diff --git a/connectivity/source/drivers/evoab2/NTables.hxx b/connectivity/source/drivers/evoab2/NTables.hxx index 7e200ff6aee2..e5d454729431 100644 --- a/connectivity/source/drivers/evoab2/NTables.hxx +++ b/connectivity/source/drivers/evoab2/NTables.hxx @@ -20,6 +20,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::evoab { @@ -30,11 +31,11 @@ namespace connectivity::evoab virtual sdbcx::ObjectType createObject(const OUString& _rName) override; virtual void impl_refresh() override; public: - OEvoabTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData, + OEvoabTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent,true,_rMutex,_rVector), - m_xMetaData(_rMetaData) + m_xMetaData(std::move(_xMetaData)) {} virtual void disposing() override; }; diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 4b6d45fe7420..b24c4e67a532 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -26,6 +26,7 @@ #include <connectivity/dbexception.hxx> #include <strings.hrc> #include <resource/sharedresources.hxx> +#include <utility> using namespace connectivity::file; @@ -36,9 +37,9 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; -OFileDriver::OFileDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext) +OFileDriver::OFileDriver(css::uno::Reference< css::uno::XComponentContext > _xContext) : ODriver_BASE(m_aMutex) - ,m_xContext(_rxContext) + ,m_xContext(std::move(_xContext)) { } diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index fdc944043d2a..b9fdcc4c4cba 100644 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx @@ -23,6 +23,7 @@ #include <connectivity/dbexception.hxx> #include <comphelper/types.hxx> #include <o3tl/safeint.hxx> +#include <utility> using namespace ::comphelper; @@ -37,9 +38,9 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable) - :m_aTableName(_aTableName) - ,m_xColumns(_rxColumns) +OResultSetMetaData::OResultSetMetaData(::rtl::Reference<connectivity::OSQLColumns> _xColumns, OUString _aTableName, OFileTable* _pTable) + :m_aTableName(std::move(_aTableName)) + ,m_xColumns(std::move(_xColumns)) ,m_pTable(_pTable) { } diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index cfee4f41b81d..37c2ffe72c3d 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -821,14 +821,14 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() // Common data aRow[4] = ODatabaseMetaDataResultSet::getQuoteValue(); // Literal quote marks aRow[5] = ODatabaseMetaDataResultSet::getQuoteValue(); // Literal quote marks - aRow[7] = new ORowSetValueDecorator(true); // Nullable - aRow[8] = new ORowSetValueDecorator(true); // Case sensitive - aRow[10] = new ORowSetValueDecorator(false); // Is unsigned + aRow[7] = new ORowSetValueDecorator(ORowSetValue(true)); // Nullable + aRow[8] = new ORowSetValueDecorator(ORowSetValue(true)); // Case sensitive + aRow[10] = new ORowSetValueDecorator(ORowSetValue(false)); // Is unsigned // FIXED_PREC_SCALE: docs state "can it be a money value? " however // in reality this causes Base to treat all numbers as money formatted // by default which is wrong (and formatting as money value is still // possible for all values). - aRow[11] = new ORowSetValueDecorator(false); + aRow[11] = new ORowSetValueDecorator(ORowSetValue(false)); // Localised Type Name -- TODO: implement (but can be null): aRow[13] = new ORowSetValueDecorator(); aRow[16] = new ORowSetValueDecorator(); // Unused @@ -842,7 +842,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -854,7 +854,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -888,7 +888,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -904,7 +904,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(true); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(true)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale } @@ -928,7 +928,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() { aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(true); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(true)); // Autoincrement } aRow[6] = new ORowSetValueDecorator(OUString("PRECISION,SCALE")); // Create params @@ -972,7 +972,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -984,7 +984,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -996,7 +996,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::FULL)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -1008,7 +1008,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::NONE)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -1020,7 +1020,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[6] = new ORowSetValueDecorator(); // Create Params aRow[9] = new ORowSetValueDecorator( sal_Int16(ColumnSearch::BASIC)); // Searchable - aRow[12] = new ORowSetValueDecorator(false); // Autoincrement + aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale tmp.push_back(aRow); @@ -1680,7 +1680,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( } // 4. NON_UNIQUE -- i.e. specifically negate here. - aCurrentRow[4] = new ORowSetValueDecorator(xRow->getShort(5) == 0); + aCurrentRow[4] = new ORowSetValueDecorator(ORowSetValue(xRow->getShort(5) == 0)); // 6. INDEX NAME aCurrentRow[6] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(4))); @@ -1773,7 +1773,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( aRow[4] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(2))); // 4. GRANTOR aRow[5] = new ORowSetValueDecorator(sanitizeIdentifier(xRow->getString(3))); // 5. GRANTEE aRow[6] = new ORowSetValueDecorator(xRow->getString(4)); // 6. Privilege - aRow[7] = new ORowSetValueDecorator(bool(xRow->getBoolean(5))); // 7. Is Grantable + aRow[7] = new ORowSetValueDecorator(ORowSetValue(bool(xRow->getBoolean(5)))); // 7. Is Grantable aResults.push_back(aRow); } diff --git a/connectivity/source/drivers/firebird/Tables.hxx b/connectivity/source/drivers/firebird/Tables.hxx index 7d84edb2084a..ada1827097a5 100644 --- a/connectivity/source/drivers/firebird/Tables.hxx +++ b/connectivity/source/drivers/firebird/Tables.hxx @@ -13,6 +13,7 @@ #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <connectivity/sdbcx/VCollection.hxx> +#include <utility> namespace connectivity::firebird { @@ -40,10 +41,10 @@ namespace connectivity::firebird const css::uno::Reference< css::beans::XPropertySet >& rDescriptor) override; public: - Tables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& rMetaData, + Tables(css::uno::Reference< css::sdbc::XDatabaseMetaData > xMetaData, ::cppu::OWeakObject& rParent, ::osl::Mutex& rMutex, - ::std::vector< OUString> const & rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(rMetaData) {} + ::std::vector< OUString> const & rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(std::move(xMetaData)) {} // TODO: we should also implement XDataDescriptorFactory, XRefreshable, // XAppend, etc., but all are optional. diff --git a/connectivity/source/drivers/firebird/Util.hxx b/connectivity/source/drivers/firebird/Util.hxx index bf1a172ed2c8..bfbfb62c22fc 100644 --- a/connectivity/source/drivers/firebird/Util.hxx +++ b/connectivity/source/drivers/firebird/Util.hxx @@ -14,6 +14,7 @@ #include <rtl/ustring.hxx> #include <com/sun/star/uno/XInterface.hpp> +#include <utility> namespace connectivity::firebird { @@ -57,16 +58,16 @@ public: * */ explicit ColumnTypeInfo( short aType, short aSubType = 0, - short nScale = 0, const OUString& sCharset = OUString() ) + short nScale = 0, OUString sCharset = OUString() ) : m_aType(aType) , m_aSubType(aSubType) , m_nScale(nScale) - , m_sCharsetName(sCharset) {} - explicit ColumnTypeInfo( short aType, const OUString& sCharset ) + , m_sCharsetName(std::move(sCharset)) {} + explicit ColumnTypeInfo( short aType, OUString sCharset ) : m_aType(aType) , m_aSubType(0) , m_nScale(0) - , m_sCharsetName(sCharset) {} + , m_sCharsetName(std::move(sCharset)) {} short getType() const { return m_aType; } short getSubType() const { return m_aSubType; } short getScale() const { return m_nScale; } diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index 2ed0c06262ff..f493e282a2b1 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/sdbcx/PrivilegeObject.hpp> #include <TConnection.hxx> #include <strings.hrc> +#include <utility> using namespace connectivity; using namespace connectivity::hsqldb; @@ -37,16 +38,16 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OHSQLUser::OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(true) - ,m_xConnection(_xConnection) +OHSQLUser::OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection) : connectivity::sdbcx::OUser(true) + ,m_xConnection(std::move(_xConnection)) { construct(); } -OHSQLUser::OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection, +OHSQLUser::OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection, const OUString& Name ) : connectivity::sdbcx::OUser(Name,true) - ,m_xConnection(_xConnection) + ,m_xConnection(std::move(_xConnection)) { construct(); } diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 9fe31e58eb01..12959833331e 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -23,6 +23,7 @@ #include <comphelper/types.hxx> #include <connectivity/dbtools.hxx> #include <TConnection.hxx> +#include <utility> using namespace ::comphelper; using namespace connectivity; @@ -36,10 +37,10 @@ using namespace ::com::sun::star::lang; OUsers::OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - const css::uno::Reference< css::sdbc::XConnection >& _xConnection, + css::uno::Reference< css::sdbc::XConnection > _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xConnection(_xConnection) + ,m_xConnection(std::move(_xConnection)) ,m_pParent(_pParent) { } diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 19391e60edac..cff6f8f4e45b 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -43,6 +43,7 @@ #include <unotools/confignode.hxx> #include <strings.hxx> +#include <utility> #include <vector> #include <memory> @@ -58,8 +59,8 @@ namespace { struct ClassMapEntry { ClassMapEntry( - OUString const & theClassPath, OUString const & theClassName): - classPath(theClassPath), className(theClassName), classLoader(nullptr), + OUString theClassPath, OUString theClassName): + classPath(std::move(theClassPath)), className(std::move(theClassName)), classLoader(nullptr), classObject(nullptr) {} OUString classPath; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index 18d95cdbdb81..804c8ccc66d8 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -18,6 +18,8 @@ */ +#include <utility> + #include "MNSProfileDiscover.hxx" #include "MNSFolders.hxx" #include "MNSINIParser.hxx" @@ -28,10 +30,10 @@ namespace connectivity::mozab { } - ProfileStruct::ProfileStruct(const OUString& aProfileName, - const OUString& aProfilePath) - : profileName(aProfileName) - , profilePath(aProfilePath) + ProfileStruct::ProfileStruct(OUString aProfileName, + OUString aProfilePath) + : profileName(std::move(aProfileName)) + , profilePath(std::move(aProfilePath)) { } diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index a5f271183b27..132ac06c003c 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx @@ -37,7 +37,7 @@ namespace connectivity::mozab { public: ProfileStruct(); - ProfileStruct(const OUString& aProfileName, const OUString &aProfilePath); + ProfileStruct(OUString aProfileName, OUString aProfilePath); const OUString& getProfileName() const { return profileName;} const OUString& getProfilePath() const; private: diff --git a/connectivity/source/drivers/mysql_jdbc/YUser.cxx b/connectivity/source/drivers/mysql_jdbc/YUser.cxx index b683fe2b2757..ec3a6265967f 100644 --- a/connectivity/source/drivers/mysql_jdbc/YUser.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YUser.cxx @@ -27,6 +27,7 @@ #include <TConnection.hxx> #include <strings.hrc> #include <comphelper/types.hxx> +#include <utility> using namespace connectivity; using namespace connectivity::mysql; @@ -37,17 +38,17 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OMySQLUser::OMySQLUser(const css::uno::Reference<css::sdbc::XConnection>& _xConnection) +OMySQLUser::OMySQLUser(css::uno::Reference<css::sdbc::XConnection> _xConnection) : connectivity::sdbcx::OUser(true) - , m_xConnection(_xConnection) + , m_xConnection(std::move(_xConnection)) { construct(); } -OMySQLUser::OMySQLUser(const css::uno::Reference<css::sdbc::XConnection>& _xConnection, +OMySQLUser::OMySQLUser(css::uno::Reference<css::sdbc::XConnection> _xConnection, const OUString& Name) : connectivity::sdbcx::OUser(Name, true) - , m_xConnection(_xConnection) + , m_xConnection(std::move(_xConnection)) { construct(); } diff --git a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx index ed33cb0e2d7c..eba995a91044 100644 --- a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx @@ -23,6 +23,7 @@ #include <comphelper/types.hxx> #include <connectivity/dbtools.hxx> #include <TConnection.hxx> +#include <utility> using namespace ::comphelper; using namespace connectivity; @@ -35,10 +36,10 @@ using namespace ::com::sun::star::lang; OUsers::OUsers(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector<OUString>& _rVector, - const css::uno::Reference<css::sdbc::XConnection>& _xConnection, + css::uno::Reference<css::sdbc::XConnection> _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - , m_xConnection(_xConnection) + , m_xConnection(std::move(_xConnection)) , m_pParent(_pParent) { } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx b/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx index 2d3c4c74533d..8b05c5afaf9f 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx @@ -12,6 +12,7 @@ #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <connectivity/sdbcx/VCollection.hxx> +#include <utility> namespace connectivity::mysqlc { @@ -38,11 +39,11 @@ protected: virtual void dropObject(sal_Int32 nPosition, const OUString& rName) override; public: - Tables(const css::uno::Reference<css::sdbc::XDatabaseMetaData>& rMetaData, + Tables(css::uno::Reference<css::sdbc::XDatabaseMetaData> xMetaData, ::cppu::OWeakObject& rParent, ::osl::Mutex& rMutex, ::std::vector<OUString> const& rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames) - , m_xMetaData(rMetaData) + , m_xMetaData(std::move(xMetaData)) { } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_user.cxx b/connectivity/source/drivers/mysqlc/mysqlc_user.cxx index 65470be59b86..c1cdc1e537af 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_user.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_user.cxx @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <utility> + #include "mysqlc_user.hxx" using namespace ::connectivity; @@ -16,16 +18,16 @@ using namespace ::connectivity::sdbcx; using namespace ::com::sun::star; using namespace ::com::sun::star::sdbc; -User::User(const css::uno::Reference<css::sdbc::XConnection>& rConnection) +User::User(css::uno::Reference<css::sdbc::XConnection> xConnection) : OUser(true) // Case Sensitive - , m_xConnection(rConnection) + , m_xConnection(std::move(xConnection)) { } -User::User(const css::uno::Reference<css::sdbc::XConnection>& rConnection, const OUString& rName) +User::User(css::uno::Reference<css::sdbc::XConnection> xConnection, const OUString& rName) : OUser(rName, true) // Case Sensitive - , m_xConnection(rConnection) + , m_xConnection(std::move(xConnection)) { } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_user.hxx b/connectivity/source/drivers/mysqlc/mysqlc_user.hxx index e9e37e3fac47..aad2baa214d3 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_user.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_user.hxx @@ -25,11 +25,11 @@ public: /** * Create a "new" descriptor, which isn't yet in the database. */ - User(const css::uno::Reference<css::sdbc::XConnection>& rConnection); + User(css::uno::Reference<css::sdbc::XConnection> xConnection); /** * For a user that already exists in the db. */ - User(const css::uno::Reference<css::sdbc::XConnection>& rConnection, const OUString& rName); + User(css::uno::Reference<css::sdbc::XConnection> xConnection, const OUString& rName); // XAuthorizable virtual void SAL_CALL changePassword(const OUString&, const OUString& newPassword) override; diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index df7b3fd206b8..cf3c5596aad4 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/supportsservice.hxx> #include <strings.hrc> #include <resource/sharedresources.hxx> +#include <utility> using namespace connectivity::odbc; using namespace com::sun::star::uno; @@ -31,9 +32,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -ODBCDriver::ODBCDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext) +ODBCDriver::ODBCDriver(css::uno::Reference< css::uno::XComponentContext > _xContext) :ODriver_BASE(m_aMutex) - ,m_xContext(_rxContext) + ,m_xContext(std::move(_xContext)) ,m_pDriverHandle(SQL_NULL_HANDLE) { } diff --git a/connectivity/source/drivers/postgresql/pq_array.hxx b/connectivity/source/drivers/postgresql/pq_array.hxx index b847d646a913..589fe063d234 100644 --- a/connectivity/source/drivers/postgresql/pq_array.hxx +++ b/connectivity/source/drivers/postgresql/pq_array.hxx @@ -39,6 +39,7 @@ #include <com/sun/star/sdbc/XArray.hpp> #include "pq_connection.hxx" +#include <utility> #include <vector> namespace pq_sdbc_driver @@ -53,14 +54,14 @@ class Array : public cppu::WeakImplHelper< css::sdbc::XArray > public: Array( - const rtl::Reference< comphelper::RefCountedMutex > & mutex, + rtl::Reference< comphelper::RefCountedMutex > mutex, std::vector< css::uno::Any > && data, - const css::uno::Reference< css::uno::XInterface > & owner, - const css::uno::Reference< css::script::XTypeConverter > &tc) : + css::uno::Reference< css::uno::XInterface > owner, + css::uno::Reference< css::script::XTypeConverter > tc) : m_data( std::move(data) ), - m_owner( owner ), - m_tc( tc ), - m_xMutex( mutex ) + m_owner(std::move( owner )), + m_tc(std::move( tc )), + m_xMutex(std::move( mutex )) {} public: // XArray diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 6661a97d5669..422d97f76e22 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -34,6 +34,7 @@ * ************************************************************************/ +#include <utility> #include <vector> #include <string.h> @@ -96,8 +97,8 @@ class ClosableReference : public cppu::WeakImplHelper< css::uno::XReference > rtl::Reference<Connection> m_conn; ::rtl::ByteSequence m_id; public: - ClosableReference( const ::rtl::ByteSequence & id , Connection *that ) - : m_conn( that ), m_id( id ) + ClosableReference( ::rtl::ByteSequence id , Connection *that ) + : m_conn( that ), m_id(std::move( id )) { } @@ -115,9 +116,9 @@ public: Connection::Connection( const rtl::Reference< comphelper::RefCountedMutex > &refMutex, - const css::uno::Reference< css::uno::XComponentContext > & ctx ) + css::uno::Reference< css::uno::XComponentContext > ctx ) : ConnectionBase( refMutex->GetMutex() ), - m_ctx( ctx ) , + m_ctx(std::move( ctx )) , m_xMutex( refMutex ) { } diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx index f30483f70938..2bba070a7273 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.hxx +++ b/connectivity/source/drivers/postgresql/pq_connection.hxx @@ -134,7 +134,7 @@ private: public: Connection( const rtl::Reference< comphelper::RefCountedMutex > &refMutex, - const css::uno::Reference< css::uno::XComponentContext > & ctx ); + css::uno::Reference< css::uno::XComponentContext > ctx ); virtual ~Connection( ) override; diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index 7da57d1b675c..99f82a1c3957 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -84,6 +84,7 @@ #include <com/sun/star/sdbc/IndexType.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/ColumnSearch.hpp> +#include <utility> using ::osl::MutexGuard; @@ -114,12 +115,12 @@ namespace pq_sdbc_driver #define DEFERRABILITY_NONE 7 DatabaseMetaData::DatabaseMetaData( - const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, - const css::uno::Reference< css::sdbc::XConnection > & origin, + ::rtl::Reference< comphelper::RefCountedMutex > refMutex, + css::uno::Reference< css::sdbc::XConnection > origin, ConnectionSettings *pSettings ) - : m_xMutex( refMutex ), + : m_xMutex(std::move( refMutex )), m_pSettings( pSettings ), - m_origin( origin ), + m_origin(std::move( origin )), m_getIntSetting_stmt ( m_origin->prepareStatement("SELECT setting FROM pg_catalog.pg_settings WHERE name=?") ) { init_getReferences_stmt(); @@ -1364,9 +1365,9 @@ namespace { { DatabaseTypeDescription() {} - DatabaseTypeDescription( const OUString &name, const OUString & type ) : - typeName( name ), - typeType( type ) + DatabaseTypeDescription( OUString name, OUString type ) : + typeName(std::move( name )), + typeType(std::move( type )) {} DatabaseTypeDescription( const DatabaseTypeDescription &source ) : typeName( source.typeName ), diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx index 134f72cf0186..4e8b717a96b2 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx @@ -74,8 +74,8 @@ class DatabaseMetaData : public: DatabaseMetaData( - const ::rtl::Reference< comphelper::RefCountedMutex > & reMutex, - const css::uno::Reference< css::sdbc::XConnection > & origin, + ::rtl::Reference< comphelper::RefCountedMutex > reMutex, + css::uno::Reference< css::sdbc::XConnection > origin, ConnectionSettings *pSettings ); diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx index a75897ccb211..216a25220355 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/sdbc/SQLException.hpp> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> +#include <utility> using com::sun::star::uno::Sequence; @@ -58,9 +59,9 @@ FakedUpdateableResultSet::FakedUpdateableResultSet( PGresult *result, const OUString &schema, const OUString &table, - const OUString &aReason ) + OUString aReason ) : ResultSet( mutex, owner, pSettings, result, schema, table ), - m_aReason( aReason ) + m_aReason(std::move( aReason )) {} diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx index c2907aeb0290..44e7dc9bcf13 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx @@ -61,7 +61,7 @@ public: PGresult *result, const OUString &schema, const OUString &table, - const OUString &aReason ); + OUString aReason ); public: // XInterface virtual void SAL_CALL acquire() noexcept override { ResultSet::acquire(); } diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 2f31b4226c08..dd30a39317ec 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -57,6 +57,7 @@ #include <string_view> #include <connectivity/dbconversion.hxx> +#include <utility> using osl::MutexGuard; @@ -149,12 +150,12 @@ PreparedStatement::PreparedStatement( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const Reference< XConnection > & conn, struct ConnectionSettings *pSettings, - const OString & stmt ) + OString stmt ) : PreparedStatement_BASE(refMutex->GetMutex()) , OPropertySetHelper(PreparedStatement_BASE::rBHelper) , m_connection(conn) , m_pSettings(pSettings) - , m_stmt(stmt) + , m_stmt(std::move(stmt)) , m_xMutex(refMutex) , m_multipleResultAvailable(false) , m_multipleResultUpdateCount(0) diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx index 4755efbe0368..ed81420cec7d 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx @@ -98,7 +98,7 @@ public: PreparedStatement( const rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection> & con, struct ConnectionSettings *pSettings, - const OString &stmt ); + OString stmt ); virtual ~PreparedStatement() override; public: // XInterface diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx index 556bae92d5be..0058041c87b5 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/SQLException.hpp> +#include <utility> using osl::MutexGuard; @@ -79,14 +80,14 @@ ResultSet::ResultSet( const ::rtl::Reference< comphelper::RefCountedMutex > & re const Reference< XInterface > & owner, ConnectionSettings **ppSettings, PGresult * result, - const OUString &schema, - const OUString &table) + OUString schema, + OUString table) : BaseResultSet( refMutex, owner, PQntuples( result ), PQnfields( result ),(*ppSettings)->tc ), m_result( result ), - m_schema( schema ), - m_table( table ), + m_schema(std::move( schema )), + m_table(std::move( table )), m_ppSettings( ppSettings ) { // LEM TODO: shouldn't these things be inherited from the statement or something like that? diff --git a/connectivity/source/drivers/postgresql/pq_resultset.hxx b/connectivity/source/drivers/postgresql/pq_resultset.hxx index 340e34b70c3b..cf2888bf5b93 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.hxx @@ -72,8 +72,8 @@ public: const css::uno::Reference< css::uno::XInterface > &owner, ConnectionSettings **pSettings, PGresult *result, - const OUString &schema, - const OUString &table ); + OUString schema, + OUString table ); virtual ~ResultSet() override; public: // XCloseable diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index fbe10f82dacb..0b12f3a73d77 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -46,6 +46,7 @@ #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdbc/XRow.hpp> +#include <utility> #include <string.h> @@ -113,18 +114,18 @@ static void extractPrecisionAndScale( sal_Int32 atttypmod, sal_Int32 *precision, } ResultSetMetaData::ResultSetMetaData( - const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, - const css::uno::Reference< css::sdbc::XResultSet > & origin, + ::rtl::Reference< comphelper::RefCountedMutex > refMutex, + css::uno::Reference< css::sdbc::XResultSet > origin, ResultSet * pResultSet, ConnectionSettings **ppSettings, PGresult const *pResult, - const OUString &schemaName, - const OUString &tableName ) : - m_xMutex( refMutex ), + OUString schemaName, + OUString tableName ) : + m_xMutex(std::move( refMutex )), m_ppSettings( ppSettings ), - m_origin( origin ), - m_tableName( tableName ), - m_schemaName( schemaName ), + m_origin(std::move( origin )), + m_tableName(std::move( tableName )), + m_schemaName(std::move( schemaName )), m_colDesc( PQnfields( pResult ) ), m_pResultSet( pResultSet ), m_checkedForTable( false ), diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx index 67e34d44d257..71c98190ba2b 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx @@ -89,13 +89,13 @@ class ResultSetMetaData : public: ResultSetMetaData( - const ::rtl::Reference< comphelper::RefCountedMutex > & reMutex, - const css::uno::Reference< css::sdbc::XResultSet > & origin, + ::rtl::Reference< comphelper::RefCountedMutex > reMutex, + css::uno::Reference< css::sdbc::XResultSet > origin, ResultSet *pResultSet, ConnectionSettings **pSettings, PGresult const *pResult, - const OUString &schemaName, - const OUString &tableName ); + OUString schemaName, + OUString tableName ); public: // Methods diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx index ec3d0d8ac587..f69556202240 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.cxx +++ b/connectivity/source/drivers/postgresql/pq_statics.cxx @@ -37,6 +37,7 @@ #include "pq_statics.hxx" #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <utility> using com::sun::star::uno::Sequence; using com::sun::star::uno::Any; @@ -68,8 +69,8 @@ struct BaseTypeDef { const char * typeName; sal_Int32 value; }; struct PropertyDef { - PropertyDef( const OUString &str, const Type &t ) - : name( str ) , type( t ) {} + PropertyDef( OUString str, const Type &t ) + : name(std::move( str )) , type( t ) {} OUString name; css::uno::Type type; }; diff --git a/connectivity/source/drivers/postgresql/pq_statics.hxx b/connectivity/source/drivers/postgresql/pq_statics.hxx index b5a868d6c691..4e745e4086ee 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.hxx +++ b/connectivity/source/drivers/postgresql/pq_statics.hxx @@ -37,6 +37,7 @@ #pragma once #include <unordered_map> +#include <utility> #include <vector> #include <com/sun/star/uno/Any.hxx> @@ -50,20 +51,20 @@ namespace pq_sdbc_driver struct ColumnMetaData { ColumnMetaData( - const OUString &_columnName, - const OUString &_tableName, - const OUString &_schemaTableName, - const OUString &_typeName, + OUString _columnName, + OUString _tableName, + OUString _schemaTableName, + OUString _typeName, sal_Int32 _type, sal_Int32 _precision, sal_Int32 _scale, bool _isCurrency, bool _isNullable, bool _isAutoIncrement ) : - columnName( _columnName ), - tableName( _tableName ), - schemaTableName( _schemaTableName ), - typeName( _typeName ), + columnName(std::move( _columnName )), + tableName(std::move( _tableName )), + schemaTableName(std::move( _schemaTableName )), + typeName(std::move( _typeName )), type( _type ), precision( _precision ), scale( _scale ), diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx index 1beeadc31e98..52cb513a5856 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx @@ -44,6 +44,7 @@ #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/sdbc/XResultSetUpdate.hpp> #include <com/sun/star/sdbc/XRowUpdate.hpp> +#include <utility> namespace pq_sdbc_driver { @@ -78,13 +79,13 @@ private: std::vector< OUString >&& colNames, std::vector< std::vector< css::uno::Any > >&& data, ConnectionSettings **ppSettings, - const OUString &schema, - const OUString &table, + OUString schema, + OUString table, std::vector< OUString >&& primaryKey) : SequenceResultSet( mutex, owner, std::move(colNames), std::move(data), (*ppSettings)->tc ), m_ppSettings( ppSettings ), - m_schema( schema ), - m_table( table ), + m_schema(std::move( schema )), + m_table(std::move( table )), m_primaryKey( std::move(primaryKey) ), m_insertRow( false ) { diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index 5dbe6e98b5ab..001046aa52fa 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -36,6 +36,7 @@ #include <cppuhelper/supportsservice.hxx> #include <comphelper/sequence.hxx> +#include <utility> #include "pq_statics.hxx" #include "pq_tools.hxx" @@ -56,18 +57,18 @@ namespace pq_sdbc_driver { ReflectionBase::ReflectionBase( - const OUString &implName, + OUString implName, const css::uno::Sequence< OUString > &supportedServices, const ::rtl::Reference< comphelper::RefCountedMutex >& refMutex, - const css::uno::Reference< css::sdbc::XConnection > &conn, + css::uno::Reference< css::sdbc::XConnection > conn, ConnectionSettings *pSettings, cppu::IPropertyArrayHelper & props /* must survive this object !*/ ) : ReflectionBase_BASE( refMutex->GetMutex() ), OPropertySetHelper( ReflectionBase_BASE::rBHelper ), - m_implName( implName ), + m_implName(std::move( implName )), m_supportedServices( supportedServices ), m_xMutex( refMutex ), - m_conn( conn ), + m_conn(std::move( conn )), m_pSettings( pSettings ), m_propsDesc( props ), m_values( props.getProperties().getLength() ) diff --git a/connectivity/source/drivers/postgresql/pq_xbase.hxx b/connectivity/source/drivers/postgresql/pq_xbase.hxx index 3cd16bc70ee2..e4ca16fd5e6a 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.hxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.hxx @@ -65,10 +65,10 @@ protected: std::vector< css::uno::Any > m_values; public: ReflectionBase( - const OUString &implName, + OUString implName, const css::uno::Sequence< OUString > &supportedServices, const ::rtl::Reference< comphelper::RefCountedMutex >& refMutex, - const css::uno::Reference< css::sdbc::XConnection > &conn, + css::uno::Reference< css::sdbc::XConnection > conn, ConnectionSettings *pSettings, cppu::IPropertyArrayHelper & props /* must survive this object !*/ ); diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index f1d3c0a53e88..0c0a80c44809 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/sdbc/ColumnValue.hpp> #include <cppuhelper/exc_hlp.hxx> +#include <utility> #include "pq_xcolumns.hxx" #include "pq_xcolumn.hxx" @@ -109,11 +110,11 @@ Columns::Columns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName) + OUString schemaName, + OUString tableName) : Container( refMutex, origin, pSettings, "COLUMN" ), - m_schemaName( schemaName ), - m_tableName( tableName ) + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )) {} Columns::~Columns() diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx index aa91a9754218..8ff8fcfbd95c 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx @@ -80,8 +80,8 @@ private: const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName); + OUString schemaName, + OUString tableName); virtual ~Columns() override; diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index fea88b682cdb..5c0567b2dc3a 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <cppuhelper/implbase.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include "pq_xcontainer.hxx" #include "pq_statics.hxx" @@ -136,14 +137,14 @@ public: Container::Container( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, - const css::uno::Reference< css::sdbc::XConnection > & origin, + css::uno::Reference< css::sdbc::XConnection > origin, ConnectionSettings *pSettings, - const OUString &type) + OUString type) : ContainerBase( refMutex->GetMutex() ), m_xMutex( refMutex ), m_pSettings( pSettings ), - m_origin( origin ), - m_type( type ) + m_origin(std::move( origin )), + m_type(std::move( type )) { } diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.hxx b/connectivity/source/drivers/postgresql/pq_xcontainer.hxx index fd9d432bfad3..4b6c190b0a59 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.hxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.hxx @@ -117,9 +117,9 @@ protected: public: Container( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, - const css::uno::Reference< css::sdbc::XConnection > & origin, + css::uno::Reference< css::sdbc::XConnection > origin, ConnectionSettings *pSettings, - const OUString & type // for exception messages + OUString type // for exception messages ); public: // XIndexAccess diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx index 5a96eeeb119d..4753b5fd4e3c 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx @@ -37,6 +37,7 @@ #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <rtl/ref.hxx> +#include <utility> #include "pq_xindex.hxx" #include "pq_xindexcolumns.hxx" @@ -58,8 +59,8 @@ namespace pq_sdbc_driver Index::Index( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const Reference< css::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const OUString & schemaName, - const OUString & tableName ) + OUString schemaName, + OUString tableName ) : ReflectionBase( getStatics().refl.index.implName, getStatics().refl.index.serviceNames, @@ -67,8 +68,8 @@ Index::Index( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, connection, pSettings, * getStatics().refl.index.pProps ), - m_schemaName( schemaName ), - m_tableName( tableName ) + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )) {} Reference< XPropertySet > Index::createDataDescriptor( ) diff --git a/connectivity/source/drivers/postgresql/pq_xindex.hxx b/connectivity/source/drivers/postgresql/pq_xindex.hxx index 46275ad3aafa..8ccf45660467 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.hxx @@ -61,8 +61,8 @@ public: Index( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName); + OUString schemaName, + OUString tableName); public: // XInterface virtual void SAL_CALL acquire() noexcept override { ReflectionBase::acquire(); } diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 841ea98054d9..2bca00e13b77 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -37,6 +37,7 @@ #include <sal/log.hxx> #include <string_view> +#include <utility> #include <vector> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> @@ -72,14 +73,14 @@ IndexColumns::IndexColumns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName, - const OUString &indexName, + OUString schemaName, + OUString tableName, + OUString indexName, const css::uno::Sequence< OUString > &columns ) : Container( refMutex, origin, pSettings, "INDEX_COLUMN" ), - m_schemaName( schemaName ), - m_tableName( tableName ), - m_indexName( indexName ), + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )), + m_indexName(std::move( indexName )), m_columns( columns ) {} diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx index eaaa709e671a..a838d5d66908 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx @@ -63,9 +63,9 @@ private: const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName, - const OUString &indexName, + OUString schemaName, + OUString tableName, + OUString indexName, const css::uno::Sequence< OUString > &columns ); virtual ~IndexColumns() override; diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index ef1e7116a1b0..79f0939c1aba 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/sdbc/XParameters.hpp> #include <cppuhelper/exc_hlp.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include "pq_xindexes.hxx" #include "pq_xindex.hxx" @@ -78,11 +79,11 @@ Indexes::Indexes( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName) + OUString schemaName, + OUString tableName) : Container( refMutex, origin, pSettings, getStatics().KEY ), - m_schemaName( schemaName ), - m_tableName( tableName ) + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )) { } diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.hxx b/connectivity/source/drivers/postgresql/pq_xindexes.hxx index c2e81f61751f..536d17b96198 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.hxx @@ -58,8 +58,8 @@ private: const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName); + OUString schemaName, + OUString tableName); virtual ~Indexes() override; diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx index e2777824568f..81d1f7a86eb6 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx @@ -37,6 +37,7 @@ #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <rtl/ref.hxx> +#include <utility> #include "pq_xkey.hxx" #include "pq_xkeycolumns.hxx" @@ -57,8 +58,8 @@ namespace pq_sdbc_driver Key::Key( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const Reference< css::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const OUString & schemaName, - const OUString & tableName ) + OUString schemaName, + OUString tableName ) : ReflectionBase( getStatics().refl.key.implName, getStatics().refl.key.serviceNames, @@ -66,8 +67,8 @@ Key::Key( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, connection, pSettings, * getStatics().refl.key.pProps ), - m_schemaName( schemaName ), - m_tableName( tableName ) + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )) {} Reference< XPropertySet > Key::createDataDescriptor( ) diff --git a/connectivity/source/drivers/postgresql/pq_xkey.hxx b/connectivity/source/drivers/postgresql/pq_xkey.hxx index d231e1e89945..68f05fd27d4e 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.hxx @@ -61,8 +61,8 @@ public: Key( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName); + OUString schemaName, + OUString tableName); public: // XInterface virtual void SAL_CALL acquire() noexcept override { ReflectionBase::acquire(); } diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index 8b62f28423a5..97e0ef29bbda 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <cppuhelper/exc_hlp.hxx> #include <rtl/ref.hxx> +#include <utility> #include "pq_xcolumns.hxx" #include "pq_xkeycolumns.hxx" @@ -68,13 +69,13 @@ KeyColumns::KeyColumns( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName, + OUString schemaName, + OUString tableName, const Sequence< OUString > &columnNames, const Sequence< OUString > &foreignColumnNames ) : Container( refMutex, origin, pSettings, "KEY_COLUMN" ), - m_schemaName( schemaName ), - m_tableName( tableName ), + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )), m_columnNames( columnNames ), m_foreignColumnNames( foreignColumnNames ) {} diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx index 0c56fd189e9a..60bbd0c0de36 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx @@ -63,8 +63,8 @@ private: const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName, + OUString schemaName, + OUString tableName, const css::uno::Sequence< OUString > &keyColumns, const css::uno::Sequence< OUString > &foreignColumnNames); diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index dced2bc9baa5..0758be630e04 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/sdbcx/KeyType.hpp> #include <cppuhelper/exc_hlp.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include "pq_xkeys.hxx" #include "pq_xkey.hxx" @@ -79,11 +80,11 @@ Keys::Keys( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName) + OUString schemaName, + OUString tableName) : Container( refMutex, origin, pSettings, getStatics().KEY ), - m_schemaName( schemaName ), - m_tableName( tableName ) + m_schemaName(std::move( schemaName )), + m_tableName(std::move( tableName )) {} Keys::~Keys() diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.hxx b/connectivity/source/drivers/postgresql/pq_xkeys.hxx index fe1afef35a4b..ef6376d4d780 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.hxx @@ -58,8 +58,8 @@ private: const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, const css::uno::Reference< css::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const OUString &schemaName, - const OUString &tableName); + OUString schemaName, + OUString tableName); virtual ~Keys() override; diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index 57addead1235..2131b3e15254 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -22,6 +22,7 @@ #include <rtl/ustring.hxx> #include <sal/types.h> #include <connectivity/dbtoolsdllapi.hxx> +#include <utility> namespace connectivity { @@ -64,14 +65,14 @@ namespace connectivity , m_DefinitelyWritable(false) {} - OColumn(const OUString &_aTableName, + OColumn(OUString _aTableName, const OUString &_aColumnName, sal_Int32 _aNullable, sal_Int32 _aColumnDisplaySize, sal_Int32 _aPrecision, sal_Int32 _aScale, sal_Int32 _aColumnType) - : m_TableName(_aTableName), + : m_TableName(std::move(_aTableName)), m_ColumnName(_aColumnName), m_ColumnLabel(), diff --git a/connectivity/source/inc/ParameterSubstitution.hxx b/connectivity/source/inc/ParameterSubstitution.hxx index 11ac90982ca9..a76bd09398fa 100644 --- a/connectivity/source/inc/ParameterSubstitution.hxx +++ b/connectivity/source/inc/ParameterSubstitution.hxx @@ -41,7 +41,7 @@ namespace connectivity ParameterSubstitution( const ParameterSubstitution& ) = delete; ParameterSubstitution& operator=( const ParameterSubstitution& ) = delete; public: - ParameterSubstitution(const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); + ParameterSubstitution(css::uno::Reference< css::uno::XComponentContext > _rContext ); private: // XServiceInfo diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 6000c36224cf..85666f9e5290 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -44,7 +44,7 @@ namespace connectivity::dbase public: ONDXKey(); - ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec); + ONDXKey(ORowSetValue aVal, sal_Int32 eType, sal_uInt32 nRec); ONDXKey(const OUString& aStr, sal_uInt32 nRec); ONDXKey(double aVal, sal_uInt32 nRec); diff --git a/connectivity/source/inc/file/FDriver.hxx b/connectivity/source/inc/file/FDriver.hxx index 9d289d618a3d..0351c59ca27a 100644 --- a/connectivity/source/inc/file/FDriver.hxx +++ b/connectivity/source/inc/file/FDriver.hxx @@ -42,7 +42,7 @@ namespace connectivity::file // for this Driver css::uno::Reference< css::uno::XComponentContext > m_xContext; public: - OFileDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext); + OFileDriver(css::uno::Reference< css::uno::XComponentContext > _xContext); // OComponentHelper virtual void SAL_CALL disposing() override; diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx index 65fc0bb3c83e..dee656a915f4 100644 --- a/connectivity/source/inc/file/FResultSetMetaData.hxx +++ b/connectivity/source/inc/file/FResultSetMetaData.hxx @@ -46,7 +46,7 @@ namespace connectivity::file virtual ~OResultSetMetaData() override; public: // a Constructor, that is needed for when Returning the Object is needed: - OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable); + OResultSetMetaData(::rtl::Reference<connectivity::OSQLColumns> _xColumns, OUString _aTableName, OFileTable* _pTable); virtual sal_Int32 SAL_CALL getColumnCount( ) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) override; diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index c78461743c27..daadbf880f5a 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -25,6 +25,7 @@ #include <file/filedllapi.hxx> #include <stack> +#include <utility> namespace connectivity { @@ -107,9 +108,9 @@ namespace connectivity protected: OOperandValue(){} - OOperandValue(const ORowSetValue& _rVar, sal_Int32 eDbType) + OOperandValue(ORowSetValue _aVar, sal_Int32 eDbType) : OOperand(eDbType) - , m_aValue(_rVar) + , m_aValue(std::move(_aVar)) {} OOperandValue(sal_Int32 eDbType) :OOperand(eDbType){} diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index ebdb0679e452..72afcdb0a84e 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -19,6 +19,7 @@ #pragma once #include <file/fcode.hxx> +#include <utility> namespace connectivity { @@ -86,7 +87,7 @@ namespace connectivity ::rtl::Reference<OPredicateCompiler> m_rCompiler; public: - OPredicateInterpreter(const ::rtl::Reference<OPredicateCompiler>& rComp) : m_rCompiler(rComp){} + OPredicateInterpreter(::rtl::Reference<OPredicateCompiler> xComp) : m_rCompiler(std::move(xComp)){} virtual ~OPredicateInterpreter() override; bool evaluate(OCodeList& rCodeList); diff --git a/connectivity/source/inc/hsqldb/HTables.hxx b/connectivity/source/inc/hsqldb/HTables.hxx index a421be35e1b4..bff5e0e6421a 100644 --- a/connectivity/source/inc/hsqldb/HTables.hxx +++ b/connectivity/source/inc/hsqldb/HTables.hxx @@ -20,6 +20,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::hsqldb { class OTables final : public sdbcx::OCollection @@ -35,9 +36,9 @@ namespace connectivity::hsqldb void createTable( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject) override; public: - OTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) {} // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/inc/hsqldb/HUser.hxx b/connectivity/source/inc/hsqldb/HUser.hxx index dc69c636eb00..67c44e185bd2 100644 --- a/connectivity/source/inc/hsqldb/HUser.hxx +++ b/connectivity/source/inc/hsqldb/HUser.hxx @@ -38,8 +38,8 @@ namespace connectivity::hsqldb public: virtual void refreshGroups() override; public: - OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection); - OHSQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const OUString& Name); + OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection); + OHSQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection, const OUString& Name); // XUser virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; diff --git a/connectivity/source/inc/hsqldb/HUsers.hxx b/connectivity/source/inc/hsqldb/HUsers.hxx index 5f72bceb7b9b..a5a099e9927e 100644 --- a/connectivity/source/inc/hsqldb/HUsers.hxx +++ b/connectivity/source/inc/hsqldb/HUsers.hxx @@ -43,7 +43,7 @@ namespace connectivity OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - const css::uno::Reference< css::sdbc::XConnection >& _xConnection, + css::uno::Reference< css::sdbc::XConnection > _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent); }; } diff --git a/connectivity/source/inc/mysql/YTables.hxx b/connectivity/source/inc/mysql/YTables.hxx index 11d76812399c..3e3283ca96da 100644 --- a/connectivity/source/inc/mysql/YTables.hxx +++ b/connectivity/source/inc/mysql/YTables.hxx @@ -21,6 +21,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <SQLStatementHelper.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::mysql { class OTables final : public sdbcx::OCollection, @@ -37,9 +38,9 @@ namespace connectivity::mysql void createTable( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject) override; public: - OTables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OTables(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) {} // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/inc/mysql/YUser.hxx b/connectivity/source/inc/mysql/YUser.hxx index ecb93fa21118..1713f63bfb64 100644 --- a/connectivity/source/inc/mysql/YUser.hxx +++ b/connectivity/source/inc/mysql/YUser.hxx @@ -38,8 +38,8 @@ namespace connectivity::mysql public: virtual void refreshGroups() override; public: - OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection); - OMySQLUser( const css::uno::Reference< css::sdbc::XConnection >& _xConnection,const OUString& Name); + OMySQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection); + OMySQLUser( css::uno::Reference< css::sdbc::XConnection > _xConnection, const OUString& Name); // XUser virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override; diff --git a/connectivity/source/inc/mysql/YUsers.hxx b/connectivity/source/inc/mysql/YUsers.hxx index d27244775c07..e4b35c12e718 100644 --- a/connectivity/source/inc/mysql/YUsers.hxx +++ b/connectivity/source/inc/mysql/YUsers.hxx @@ -43,7 +43,7 @@ namespace connectivity OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - const css::uno::Reference< css::sdbc::XConnection >& _xConnection, + css::uno::Reference< css::sdbc::XConnection > _xConnection, connectivity::sdbcx::IRefreshableUsers* _pParent); }; } diff --git a/connectivity/source/inc/mysql/YViews.hxx b/connectivity/source/inc/mysql/YViews.hxx index 22a1f605b657..2e9a1b25162a 100644 --- a/connectivity/source/inc/mysql/YViews.hxx +++ b/connectivity/source/inc/mysql/YViews.hxx @@ -20,6 +20,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <utility> namespace connectivity::mysql { class OViews final : public sdbcx::OCollection @@ -34,9 +35,9 @@ namespace connectivity::mysql void createView( const css::uno::Reference< css::beans::XPropertySet >& descriptor ); public: - OViews(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, + OViews(css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) - ,m_xMetaData(_rMetaData) + ,m_xMetaData(std::move(_xMetaData)) ,m_bInDrop(false) {} diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx index 0152346b2473..6cba90648d6e 100644 --- a/connectivity/source/inc/odbc/ODriver.hxx +++ b/connectivity/source/inc/odbc/ODriver.hxx @@ -49,7 +49,7 @@ namespace connectivity::odbc public: - ODBCDriver(const css::uno::Reference< css::uno::XComponentContext >& rxContext); + ODBCDriver(css::uno::Reference< css::uno::XComponentContext > xContext); // only possibility to get the odbc functions virtual oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const = 0; diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index e7e0adf5e4fb..5159623f9265 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -35,6 +35,7 @@ #include <algorithm> #include <iterator> +#include <utility> #include <vector> namespace drivermanager @@ -225,7 +226,7 @@ namespace struct EqualDriverAccessToName { OUString m_sImplName; - explicit EqualDriverAccessToName(const OUString& _sImplName) : m_sImplName(_sImplName){} + explicit EqualDriverAccessToName(OUString _sImplName) : m_sImplName(std::move(_sImplName)){} bool operator()( const DriverAccess& lhs) { diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index fcebd2879a4f..083e80426f11 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -42,6 +42,7 @@ #include <iterator> #include <memory> +#include <utility> using namespace ::comphelper; using namespace ::connectivity; @@ -120,9 +121,9 @@ namespace connectivity OUString m_sForbiddenQueryName; public: - ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, const OUString& _rForbiddenQueryName ) + ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, OUString _aForbiddenQueryName ) :m_rpAllForbiddenNames( _rIteratorImpl.m_pForbiddenQueryNames ) - ,m_sForbiddenQueryName( _rForbiddenQueryName ) + ,m_sForbiddenQueryName(std::move( _aForbiddenQueryName )) { if ( !m_rpAllForbiddenNames ) m_rpAllForbiddenNames = std::make_shared<QueryNameSet>(); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 75acac48f7b8..ab93c41511ad 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -59,6 +59,7 @@ #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <utility> using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::util; @@ -191,7 +192,7 @@ namespace connectivity SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter >& _xFormatter, const Reference< XPropertySet >& _xField, - const OUString &_sPredicateTableAlias, + OUString _sPredicateTableAlias, const Locale& _rLocale, const IParseContext* _pContext, bool _bIntl, bool _bQuote, OUString _sDecSep, bool _bPredicate, bool _bParseToSDBC ) :rLocale(_rLocale) @@ -200,9 +201,9 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r ,pSubQueryHistory( std::make_shared<QueryNameSet>() ) ,xFormatter(_xFormatter) ,xField(_xField) - ,sPredicateTableAlias(_sPredicateTableAlias) + ,sPredicateTableAlias(std::move(_sPredicateTableAlias)) ,m_rContext( _pContext ? *_pContext : OSQLParser::s_aDefaultContext ) - ,sDecSep(_sDecSep) + ,sDecSep(std::move(_sDecSep)) ,bQuote(_bQuote) ,bInternational(_bIntl) ,bPredicate(_bPredicate) @@ -1316,12 +1317,12 @@ std::unique_ptr<OSQLParseNode> OSQLParser::predicateTree(OUString& rErrorMessage } -OSQLParser::OSQLParser(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const IParseContext* _pContext) +OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > xContext, const IParseContext* _pContext) :m_pContext(_pContext) ,m_pData( new OSQLParser_Data ) ,m_nFormatKey(0) ,m_nDateFormatKey(0) - ,m_xContext(rxContext) + ,m_xContext(std::move(xContext)) { @@ -1611,11 +1612,11 @@ OSQLParseNode::OSQLParseNode(std::string_view _rNewValue, OSL_ENSURE(m_eNodeType >= SQLNodeType::Rule && m_eNodeType <= SQLNodeType::Concat,"OSQLParseNode: created with invalid NodeType"); } -OSQLParseNode::OSQLParseNode(const OUString &_rNewValue, +OSQLParseNode::OSQLParseNode(OUString _aNewValue, SQLNodeType eNewNodeType, sal_uInt32 nNewNodeID) :m_pParent(nullptr) - ,m_aNodeValue(_rNewValue) + ,m_aNodeValue(std::move(_aNewValue)) ,m_eNodeType(eNewNodeType) ,m_nNodeID(nNewNodeID) { diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx index 398d64b49f57..a61d0619a6e3 100644 --- a/connectivity/source/sdbcx/VColumn.cxx +++ b/connectivity/source/sdbcx/VColumn.cxx @@ -23,6 +23,7 @@ #include <cppuhelper/supportsservice.hxx> #include <TConnection.hxx> #include <com/sun/star/sdbc/ColumnValue.hpp> +#include <utility> using namespace connectivity; using namespace connectivity::sdbcx; @@ -65,9 +66,9 @@ OColumn::OColumn(bool _bCase) } OColumn::OColumn( const OUString& Name, - const OUString& TypeName, - const OUString& DefaultValue, - const OUString& Description, + OUString TypeName, + OUString DefaultValue, + OUString Description, sal_Int32 IsNullable, sal_Int32 Precision, sal_Int32 Scale, @@ -76,14 +77,14 @@ OColumn::OColumn( const OUString& Name, bool IsRowVersion, bool IsCurrency, bool _bCase, - const OUString& CatalogName, - const OUString& SchemaName, - const OUString& TableName) + OUString CatalogName, + OUString SchemaName, + OUString TableName) :OColumnDescriptor_BASE(m_aMutex) ,ODescriptor(OColumnDescriptor_BASE::rBHelper,_bCase) - ,m_TypeName(TypeName) - ,m_Description(Description) - ,m_DefaultValue(DefaultValue) + ,m_TypeName(std::move(TypeName)) + ,m_Description(std::move(Description)) + ,m_DefaultValue(std::move(DefaultValue)) ,m_IsNullable(IsNullable) ,m_Precision(Precision) ,m_Scale(Scale) @@ -91,9 +92,9 @@ OColumn::OColumn( const OUString& Name, ,m_IsAutoIncrement(IsAutoIncrement) ,m_IsRowVersion(IsRowVersion) ,m_IsCurrency(IsCurrency) - ,m_CatalogName(CatalogName) - ,m_SchemaName(SchemaName) - ,m_TableName(TableName) + ,m_CatalogName(std::move(CatalogName)) + ,m_SchemaName(std::move(SchemaName)) + ,m_TableName(std::move(TableName)) { m_Name = Name; diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx index e04cf2527791..6a574ac5a321 100644 --- a/connectivity/source/sdbcx/VIndex.cxx +++ b/connectivity/source/sdbcx/VIndex.cxx @@ -24,6 +24,7 @@ #include <connectivity/sdbcx/VCollection.hxx> #include <cppuhelper/supportsservice.hxx> #include <TConnection.hxx> +#include <utility> #include <tools/diagnose_ex.h> using namespace ::connectivity; @@ -64,13 +65,13 @@ OIndex::OIndex(bool _bCase) : ODescriptor_BASE(m_aMutex) } OIndex::OIndex( const OUString& Name, - const OUString& Catalog, + OUString Catalog, bool _isUnique, bool _isPrimaryKeyIndex, bool _isClustered, bool _bCase) : ODescriptor_BASE(m_aMutex) ,ODescriptor(ODescriptor_BASE::rBHelper, _bCase) - ,m_Catalog(Catalog) + ,m_Catalog(std::move(Catalog)) ,m_IsUnique(_isUnique) ,m_IsPrimaryKeyIndex(_isPrimaryKeyIndex) ,m_IsClustered(_isClustered) diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx index f267db161504..2cf7bceb4d14 100644 --- a/connectivity/source/sdbcx/VKey.cxx +++ b/connectivity/source/sdbcx/VKey.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/supportsservice.hxx> #include <connectivity/sdbcx/VCollection.hxx> #include <TConnection.hxx> +#include <utility> using namespace connectivity; using namespace connectivity::sdbcx; @@ -58,10 +59,10 @@ OKey::OKey(bool _bCase) : ODescriptor_BASE(m_aMutex) { } -OKey::OKey(const OUString& Name,const std::shared_ptr<KeyProperties>& _rProps, bool _bCase) +OKey::OKey(const OUString& Name,std::shared_ptr<KeyProperties> _xProps, bool _bCase) : ODescriptor_BASE(m_aMutex) ,ODescriptor(ODescriptor_BASE::rBHelper, _bCase) - ,m_aProps(_rProps) + ,m_aProps(std::move(_xProps)) { m_Name = Name; } diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx index b6f69e65c9de..e22620fb599d 100644 --- a/connectivity/source/sdbcx/VKeyColumn.cxx +++ b/connectivity/source/sdbcx/VKeyColumn.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <cppuhelper/supportsservice.hxx> #include <TConnection.hxx> +#include <utility> using namespace connectivity; using namespace connectivity::sdbcx; @@ -50,7 +51,7 @@ OKeyColumn::OKeyColumn(bool _bCase) : OColumn(_bCase) construct(); } -OKeyColumn::OKeyColumn( const OUString& ReferencedColumn, +OKeyColumn::OKeyColumn( OUString ReferencedColumn, const OUString& Name, const OUString& TypeName, const OUString& DefaultValue, @@ -77,7 +78,7 @@ OKeyColumn::OKeyColumn( const OUString& ReferencedColumn, CatalogName, SchemaName, TableName) - , m_ReferencedColumn(ReferencedColumn) + , m_ReferencedColumn(std::move(ReferencedColumn)) { construct(); } diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index 7a28bc5f4289..f569d01baef3 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -25,6 +25,7 @@ #include <connectivity/dbtools.hxx> #include <connectivity/dbexception.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> using namespace ::connectivity; using namespace ::connectivity::sdbcx; @@ -65,14 +66,14 @@ OTable::OTable(OCollection* _pTables, OTable::OTable( OCollection* _pTables, bool _bCase, - const OUString& Name, const OUString& Type, - const OUString& Description,const OUString& SchemaName, - const OUString& CatalogName) : OTableDescriptor_BASE(m_aMutex) + const OUString& Name, OUString Type, + OUString Description, OUString SchemaName, + OUString CatalogName) : OTableDescriptor_BASE(m_aMutex) ,ODescriptor(OTableDescriptor_BASE::rBHelper,_bCase) - ,m_CatalogName(CatalogName) - ,m_SchemaName(SchemaName) - ,m_Description(Description) - ,m_Type(Type) + ,m_CatalogName(std::move(CatalogName)) + ,m_SchemaName(std::move(SchemaName)) + ,m_Description(std::move(Description)) + ,m_Type(std::move(Type)) ,m_pTables(_pTables) { m_Name = Name; diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index b36817a40f3d..aa016c0e5891 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -22,6 +22,7 @@ #include <comphelper/sequence.hxx> #include <connectivity/dbtools.hxx> #include <TConnection.hxx> +#include <utility> using namespace connectivity; @@ -36,24 +37,24 @@ IMPLEMENT_SERVICE_INFO(OView,"com.sun.star.sdbcx.VView","com.sun.star.sdbcx.View OView::OView(bool _bCase, const OUString& Name, - const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _xMetaData, - const OUString& Command, - const OUString& SchemaName, - const OUString& CatalogName) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase) - ,m_CatalogName(CatalogName) - ,m_SchemaName(SchemaName) - ,m_Command(Command) + css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData, + OUString Command, + OUString SchemaName, + OUString CatalogName) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase) + ,m_CatalogName(std::move(CatalogName)) + ,m_SchemaName(std::move(SchemaName)) + ,m_Command(std::move(Command)) ,m_CheckOption(0) - ,m_xMetaData(_xMetaData) + ,m_xMetaData(std::move(_xMetaData)) { m_Name = Name; construct(); } -OView::OView(bool _bCase, const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _xMetaData) +OView::OView(bool _bCase, css::uno::Reference< css::sdbc::XDatabaseMetaData > _xMetaData) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper, _bCase, true) - ,m_xMetaData(_xMetaData) + ,m_xMetaData(std::move(_xMetaData)) { construct(); } |