diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-13 16:28:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-13 20:37:35 +0200 |
commit | 9e0332bfb9d71a37d80602034b8cfd0efb93cee7 (patch) | |
tree | cc171e85f4e7f9c9381330cdf797465fecda295f /dbaccess | |
parent | 3ad12672e924f7aef394119f9fe5f0b06a900b9e (diff) |
clang-tidy modernize-pass-by-value in dbaccess
Change-Id: I8f89ec8a73f82fd93320a710165df17180939f96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135731
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
82 files changed, 245 insertions, 191 deletions
diff --git a/dbaccess/source/core/api/CIndexes.hxx b/dbaccess/source/core/api/CIndexes.hxx index f20da6cbefa9..d8dbeb82a8f6 100644 --- a/dbaccess/source/core/api/CIndexes.hxx +++ b/dbaccess/source/core/api/CIndexes.hxx @@ -20,6 +20,7 @@ #pragma once #include <connectivity/TIndexes.hxx> +#include <utility> namespace dbaccess { @@ -35,9 +36,9 @@ namespace dbaccess OIndexes(connectivity::OTableHelper* _pTable, ::osl::Mutex& _rMutex, const std::vector< OUString> &_rVector, - const css::uno::Reference< css::container::XNameAccess >& _rxIndexes + css::uno::Reference< css::container::XNameAccess > _rxIndexes ) : connectivity::OIndexesHelper(_pTable,_rMutex,_rVector) - ,m_xIndexes(_rxIndexes) + ,m_xIndexes(std::move(_rxIndexes)) {} virtual void disposing() override; diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 0dce91848aae..be5c70b93879 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/sdbc/SQLException.hpp> +#include <utility> using namespace dbaccess; using namespace comphelper; @@ -44,13 +45,13 @@ ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >& _x const Reference < XRowUpdate >& _xRowUpdate, sal_Int32 _nPos, const Reference< XDatabaseMetaData >& _rxDBMeta, - const OUString& _rDescription, - const OUString& i_sLabel, - const std::function<const ORowSetValue& (sal_Int32)> &_getValue) + OUString i_sDescription, + OUString i_sLabel, + std::function<const ORowSetValue& (sal_Int32)> _getValue) :ODataColumn(_xMetaData,_xRow,_xRowUpdate,_nPos,_rxDBMeta) - ,m_pGetValue(_getValue) - ,m_sLabel(i_sLabel) - ,m_aDescription(_rDescription) + ,m_pGetValue(std::move(_getValue)) + ,m_sLabel(std::move(i_sLabel)) + ,m_aDescription(std::move(i_sDescription)) { OColumnSettings::registerProperties( *this ); registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, PropertyAttribute::READONLY, &m_aDescription, cppu::UnoType<decltype(m_aDescription)>::get() ); @@ -192,12 +193,12 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue) ORowSetDataColumns::ORowSetDataColumns( bool _bCase, - const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, + ::rtl::Reference< ::connectivity::OSQLColumns> _xColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const std::vector< OUString> &_rVector ) : connectivity::sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector) - ,m_aColumns(_rColumns) + ,m_aColumns(std::move(_xColumns)) { } diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx index f0efcbf8d85c..a19aad8497e5 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.hxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx @@ -49,9 +49,9 @@ namespace dbaccess const css::uno::Reference < css::sdbc::XRowUpdate >& _xRowUpdate, sal_Int32 _nPos, const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxDBMeta, - const OUString& _rDescription, - const OUString& i_sLabel, - const std::function<const ::connectivity::ORowSetValue& (sal_Int32)> &_getValue); + OUString i_sDescription, + OUString i_sLabel, + std::function<const ::connectivity::ORowSetValue& (sal_Int32)> _getValue); // css::lang::XTypeProvider @@ -84,7 +84,7 @@ namespace dbaccess public: ORowSetDataColumns( bool _bCase, - const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, + ::rtl::Reference< ::connectivity::OSQLColumns> _xColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const std::vector< OUString> &_rVector diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx index dfc18badc688..5eb0db967e29 100644 --- a/dbaccess/source/core/api/HelperCollections.cxx +++ b/dbaccess/source/core/api/HelperCollections.cxx @@ -20,6 +20,7 @@ #include "HelperCollections.hxx" #include <strings.hxx> +#include <utility> #include <osl/diagnose.h> @@ -39,14 +40,14 @@ namespace dbaccess using namespace ::cppu; using namespace ::osl; - OPrivateColumns::OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, + OPrivateColumns::OPrivateColumns(::rtl::Reference< ::connectivity::OSQLColumns> _xColumns, bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const std::vector< OUString> &_rVector, bool _bUseAsIndex ) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector,_bUseAsIndex) - ,m_aColumns(_rColumns) + ,m_aColumns(std::move(_xColumns)) { } diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx index ed89fc643054..050b4a23fb3e 100644 --- a/dbaccess/source/core/api/HelperCollections.hxx +++ b/dbaccess/source/core/api/HelperCollections.hxx @@ -50,7 +50,7 @@ namespace dbaccess return nullptr; } public: - OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, + OPrivateColumns(::rtl::Reference< ::connectivity::OSQLColumns> _xColumns, bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 338d4d7f87aa..789ecf18ee9c 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -46,6 +46,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <composertools.hxx> +#include <utility> #include "PrivateRow.hxx" using namespace dbaccess; @@ -103,17 +104,17 @@ namespace } -OKeySet::OKeySet(const connectivity::OSQLTable& _xTable, - const OUString& _rUpdateTableName, // this can be the alias or the full qualified name +OKeySet::OKeySet(connectivity::OSQLTable _xTable, + OUString _sUpdateTableName, // this can be the alias or the full qualified name const Reference< XSingleSelectQueryAnalyzer >& _xComposer, const ORowSetValueVector& _aParameterValueForCache, sal_Int32 i_nMaxRows, sal_Int32& o_nRowCount) :OCacheSet(i_nMaxRows) ,m_aParameterValueForCache(new ORowSetValueVector(_aParameterValueForCache)) - ,m_xTable(_xTable) + ,m_xTable(std::move(_xTable)) ,m_xComposer(_xComposer) - ,m_sUpdateTableName(_rUpdateTableName) + ,m_sUpdateTableName(std::move(_sUpdateTableName)) ,m_rRowCount(o_nRowCount) ,m_bRowCountFinal(false) { diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index 57889c7743b2..bd30f3960eb3 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -23,6 +23,7 @@ #include <memory> #include <map> +#include <utility> #include <vector> #include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp> @@ -49,8 +50,8 @@ namespace dbaccess { } - SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale,bool _bNullable, const OUString& _rDefaultValue ) - :sDefaultValue( _rDefaultValue ) + SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale, bool _bNullable, OUString _sDefaultValue ) + :sDefaultValue(std::move( _sDefaultValue )) ,nPosition( _nPosition ) ,nType( _nType ) ,nScale( _nScale ) @@ -142,8 +143,8 @@ namespace dbaccess virtual ~OKeySet() override; public: - OKeySet(const connectivity::OSQLTable& _xTable, - const OUString& _rUpdateTableName, + OKeySet(connectivity::OSQLTable _aTable, + OUString _sUpdateTableName, const css::uno::Reference< css::sdb::XSingleSelectQueryAnalyzer >& _xComposer, const ORowSetValueVector& _aParameterValueForCache, sal_Int32 i_nMaxRows, diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx index 9c7a9afd4deb..f5d5e6783b65 100644 --- a/dbaccess/source/core/api/RowSetCacheIterator.hxx +++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx @@ -21,6 +21,7 @@ #include <sal/config.h> #include <map> +#include <utility> #include "RowSetRow.hxx" @@ -43,8 +44,8 @@ namespace dbaccess ORowSetCache* m_pCache; ORowSetBase* m_pRowSet; - ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet) - : m_aIter(_rIter) + ORowSetCacheIterator(ORowSetCacheMap::iterator _aIter, ORowSetCache* _pCache,ORowSetBase* _pRowSet) + : m_aIter(std::move(_aIter)) ,m_pCache(_pCache) ,m_pRowSet(_pRowSet) { diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx index 7f24267b7530..a847399dd1e9 100644 --- a/dbaccess/source/core/api/RowSetRow.hxx +++ b/dbaccess/source/core/api/RowSetRow.hxx @@ -22,6 +22,7 @@ #include <connectivity/CommonTools.hxx> #include <connectivity/FValue.hxx> #include <salhelper/simplereferenceobject.hxx> +#include <utility> namespace dbaccess { @@ -36,8 +37,8 @@ namespace dbaccess ORowSetOldRowHelper& operator=(const ORowSetOldRowHelper& _rRH) = delete; ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh) = delete; public: - explicit ORowSetOldRowHelper(const ORowSetRow& _rRow) - : m_aRow(_rRow) + explicit ORowSetOldRowHelper(ORowSetRow _aRow) + : m_aRow(std::move(_aRow)) {} const ORowSetRow& getRow() const { return m_aRow; } diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 5bc70affbce0..661624c2e5c0 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -34,6 +34,7 @@ #include <connectivity/TTableHelper.hxx> #include <connectivity/dbexception.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> #include <osl/diagnose.h> using namespace dbaccess; @@ -147,7 +148,7 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent, } OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const css::uno::Reference< css::container::XNameAccess >& _rxDrvColumns, + css::uno::Reference< css::container::XNameAccess > _xDrvColumns, bool _bCaseSensitive,const std::vector< OUString> &_rVector, IColumnFactory* _pColFactory, ::connectivity::sdbcx::IRefreshableColumns* _pRefresh, @@ -156,7 +157,7 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, bool _bUseHardRef) : OColumns_BASE(_rParent,_bCaseSensitive,_rMutex,_rVector,_bUseHardRef) ,m_pMediator(nullptr) - ,m_xDrvColumns(_rxDrvColumns) + ,m_xDrvColumns(std::move(_xDrvColumns)) ,m_pColFactoryImpl(_pColFactory) ,m_pRefreshColumns(_pRefresh) ,m_bInitialized(false) diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index 3f95421803c1..657fb5d9049b 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -30,6 +30,7 @@ #include <comphelper/property.hxx> #include <connectivity/dbtools.hxx> #include <sal/log.hxx> +#include <utility> #include <tools/diagnose_ex.h> using namespace ::com::sun::star::sdbc; @@ -156,9 +157,9 @@ OUString OTableColumn::getImplementationName( ) // OQueryColumn -OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection, const OUString &i_sLabel ) +OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection, OUString i_sLabel ) :OTableColumnDescriptor( false /* do not act as descriptor */ ) - ,m_sLabel(i_sLabel) + ,m_sLabel(std::move(i_sLabel)) { const sal_Int32 nPropAttr = PropertyAttribute::READONLY; registerProperty( PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, nPropAttr, &m_sCatalogName, cppu::UnoType<decltype(m_sCatalogName)>::get() ); diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 558dd7450513..5f0d92bad33a 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -38,6 +38,7 @@ #include <strings.hxx> #include <map> +#include <utility> namespace dbaccess { @@ -63,13 +64,13 @@ OContentHelper_Impl::~OContentHelper_Impl() OContentHelper::OContentHelper(const Reference< XComponentContext >& _xORB ,const Reference< XInterface >& _xParentContainer - ,const TContentPtr& _pImpl) + ,TContentPtr _pImpl) : OContentHelper_COMPBASE(m_aMutex) ,m_aContentListeners(m_aMutex) ,m_aPropertyChangeListeners(m_aMutex) ,m_xParentContainer( _xParentContainer ) ,m_aContext( _xORB ) - ,m_pImpl(_pImpl) + ,m_pImpl(std::move(_pImpl)) ,m_nCommandId(0) { } diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 5a4078fccfb9..e52b231934f6 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -58,6 +58,7 @@ #include <i18nlangtag/languagetag.hxx> #include <algorithm> +#include <utility> using namespace css; using namespace ::com::sun::star::document; @@ -379,7 +380,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _r } ODatabaseModelImpl::ODatabaseModelImpl( - const OUString& _rRegistrationName, + OUString _sRegistrationName, const Reference< XComponentContext >& _rxContext, ODatabaseContext& _rDBContext ) @@ -392,7 +393,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( ,m_bDocumentInitialized( false ) ,m_nScriptingSignatureState(SignatureState::UNKNOWN) ,m_aContext( _rxContext ) - ,m_sName(_rRegistrationName) + ,m_sName(std::move(_sRegistrationName)) ,m_nLoginTimeout(0) ,m_bReadOnly(false) ,m_bPasswordRequired(false) @@ -1418,8 +1419,8 @@ void ODatabaseModelImpl::storageIsModified() setModified( true ); } -ModelDependentComponent::ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model ) - :m_pImpl( _model ) +ModelDependentComponent::ModelDependentComponent( ::rtl::Reference< ODatabaseModelImpl > _model ) + :m_pImpl(std::move( _model )) { } diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx index e0d32d56971b..e86efdb50cca 100644 --- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx +++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vector> #include <ucbhelper/contentidentifier.hxx> @@ -64,8 +65,8 @@ struct DataSupplier_Impl rtl::Reference< ODocumentContainer > m_xContent; bool m_bCountFinal; - explicit DataSupplier_Impl(const rtl::Reference< ODocumentContainer >& rContent) - : m_xContent(rContent) + explicit DataSupplier_Impl(rtl::Reference< ODocumentContainer > xContent) + : m_xContent(std::move(xContent)) , m_bCountFinal(false) { } diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.cxx b/dbaccess/source/core/dataaccess/myucp_resultset.cxx index 67c1ad7c8b4b..4067eae381c4 100644 --- a/dbaccess/source/core/dataaccess/myucp_resultset.cxx +++ b/dbaccess/source/core/dataaccess/myucp_resultset.cxx @@ -26,6 +26,8 @@ *************************************************************************/ +#include <utility> + #include "myucp_datasupplier.hxx" #include "myucp_resultset.hxx" @@ -42,11 +44,11 @@ using namespace dbaccess; // DynamicResultSet Implementation. DynamicResultSet::DynamicResultSet( const Reference< XComponentContext >& rxContext, - const rtl::Reference< ODocumentContainer >& rxContent, + rtl::Reference< ODocumentContainer > xContent, const OpenCommandArgument2& rCommand, const Reference< XCommandEnvironment >& rxEnv ) :ResultSetImplHelper( rxContext, rCommand ) - ,m_xContent(rxContent) + ,m_xContent(std::move(xContent)) ,m_xEnv( rxEnv ) { } diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.hxx b/dbaccess/source/core/dataaccess/myucp_resultset.hxx index ae269ffb8ac9..220bdf0a70b7 100644 --- a/dbaccess/source/core/dataaccess/myucp_resultset.hxx +++ b/dbaccess/source/core/dataaccess/myucp_resultset.hxx @@ -39,7 +39,7 @@ private: public: DynamicResultSet( const css::uno::Reference< css::uno::XComponentContext >& rxContext, - const rtl::Reference< ODocumentContainer >& rxContent, + rtl::Reference< ODocumentContainer > xContent, const css::ucb::OpenCommandArgument2& rCommand, const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv ); }; diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx index 004b785ef185..2035a35c1f8c 100644 --- a/dbaccess/source/core/inc/ContentHelper.hxx +++ b/dbaccess/source/core/inc/ContentHelper.hxx @@ -122,7 +122,7 @@ namespace dbaccess OContentHelper( const css::uno::Reference< css::uno::XComponentContext >& _xORB ,const css::uno::Reference< css::uno::XInterface >& _xParentContainer - ,const TContentPtr& _pImpl + ,TContentPtr _pImpl ); // css::lang::XTypeProvider diff --git a/dbaccess/source/core/inc/ModelImpl.hxx b/dbaccess/source/core/inc/ModelImpl.hxx index b6e2fe729ffb..974e5c853794 100644 --- a/dbaccess/source/core/inc/ModelImpl.hxx +++ b/dbaccess/source/core/inc/ModelImpl.hxx @@ -221,7 +221,7 @@ public: virtual ~ODatabaseModelImpl(); ODatabaseModelImpl( - const OUString& _rRegistrationName, + OUString _sRegistrationName, const css::uno::Reference< css::uno::XComponentContext >& _rxContext, ODatabaseContext& _rDBContext ); @@ -451,7 +451,7 @@ protected: ::osl::Mutex m_aMutex; // only use this to init WeakComponentImplHelper protected: - explicit ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model ); + explicit ModelDependentComponent( ::rtl::Reference< ODatabaseModelImpl > _model ); virtual ~ModelDependentComponent(); /** returns the component itself diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx index b8e602fc05cf..daf31758d000 100644 --- a/dbaccess/source/core/inc/PropertyForward.hxx +++ b/dbaccess/source/core/inc/PropertyForward.hxx @@ -49,7 +49,7 @@ namespace dbaccess public: OPropertyForward( const css::uno::Reference< css::beans::XPropertySet>& _xSource, const css::uno::Reference< css::container::XNameAccess>& _xDestContainer, - const OUString& _sName, + OUString _sName, const std::vector< OUString >& _aPropertyList ); diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx index aebc376b138d..ca533b5b1793 100644 --- a/dbaccess/source/core/inc/column.hxx +++ b/dbaccess/source/core/inc/column.hxx @@ -178,7 +178,7 @@ namespace dbaccess OColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const css::uno::Reference< css::container::XNameAccess >& _rxDrvColumns, + css::uno::Reference< css::container::XNameAccess > _xDrvColumns, bool _bCaseSensitive, const std::vector< OUString> &_rVector, IColumnFactory* _pColFactory, diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx index 4d7ff3e170e0..b4c0a5c081a6 100644 --- a/dbaccess/source/core/inc/definitioncolumn.hxx +++ b/dbaccess/source/core/inc/definitioncolumn.hxx @@ -151,7 +151,7 @@ namespace dbaccess OQueryColumn( const css::uno::Reference< css::beans::XPropertySet>& _rxParserColumn, const css::uno::Reference< css::sdbc::XConnection >& _rxConnection, - const OUString &i_sLabel + OUString i_sLabel ); // XTypeProvider diff --git a/dbaccess/source/core/inc/veto.hxx b/dbaccess/source/core/inc/veto.hxx index 5608e87d11ee..ec44172f70d4 100644 --- a/dbaccess/source/core/inc/veto.hxx +++ b/dbaccess/source/core/inc/veto.hxx @@ -37,7 +37,7 @@ namespace dbaccess const css::uno::Any m_aDetails; public: - Veto( const css::uno::Any& _rDetails ); + Veto( css::uno::Any _aDetails ); virtual OUString SAL_CALL getReason() override; virtual css::uno::Any SAL_CALL getDetails() override; diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 8695d518ce31..6e7390a52879 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/chart/XChartDataArray.hpp> +#include <utility> #include <vector> // TODO: update for new HavingClause-aware FilterManager @@ -598,8 +599,8 @@ namespace ,nDataType( sdbc::DataType::VARCHAR ) { } - explicit ColumnDescription( const OUString& i_rName ) - :sName( i_rName ) + explicit ColumnDescription( OUString i_sName ) + :sName(std::move( i_sName )) ,nResultSetPosition( 0 ) ,nDataType( sdbc::DataType::VARCHAR ) { diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx index 239bd422fd41..3410db616e09 100644 --- a/dbaccess/source/core/misc/PropertyForward.cxx +++ b/dbaccess/source/core/misc/PropertyForward.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/sdbcx/XAppend.hpp> #include <comphelper/property.hxx> +#include <utility> #include <tools/diagnose_ex.h> namespace dbaccess @@ -37,10 +38,10 @@ namespace dbaccess OPropertyForward::OPropertyForward( const Reference< XPropertySet>& _xSource, const Reference< XNameAccess>& _xDestContainer, - const OUString& _sName, const std::vector< OUString>& _aPropertyList ) + OUString _sName, const std::vector< OUString>& _aPropertyList ) :m_xSource( _xSource, UNO_SET_THROW ) ,m_xDestContainer( _xDestContainer, UNO_SET_THROW ) - ,m_sName( _sName ) + ,m_sName(std::move( _sName )) ,m_bInInsert( false ) { diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 06eb5545f354..91b93f353946 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -26,6 +26,7 @@ #include <osl/file.hxx> #include <officecfg/Office/Common.hxx> #include <comphelper/string.hxx> +#include <utility> namespace dbaccess { @@ -349,8 +350,8 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(std::u16string_view _rDsn) con const DATASOURCE_TYPE eType; const bool bMatchComplete; - KnownPrefix( const OUString &_s, const DATASOURCE_TYPE _t, const bool _m ) - :sPrefix( _s ) + KnownPrefix( OUString _s, const DATASOURCE_TYPE _t, const bool _m ) + :sPrefix(std::move( _s )) ,eType ( _t ) ,bMatchComplete( _m ) { diff --git a/dbaccess/source/core/misc/veto.cxx b/dbaccess/source/core/misc/veto.cxx index d2596d4e1e11..07aa9567ec46 100644 --- a/dbaccess/source/core/misc/veto.cxx +++ b/dbaccess/source/core/misc/veto.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <veto.hxx> namespace dbaccess @@ -25,8 +26,8 @@ namespace dbaccess using ::com::sun::star::uno::Any; // Veto - Veto::Veto( const Any& _rDetails ) - :m_aDetails( _rDetails ) + Veto::Veto( Any _aDetails ) + :m_aDetails(std::move( _aDetails )) { } diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.hxx b/dbaccess/source/core/recovery/subcomponentrecovery.hxx index 26b81c63f374..ee41a32dfc89 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.hxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <utility> namespace dbaccess { @@ -35,10 +36,10 @@ namespace dbaccess SubComponentRecovery( const css::uno::Reference< css::uno::XComponentContext >& i_rContext, const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >& i_rController, - const css::uno::Reference< css::lang::XComponent >& i_rComponent ) + css::uno::Reference< css::lang::XComponent > i_xComponent ) :m_rContext( i_rContext ) ,m_xDocumentUI( i_rController, css::uno::UNO_SET_THROW ) - ,m_xComponent( i_rComponent ) + ,m_xComponent(std::move( i_xComponent )) ,m_eType( UNKNOWN ) ,m_aCompDesc() { diff --git a/dbaccess/source/filter/hsqldb/columndef.cxx b/dbaccess/source/filter/hsqldb/columndef.cxx index 5a7b741089e2..af10a2e8dd30 100644 --- a/dbaccess/source/filter/hsqldb/columndef.cxx +++ b/dbaccess/source/filter/hsqldb/columndef.cxx @@ -20,23 +20,24 @@ #include "columndef.hxx" #include <com/sun/star/sdbc/DataType.hpp> +#include <utility> namespace dbahsql { using namespace css::sdbc; -ColumnDefinition::ColumnDefinition(const OUString& sName, sal_Int32 eType, +ColumnDefinition::ColumnDefinition(OUString sName, sal_Int32 eType, std::vector<sal_Int32>&& aParams, bool bPrimary, sal_Int32 nAutoIncr, bool bNullable, bool bCaseInsensitive, - const OUString& sDefault) - : m_sName(sName) + OUString sDefault) + : m_sName(std::move(sName)) , m_eType(eType) , m_aParams(std::move(aParams)) , m_bPrimaryKey(bPrimary) , m_nAutoIncrement(nAutoIncr) , m_bNullable(bNullable) , m_bCaseInsensitive(bCaseInsensitive) - , m_sDefaultValue(sDefault) + , m_sDefaultValue(std::move(sDefault)) { } } diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx b/dbaccess/source/filter/hsqldb/columndef.hxx index 5ffa18ba574b..4ac3532a3454 100644 --- a/dbaccess/source/filter/hsqldb/columndef.hxx +++ b/dbaccess/source/filter/hsqldb/columndef.hxx @@ -28,9 +28,9 @@ private: OUString m_sDefaultValue; public: - ColumnDefinition(const OUString& sName, sal_Int32 eType, std::vector<sal_Int32>&& aParams, + ColumnDefinition(OUString sName, sal_Int32 eType, std::vector<sal_Int32>&& aParams, bool bPrimary = false, sal_Int32 nAutoIncr = -1, bool bNullable = true, - bool bCaseInsensitive = false, const OUString& sDefault = OUString{}); + bool bCaseInsensitive = false, OUString sDefault = OUString{}); OUString const& getName() const { return m_sName; } sal_Int32 getDataType() const { return m_eType; } diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx index b55340f2deb7..b3cc30ce21b3 100644 --- a/dbaccess/source/filter/hsqldb/parseschema.cxx +++ b/dbaccess/source/filter/hsqldb/parseschema.cxx @@ -33,6 +33,7 @@ #include <comphelper/string.hxx> #include <sal/log.hxx> #include <connectivity/dbexception.hxx> +#include <utility> namespace { @@ -46,8 +47,8 @@ private: OUString m_sql; public: - IndexStmtParser(const OUString& sSql) - : m_sql(sSql) + IndexStmtParser(OUString sSql) + : m_sql(std::move(sSql)) { } diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx index 71d5b4589e3a..fa763614c31e 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.cxx +++ b/dbaccess/source/filter/xml/xmlDocuments.cxx @@ -19,6 +19,7 @@ #include "xmlDocuments.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlQuery.hxx" @@ -35,23 +36,23 @@ namespace dbaxml OXMLDocuments::OXMLDocuments( ODBFilter& rImport ,const Reference< XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName) : + ,OUString _sCollectionServiceName + ,OUString _sComponentServiceName) : SvXMLImportContext( rImport ) ,m_xContainer(_xContainer) - ,m_sCollectionServiceName(_sCollectionServiceName) - ,m_sComponentServiceName(_sComponentServiceName) + ,m_sCollectionServiceName(std::move(_sCollectionServiceName)) + ,m_sComponentServiceName(std::move(_sComponentServiceName)) { } OXMLDocuments::OXMLDocuments( ODBFilter& rImport ,const Reference< XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName + ,OUString _sCollectionServiceName ) : SvXMLImportContext( rImport ) ,m_xContainer(_xContainer) - ,m_sCollectionServiceName(_sCollectionServiceName) + ,m_sCollectionServiceName(std::move(_sCollectionServiceName)) { } diff --git a/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx index c0542dcfb1a3..49c6346aa83e 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.hxx +++ b/dbaccess/source/filter/xml/xmlDocuments.hxx @@ -37,13 +37,13 @@ namespace dbaxml // for forms and reports OXMLDocuments( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName); + ,OUString _sCollectionServiceName + ,OUString _sComponentServiceName); // for queries OXMLDocuments( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName = OUString() + ,OUString _sCollectionServiceName = OUString() ); virtual ~OXMLDocuments() override; diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 74cb97721f2b..b4f9a7cec588 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -20,6 +20,7 @@ #include "xmlExport.hxx" #include "xmlAutoStyle.hxx" #include <sax/tools/converter.hxx> +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/xmlnamespace.hxx> #include <xmloff/namespacemap.hxx> @@ -281,15 +282,15 @@ void ODBExport::exportDataSource() const XMLTokenEnum eAttributeToken; const ::std::optional< OUString > aXMLDefault; - PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken ) - :sPropertyName( _rPropertyName ) + PropertyMap( OUString _sPropertyName, const XMLTokenEnum _eToken ) + :sPropertyName(std::move( _sPropertyName )) ,eAttributeToken( _eToken ) ,aXMLDefault() { } - PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken, const OUString& _rDefault ) - :sPropertyName( _rPropertyName ) + PropertyMap( OUString _sPropertyName, const XMLTokenEnum _eToken, const OUString& _rDefault ) + :sPropertyName(std::move( _sPropertyName )) ,eAttributeToken( _eToken ) ,aXMLDefault( _rDefault ) { diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index 7e1d148e197c..f852e39fba43 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> +#include <utility> #include <xmloff/maptype.hxx> #include <xmloff/txtprmap.hxx> #include <xmloff/xmlexp.hxx> @@ -74,10 +75,10 @@ class ODBExport : public SvXMLExport css::uno::Type Type; css::uno::Any Value; - TypedPropertyValue( const OUString& _name, const css::uno::Type& _type, const css::uno::Any& _value ) - :Name( _name ) + TypedPropertyValue( OUString _name, const css::uno::Type& _type, css::uno::Any _value ) + :Name(std::move( _name )) ,Type( _type ) - ,Value( _value ) + ,Value(std::move( _value )) { } }; diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx index 8528f11c8e77..1efff9499511 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx @@ -21,6 +21,7 @@ #include "xmlComponent.hxx" #include "xmlColumn.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" @@ -40,10 +41,10 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport ,const Reference< XFastAttributeList > & _xAttrList ,const Reference< XNameAccess >& _xParentContainer ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName) : + ,OUString _sComponentServiceName) : SvXMLImportContext( rImport ) ,m_sCollectionServiceName(_sCollectionServiceName) - ,m_sComponentServiceName(_sComponentServiceName) + ,m_sComponentServiceName(std::move(_sComponentServiceName)) { OUString sName; for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList )) diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx index 689434822922..91f0aae869db 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx @@ -39,7 +39,7 @@ namespace dbaxml ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & _xAttrList ,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName + ,OUString _sComponentServiceName ); OXMLHierarchyCollection( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index 403486ee5edf..6192c46c4170 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -19,6 +19,7 @@ #include "xmlTable.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" @@ -40,11 +41,11 @@ namespace dbaxml OXMLTable::OXMLTable( ODBFilter& _rImport ,const uno::Reference< XFastAttributeList > & _xAttrList - ,const uno::Reference< css::container::XNameAccess >& _xParentContainer + ,uno::Reference< css::container::XNameAccess > _xParentContainer ,const OUString& _sServiceName ) :SvXMLImportContext( _rImport ) - ,m_xParentContainer(_xParentContainer) + ,m_xParentContainer(std::move(_xParentContainer)) ,m_bApplyFilter(false) ,m_bApplyOrder(false) { diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index cee19ef19e40..9be9feaa023a 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -53,7 +53,7 @@ namespace dbaxml OXMLTable( ODBFilter& rImport ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & _xAttrList - ,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer + ,css::uno::Reference< css::container::XNameAccess > _xParentContainer ,const OUString& _sServiceName ); virtual ~OXMLTable() override; diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 66dd037870c5..e36092e30be4 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -33,6 +33,7 @@ #include <osl/diagnose.h> #include <memory> +#include <utility> namespace sdbtools { @@ -200,9 +201,9 @@ namespace sdbtools PNameValidation m_pSecondary; public: - CombinedNameCheck(const PNameValidation& _pPrimary, const PNameValidation& _pSecondary) - :m_pPrimary( _pPrimary ) - ,m_pSecondary( _pSecondary ) + CombinedNameCheck(PNameValidation _pPrimary, PNameValidation _pSecondary) + :m_pPrimary(std::move( _pPrimary )) + ,m_pSecondary(std::move( _pSecondary )) { OSL_ENSURE( m_pPrimary && m_pSecondary, "CombinedNameCheck::CombinedNameCheck: this will crash!" ); } diff --git a/dbaccess/source/sdbtools/inc/connectiondependent.hxx b/dbaccess/source/sdbtools/inc/connectiondependent.hxx index d315d70187fb..9f424256c61c 100644 --- a/dbaccess/source/sdbtools/inc/connectiondependent.hxx +++ b/dbaccess/source/sdbtools/inc/connectiondependent.hxx @@ -25,6 +25,7 @@ #include <cppuhelper/weakref.hxx> #include <osl/mutex.hxx> +#include <utility> namespace sdbtools { @@ -58,8 +59,8 @@ namespace sdbtools class EntryGuard; protected: - explicit ConnectionDependentComponent( const css::uno::Reference< css::uno::XComponentContext > & _rContext ) - :m_aContext( _rContext ) + explicit ConnectionDependentComponent( css::uno::Reference< css::uno::XComponentContext > _xContext ) + :m_aContext(std::move( _xContext )) { } diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index bf92f2400a31..065ed6128edd 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -33,6 +33,7 @@ #include <tools/diagnose_ex.h> #include <dbaccess/dataview.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -93,9 +94,9 @@ namespace dbaui { } - SubComponentDescriptor( const OUString& i_rName, const sal_Int32 i_nComponentType, + SubComponentDescriptor( OUString i_sName, const sal_Int32 i_nComponentType, const ElementOpenMode i_eOpenMode, const Reference< XComponent >& i_rComponent ) - :sName( i_rName ) + :sName(std::move( i_sName )) ,nComponentType( i_nComponentType ) ,eOpenMode( i_eOpenMode ) { @@ -168,9 +169,9 @@ namespace dbaui struct SubComponentMatch { public: - SubComponentMatch( const OUString& i_rName, const sal_Int32 i_nComponentType, + SubComponentMatch( OUString i_sName, const sal_Int32 i_nComponentType, const ElementOpenMode i_eOpenMode ) - :m_sName( i_rName ) + :m_sName(std::move( i_sName )) ,m_nComponentType( i_nComponentType ) ,m_eOpenMode( i_eOpenMode ) { @@ -192,9 +193,9 @@ namespace dbaui // SubComponentManager_Data struct SubComponentManager_Data { - SubComponentManager_Data( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex ) + SubComponentManager_Data( OApplicationController& _rController, ::comphelper::SharedMutex _aMutex ) :m_rController( _rController ) - ,m_aMutex( _rMutex ) + ,m_aMutex(std::move( _aMutex )) { } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index b993fac9754f..1356aedb1a2c 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -88,6 +88,7 @@ #include <tools/multisel.hxx> #include <tools/urlobj.hxx> #include <unotools/confignode.hxx> +#include <utility> #include <vcl/split.hxx> #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> @@ -1037,7 +1038,7 @@ namespace struct FilterByEntryDataId : public IEntryFilter { OUString sId; - explicit FilterByEntryDataId( const OUString& _rId ) : sId( _rId ) { } + explicit FilterByEntryDataId( OUString _aId ) : sId(std::move( _aId )) { } virtual ~FilterByEntryDataId() {} diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 472171142368..1dd94c35ee4f 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -36,6 +36,7 @@ #include <toolkit/awt/vclxmenu.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <svx/dbaobjectex.hxx> +#include <utility> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> #include <vcl/svapp.hxx> @@ -300,8 +301,8 @@ namespace class SelectionSupplier : public SelectionSupplier_Base { public: - explicit SelectionSupplier( const Any& _rSelection ) - :m_aSelection( _rSelection ) + explicit SelectionSupplier( Any _aSelection ) + :m_aSelection(std::move( _aSelection )) { } diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 2e02fda505e0..56fd5f6f5b93 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -42,6 +42,7 @@ #include <ucbhelper/commandenvironment.hxx> #include <ucbhelper/content.hxx> #include <connectivity/dbexception.hxx> +#include <utility> namespace dbaui { @@ -58,10 +59,10 @@ using namespace comphelper; OCollectionView::OCollectionView(weld::Window* pParent, const Reference< XContent>& _xContent, const OUString& _sDefaultName, - const css::uno::Reference< css::uno::XComponentContext >& _rxContext) + css::uno::Reference< css::uno::XComponentContext > _xContext) : GenericDialogController(pParent, "dbaccess/ui/collectionviewdialog.ui", "CollectionView") , m_xContent(_xContent) - , m_xContext(_rxContext) + , m_xContext(std::move(_xContext)) , m_bCreateForm(true) , m_xFTCurrentPath(m_xBuilder->weld_label("currentPathLabel")) , m_xNewFolder(m_xBuilder->weld_button("newFolderButton")) diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 89f74ab72b97..061486e91201 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -29,6 +29,7 @@ #include <ucbhelper/content.hxx> #include <svl/filenotation.hxx> #include <rtl/strbuf.hxx> +#include <utility> namespace dbaui { @@ -39,9 +40,9 @@ using namespace ::svt; constexpr OStringLiteral aGroupIdent("dBase III"); -ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const OUString& aDataSrcName) +ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, OUString aDataSrcName) : GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog") - , m_aDSN(aDataSrcName) + , m_aDSN(std::move(aDataSrcName)) , m_xPB_OK(m_xBuilder->weld_button("ok")) , m_xCB_Tables(m_xBuilder->weld_combo_box("table")) , m_xIndexes(m_xBuilder->weld_widget("frame")) diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index 53b75640e6f4..0db7ea7b04a6 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -19,6 +19,7 @@ #pragma once +#include <utility> #include <vcl/weld.hxx> #include <deque> @@ -34,7 +35,7 @@ private: public: OTableIndex() { } - explicit OTableIndex( const OUString& rFileName ) : aIndexFileName( rFileName ) { } + explicit OTableIndex( OUString aFileName ) : aIndexFileName(std::move( aFileName )) { } const OUString& GetIndexFileName() const { return aIndexFileName; } }; @@ -53,7 +54,7 @@ private: TableIndexList aIndexList; public: - explicit OTableInfo( const OUString& rName ) : aTableName(rName) { } + explicit OTableInfo( OUString aName ) : aTableName(std::move(aName)) { } void WriteInfFile( const OUString& rDSN ) const; }; @@ -101,7 +102,7 @@ protected: void checkButtons(); public: - ODbaseIndexDialog(weld::Window * pParent, const OUString& rDataSrcName); + ODbaseIndexDialog(weld::Window * pParent, OUString aDataSrcName); virtual ~ODbaseIndexDialog() override; }; diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index f687740dd696..bf794ac3892c 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -63,6 +63,7 @@ #include <tools/diagnose_ex.h> #include <osl/diagnose.h> #include <connectivity/DriversConfig.hxx> +#include <utility> namespace dbaui { @@ -858,7 +859,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument() OAsynchronousLink m_aAsyncCaller; public: - AsyncLoader( const Reference< XComponentContext >& _rxORB, const OUString& _rURL ); + AsyncLoader( const Reference< XComponentContext >& _xORB, OUString _aURL ); void doLoadAsync(); @@ -872,8 +873,8 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument() DECL_LINK( OnOpenDocument, void*, void ); }; - AsyncLoader::AsyncLoader( const Reference< XComponentContext >& _rxORB, const OUString& _rURL ) - :m_sURL( _rURL ) + AsyncLoader::AsyncLoader( const Reference< XComponentContext >& _rxORB, OUString _aURL ) + :m_sURL(std::move( _aURL )) ,m_aAsyncCaller( LINK( this, AsyncLoader, OnOpenDocument ) ) { try diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index ce5d16881f1d..18c8a1512cb6 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -27,6 +27,7 @@ #include <SqlNameEdit.hxx> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <objectnamecheck.hxx> +#include <utility> #include <tools/diagnose_ex.h> using namespace dbaui; @@ -64,11 +65,11 @@ public: OSaveAsDlgImpl( weld::Builder* pParent, sal_Int32 _rType, const css::uno::Reference< css::sdbc::XConnection>& _xConnection, - const OUString& rDefault, + OUString sDefault, const IObjectNameCheck& _rObjectNameCheck, SADFlags _nFlags); OSaveAsDlgImpl( weld::Builder* pParent, - const OUString& rDefault, + OUString sDefault, const IObjectNameCheck& _rObjectNameCheck, SADFlags _nFlags); }; @@ -86,12 +87,12 @@ IMPL_LINK(OSaveAsDlgImpl, TextFilterHdl, OUString&, rTest, bool) OSaveAsDlgImpl::OSaveAsDlgImpl(weld::Builder* pBuilder, sal_Int32 _rType, const Reference< XConnection>& _xConnection, - const OUString& rDefault, + OUString sDefault, const IObjectNameCheck& _rObjectNameCheck, SADFlags _nFlags) : m_aQryLabel(DBA_RES(STR_QRY_LABEL)) , m_sTblLabel(DBA_RES(STR_TBL_LABEL)) - , m_aName(rDefault) + , m_aName(std::move(sDefault)) , m_rObjectNameCheck( _rObjectNameCheck ) , m_nType(_rType) , m_nFlags(_nFlags) @@ -120,12 +121,12 @@ OSaveAsDlgImpl::OSaveAsDlgImpl(weld::Builder* pBuilder, } OSaveAsDlgImpl::OSaveAsDlgImpl(weld::Builder* pBuilder, - const OUString& rDefault, + OUString sDefault, const IObjectNameCheck& _rObjectNameCheck, SADFlags _nFlags) : m_aQryLabel(DBA_RES(STR_QRY_LABEL)) , m_sTblLabel(DBA_RES(STR_TBL_LABEL)) - , m_aName(rDefault) + , m_aName(std::move(sDefault)) , m_rObjectNameCheck( _rObjectNameCheck ) , m_nType(CommandType::COMMAND) , m_nFlags(_nFlags) diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 5809b7bd7088..f2a11bfc9b24 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -25,6 +25,7 @@ #include <dsitems.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/docfilt.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <svl/stritem.hxx> @@ -76,7 +77,7 @@ namespace dbaui OUString eType; OUString sDisplayName; - DisplayedType( const OUString& _eType, const OUString& _rDisplayName ) : eType( _eType ), sDisplayName( _rDisplayName ) { } + DisplayedType( OUString _eType, OUString _sDisplayName ) : eType(std::move( _eType )), sDisplayName(std::move( _sDisplayName )) { } }; typedef std::vector< DisplayedType > DisplayedTypes; diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index eacc5908328d..81fa5100d0ef 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -22,6 +22,7 @@ #include <strings.hrc> #include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdb/SQLContext.hpp> +#include <utility> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -50,8 +51,8 @@ namespace OUString m_defaultImageID; public: - explicit ImageProvider(const OUString& defaultImageID) - : m_defaultImageID(defaultImageID) + explicit ImageProvider(OUString defaultImageID) + : m_defaultImageID(std::move(defaultImageID)) { } @@ -555,9 +556,9 @@ void OSQLMessageBox::Construct(weld::Window* pParent, MessBoxStyle _nStyle, Mess impl_addDetailsButton(); } -OSQLMessageBox::OSQLMessageBox(weld::Window* pParent, const SQLExceptionInfo& rException, MessBoxStyle nStyle, const OUString& rHelpURL) +OSQLMessageBox::OSQLMessageBox(weld::Window* pParent, const SQLExceptionInfo& rException, MessBoxStyle nStyle, OUString sHelpURL) : m_pImpl(new SQLMessageBox_Impl(rException)) - , m_sHelpURL(rHelpURL) + , m_sHelpURL(std::move(sHelpURL)) { Construct(pParent, nStyle, AUTO); } diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx index c80e98f5e858..c49a5fd4fc14 100644 --- a/dbaccess/source/ui/inc/CollectionView.hxx +++ b/dbaccess/source/ui/inc/CollectionView.hxx @@ -55,7 +55,7 @@ namespace dbaui OCollectionView(weld::Window * pParent, const css::uno::Reference< css::ucb::XContent>& _xContent, const OUString& _sDefaultName, - const css::uno::Reference< css::uno::XComponentContext >& _rxContext); + css::uno::Reference< css::uno::XComponentContext > _xContext); virtual ~OCollectionView() override; const css::uno::Reference< css::ucb::XContent>& getSelectedFolder() const { return m_xContent;} OUString getName() const; diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx index 954c7e02d3a3..360395f94b6e 100644 --- a/dbaccess/source/ui/inc/ConnectionLine.hxx +++ b/dbaccess/source/ui/inc/ConnectionLine.hxx @@ -45,7 +45,7 @@ namespace dbaui Point m_aSourceDescrLinePos, m_aDestDescrLinePos; public: - OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef const & pLineData ); + OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef pLineData ); OConnectionLine( const OConnectionLine& rLine ); ~OConnectionLine(); diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx index 10ad0bfddfd9..2a41c93d9aab 100644 --- a/dbaccess/source/ui/inc/ConnectionLineData.hxx +++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx @@ -48,7 +48,7 @@ namespace dbaui virtual ~OConnectionLineData() override; public: OConnectionLineData(); - OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName ); + OConnectionLineData( OUString sSourceFieldName, OUString sDestFieldName ); OConnectionLineData( const OConnectionLineData& rConnLineData ); // provide a copy of own instance (this is somehow more acceptable for me compared to a virtual assignment operator void CopyFrom(const OConnectionLineData& rSource); diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx index 257b18ebbfdb..5b613608830a 100644 --- a/dbaccess/source/ui/inc/SqlNameEdit.hxx +++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx @@ -19,6 +19,7 @@ #pragma once #include <svtools/editbrowsebox.hxx> +#include <utility> #include <vcl/weld.hxx> namespace dbaui @@ -28,8 +29,8 @@ namespace dbaui OUString m_sAllowedChars; bool m_bCheck; // true when we should check for invalid chars public: - OSQLNameChecker(const OUString& _rAllowedChars) - :m_sAllowedChars(_rAllowedChars) + OSQLNameChecker(OUString _sAllowedChars) + :m_sAllowedChars(std::move(_sAllowedChars)) ,m_bCheck(true) { } diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx index 3c6ce0fdf76c..a38aa1fe030b 100644 --- a/dbaccess/source/ui/inc/TableConnection.hxx +++ b/dbaccess/source/ui/inc/TableConnection.hxx @@ -47,7 +47,7 @@ namespace dbaui void clearLineData(); public: - OTableConnection( OJoinTableView* pContainer, const TTableConnectionData::value_type& pTabConnData ); + OTableConnection( OJoinTableView* pContainer, TTableConnectionData::value_type aTabConnData ); OTableConnection( const OTableConnection& rConn ); /** destructor diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx index 38de2289458f..096a6de70ad3 100644 --- a/dbaccess/source/ui/inc/TableConnectionData.hxx +++ b/dbaccess/source/ui/inc/TableConnectionData.hxx @@ -47,8 +47,8 @@ namespace dbaui OTableConnectionData& operator=( const OTableConnectionData& rConnData ); public: OTableConnectionData(); - OTableConnectionData( const TTableWindowData::value_type& _pReferencingTable, - const TTableWindowData::value_type& _pReferencedTable ); + OTableConnectionData( TTableWindowData::value_type _aReferencingTable, + TTableWindowData::value_type _aReferencedTable ); OTableConnectionData( const OTableConnectionData& rConnData ); virtual ~OTableConnectionData(); diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index c3bed06c75b8..2ccf236d0c98 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -112,7 +112,7 @@ namespace dbaui */ void impl_updateImage(); - OTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData ); + OTableWindow( vcl::Window* pParent, TTableWindowData::value_type aTabWinData ); public: virtual ~OTableWindow() override; diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx index f7aea00b9713..33fb4a958100 100644 --- a/dbaccess/source/ui/inc/TableWindowData.hxx +++ b/dbaccess/source/ui/inc/TableWindowData.hxx @@ -51,9 +51,9 @@ namespace dbaui public: explicit OTableWindowData( const css::uno::Reference< css::beans::XPropertySet>& _xTable - ,const OUString& _rComposedName - ,const OUString& strTableName - ,const OUString& rWinName ); + ,OUString _sComposedName + ,OUString strTableName + ,OUString sWinName ); virtual ~OTableWindowData() override; /** late constructor diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index 82e36240fc29..b82bd71a5feb 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -83,7 +83,7 @@ namespace dbaui const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF); // import data - ODatabaseImportExport( const SharedConnection& _rxConnection, + ODatabaseImportExport( SharedConnection _xConnection, const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF, const css::uno::Reference< css::uno::XComponentContext >& _rM); diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index 6133112835af..d3c0672f8e0b 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -183,7 +183,7 @@ namespace dbaui public: NamedTableCopySource( const css::uno::Reference< css::sdbc::XConnection >& _rxConnection, - const OUString& _rTableName + OUString _sTableName ); // ICopyTableSourceObject overridables @@ -309,7 +309,7 @@ namespace dbaui // used for importing rtf/html sources OCopyTableWizard( weld::Window* pParent, - const OUString& _rDefaultName, + OUString _sDefaultName, sal_Int16 _nOperation, ODatabaseExport::TColumns&& _rDestColumns, const ODatabaseExport::TColumnVector& _rSourceColVec, diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx index ed1f88d7beab..4d4454e010d1 100644 --- a/dbaccess/source/ui/inc/charsets.hxx +++ b/dbaccess/source/ui/inc/charsets.hxx @@ -72,7 +72,7 @@ namespace dbaui const OUString& getDisplayName() const { return m_sDisplayName; } private: - CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName); + CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, OUString _sDisplayName); }; //- OCharsetDisplay::ExtendedCharsetIterator @@ -97,7 +97,7 @@ namespace dbaui const ExtendedCharsetIterator& operator++(); protected: - ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition ); + ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, base_iterator _aPosition ); }; } // namespace dbaui diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx index d6b23878a8f0..46df99181627 100644 --- a/dbaccess/source/ui/inc/databaseobjectview.hxx +++ b/dbaccess/source/ui/inc/databaseobjectview.hxx @@ -91,7 +91,7 @@ namespace dbaui const css::uno::Reference< css::uno::XComponentContext >& _rxORB, const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >& _rxApplication, const css::uno::Reference< css::frame::XFrame >& _rxParentFrame, - const OUString& _rComponentURL + OUString _sComponentURL ); virtual ~DatabaseObjectView(){} diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx index 541c49607c90..56f7bf2f067b 100644 --- a/dbaccess/source/ui/inc/datasourceconnector.hxx +++ b/dbaccess/source/ui/inc/datasourceconnector.hxx @@ -48,7 +48,7 @@ namespace dbaui ODatasourceConnector( const css::uno::Reference< css::uno::XComponentContext >& _rxContext, weld::Window* _pMessageParent, - const OUString& _rContextInformation + OUString _sContextInformation ); /// returns <TRUE/> if the object is able to create data source connections diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx index 961b2ea4cddf..c20f3a87ae51 100644 --- a/dbaccess/source/ui/inc/linkeddocuments.hxx +++ b/dbaccess/source/ui/inc/linkeddocuments.hxx @@ -53,7 +53,7 @@ namespace dbaui const css::uno::Reference< css::uno::XComponentContext >& _rxContext, const css::uno::Reference< css::container::XNameAccess >& _rxContainer, const css::uno::Reference< css::sdbc::XConnection>& _xConnection, - const OUString& _sDataSourceName + OUString _sDataSourceName ); ~OLinkedDocumentsAccess(); diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx index a2541dc0fe38..ad6cb25b4d63 100644 --- a/dbaccess/source/ui/inc/sqlmessage.hxx +++ b/dbaccess/source/ui/inc/sqlmessage.hxx @@ -89,7 +89,7 @@ public: weld::Window* pParent, const dbtools::SQLExceptionInfo& _rException, MessBoxStyle _nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk, - const OUString& _rHelpURL = OUString() + OUString _sHelpURL = OUString() ); /** display a database related error message diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 4bb5c26c74a5..093cb8bb6a77 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -34,6 +34,7 @@ #include <comphelper/interfacecontainer2.hxx> #include <cppuhelper/implbase5.hxx> #include "callbacks.hxx" +#include <utility> #include <vcl/transfer.hxx> #include <svx/dataaccessdescriptor.hxx> #include "TableCopyHelper.hxx" @@ -74,7 +75,7 @@ namespace dbaui bool bEnabled; ExternalFeature() : bEnabled( false ) { } - ExternalFeature( const css::util::URL& _rURL ) : aURL( _rURL ), bEnabled( false ) { } + ExternalFeature( css::util::URL _aURL ) : aURL(std::move( _aURL )), bEnabled( false ) { } }; typedef std::map< sal_uInt16, ExternalFeature > ExternalFeaturesMap; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 974337e8a896..9cbf7db7f5d9 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -48,6 +48,7 @@ #include <svtools/htmlout.hxx> #include <sfx2/frmhtmlw.hxx> #include <svl/numuno.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <UITools.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -95,11 +96,11 @@ ODatabaseImportExport::ODatabaseImportExport(const svx::ODataAccessDescriptor& _ } // import data -ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& _rxConnection, +ODatabaseImportExport::ODatabaseImportExport( ::dbtools::SharedConnection _xConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< XComponentContext >& _rM ) :m_bBookmarkSelection( false ) ,m_pStream(nullptr) - ,m_xConnection(_rxConnection) + ,m_xConnection(std::move(_xConnection)) ,m_xFormatter(_rxNumberF) ,m_xContext(_rM) ,m_nCommandType(css::sdb::CommandType::TABLE) diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 64301bccd9c3..cbcf650581f9 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -56,6 +56,7 @@ #include <tools/diagnose_ex.h> #include <algorithm> +#include <utility> using namespace ::dbaui; using namespace ::com::sun::star::uno; @@ -250,10 +251,10 @@ OUString ObjectCopySource::getSelectStatement() const } // NamedTableCopySource -NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxConnection, const OUString& _rTableName ) +NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxConnection, OUString _sTableName ) :m_xConnection( _rxConnection, UNO_SET_THROW ) ,m_xMetaData( _rxConnection->getMetaData(), UNO_SET_THROW ) - ,m_sTableName( _rTableName ) + ,m_sTableName(std::move( _sTableName )) { ::dbtools::qualifiedNameComponents( m_xMetaData, m_sTableName, m_sTableCatalog, m_sTableSchema, m_sTableBareName, ::dbtools::EComposeRule::Complete ); impl_ensureColumnInfo_throw(); @@ -583,7 +584,7 @@ weld::Container* OCopyTableWizard::CreatePageContainer() return pPageContainer; } -OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDefaultName, sal_Int16 _nOperation, +OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, OUString _sDefaultName, sal_Int16 _nOperation, ODatabaseExport::TColumns&& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec, const Reference< XConnection >& _xConnection, const Reference< XNumberFormatter >& _xFormatter, TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream& _rTypeSelectionPageArg, const Reference< XComponentContext >& _rxContext ) @@ -598,7 +599,7 @@ OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDef , m_nPageCount(0) , m_bDeleteSourceColumns(false) , m_bInterConnectionCopy( false ) - , m_sName(_rDefaultName) + , m_sName(std::move(_sDefaultName)) , m_nOperation( _nOperation ) , m_ePressed( WIZARD_NONE ) , m_bCreatePrimaryKeyColumn(false) diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index 546d21cb0859..3cec6284511e 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -23,6 +23,7 @@ #include <strings.hrc> #include <rtl/tencinfo.h> #include <svx/txenctab.hxx> +#include <utility> namespace dbaui { @@ -86,17 +87,17 @@ namespace dbaui { } - CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName) + CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, OUString _sDisplayName) :CharsetDisplayDerefHelper_Base(_rBase) - ,m_sDisplayName(_rDisplayName) + ,m_sDisplayName(std::move(_sDisplayName)) { OSL_ENSURE( !m_sDisplayName.isEmpty(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" ); } // OCharsetDisplay::ExtendedCharsetIterator - OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition ) + OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, base_iterator _aPosition ) :m_pContainer(_pContainer) - ,m_aPosition(_rPosition) + ,m_aPosition(std::move(_aPosition)) { OSL_ENSURE(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!"); } diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index cb4478295d04..32fe0440cb25 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -32,6 +32,7 @@ #include <osl/diagnose.h> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/window.hxx> namespace dbaui @@ -51,11 +52,11 @@ namespace dbaui DatabaseObjectView::DatabaseObjectView( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame, - const OUString& _rComponentURL ) + OUString _sComponentURL ) :m_xORB ( _rxORB ) ,m_xParentFrame ( _rxParentFrame ) ,m_xApplication ( _rxApplication ) - ,m_sComponentURL ( _rComponentURL ) + ,m_sComponentURL (std::move( _sComponentURL )) { OSL_ENSURE( m_xORB.is(), "DatabaseObjectView::DatabaseObjectView: invalid service factory!" ); OSL_ENSURE( m_xApplication.is(), "DatabaseObjectView::DatabaseObjectView: invalid connection!" ); diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx index 49053e569000..b615d516384b 100644 --- a/dbaccess/source/ui/misc/datasourceconnector.cxx +++ b/dbaccess/source/ui/misc/datasourceconnector.cxx @@ -30,6 +30,7 @@ #include <connectivity/dbexception.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> #include <UITools.hxx> +#include <utility> #include <vcl/outdev.hxx> #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> @@ -59,10 +60,10 @@ namespace dbaui } ODatasourceConnector::ODatasourceConnector( const Reference< XComponentContext >& _rxContext, weld::Window* _pMessageParent, - const OUString& _rContextInformation ) + OUString _sContextInformation ) :m_pErrorMessageParent(_pMessageParent) ,m_xContext(_rxContext) - ,m_sContextInformation( _rContextInformation ) + ,m_sContextInformation(std::move( _sContextInformation )) { } diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 286ce63aace2..402bdd7bfa34 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -144,7 +144,7 @@ namespace dbaui class DataSourceMetaData_Impl { public: - explicit DataSourceMetaData_Impl(const OUString& rURL); + explicit DataSourceMetaData_Impl(OUString sURL); const OUString& getType() const { return m_sURL; } @@ -152,8 +152,8 @@ namespace dbaui const OUString m_sURL; }; - DataSourceMetaData_Impl::DataSourceMetaData_Impl( const OUString& _sURL ) - :m_sURL( _sURL ) + DataSourceMetaData_Impl::DataSourceMetaData_Impl( OUString _sURL ) + :m_sURL(std::move( _sURL )) { } diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx index 192331ced226..ce0acbd7cb2a 100644 --- a/dbaccess/source/ui/misc/linkeddocuments.cxx +++ b/dbaccess/source/ui/misc/linkeddocuments.cxx @@ -38,6 +38,7 @@ #include <browserids.hxx> #include <com/sun/star/container/XHierarchicalNameContainer.hpp> #include <comphelper/mimeconfighelper.hxx> +#include <utility> #include <vcl/weld.hxx> #include <cppuhelper/exc_hlp.hxx> @@ -88,13 +89,13 @@ namespace dbaui // OLinkedDocumentsAccess OLinkedDocumentsAccess::OLinkedDocumentsAccess( weld::Window* pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI, const Reference< XComponentContext >& _rxContext, const Reference< XNameAccess >& _rxContainer, - const Reference< XConnection>& _xConnection, const OUString& _sDataSourceName ) + const Reference< XConnection>& _xConnection, OUString _sDataSourceName ) :m_xContext(_rxContext) ,m_xDocumentContainer(_rxContainer) ,m_xConnection(_xConnection) ,m_xDocumentUI( i_rDocumentUI ) ,m_pDialogParent(pDialogParent) - ,m_sDataSourceName(_sDataSourceName) + ,m_sDataSourceName(std::move(_sDataSourceName)) { OSL_ENSURE(m_xContext.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid service factory!"); assert(m_pDialogParent && "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!"); diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 77a67004e995..b22a05424df3 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -22,6 +22,7 @@ #include <TableWindow.hxx> #include <TableWindowListBox.hxx> #include <TableConnection.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <math.h> #include <osl/diagnose.h> @@ -121,9 +122,9 @@ namespace } } -OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataRef const & _pLineData ) +OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataRef _pLineData ) : m_pTabConn( _pConn ) - , m_pData( _pLineData ) + , m_pData(std::move( _pLineData )) { } diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx index db7177294e64..8267cc3ed8c2 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx @@ -18,15 +18,16 @@ */ #include <ConnectionLineData.hxx> +#include <utility> using namespace dbaui; OConnectionLineData::OConnectionLineData() { } -OConnectionLineData::OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName ) - :m_aSourceFieldName( rSourceFieldName ) - ,m_aDestFieldName( rDestFieldName ) +OConnectionLineData::OConnectionLineData( OUString sSourceFieldName, OUString sDestFieldName ) + :m_aSourceFieldName(std::move( sSourceFieldName )) + ,m_aDestFieldName(std::move( sDestFieldName )) { } diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index ada4b5990890..2bfceb1b6c69 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -21,6 +21,7 @@ #include <ConnectionLine.hxx> #include <TableConnectionData.hxx> #include <JoinTableView.hxx> +#include <utility> using namespace dbaui; using namespace comphelper; @@ -29,9 +30,9 @@ using namespace ::com::sun::star::accessibility; namespace dbaui { - OTableConnection::OTableConnection( OJoinTableView* _pContainer,const TTableConnectionData::value_type& _pTabConnData ) + OTableConnection::OTableConnection( OJoinTableView* _pContainer, TTableConnectionData::value_type _aTabConnData ) :Window(_pContainer) - ,m_pData( _pTabConnData ) + ,m_pData(std::move( _aTabConnData )) ,m_pParent( _pContainer ) ,m_bSelected( false ) { diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index 107d8a9d1a48..aa524a5ac7f9 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -18,6 +18,7 @@ */ #include <TableConnectionData.hxx> +#include <utility> #include <osl/diagnose.h> using namespace dbaui; @@ -27,10 +28,10 @@ OTableConnectionData::OTableConnectionData() Init(); } -OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _pReferencingTable - ,const TTableWindowData::value_type& _pReferencedTable ) - :m_pReferencingTable(_pReferencingTable) - ,m_pReferencedTable(_pReferencedTable) +OTableConnectionData::OTableConnectionData(TTableWindowData::value_type _pReferencingTable + ,TTableWindowData::value_type _pReferencedTable ) + :m_pReferencingTable(std::move(_pReferencingTable)) + ,m_pReferencedTable(std::move(_pReferencedTable)) { Init(); } diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index b8afc951d2d8..24793a92fb45 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -25,6 +25,7 @@ #include <JoinTableView.hxx> #include <JoinDesignView.hxx> #include <osl/diagnose.h> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/commandevent.hxx> @@ -86,11 +87,11 @@ void Draw3DBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR } -OTableWindow::OTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData ) +OTableWindow::OTableWindow( vcl::Window* pParent, TTableWindowData::value_type pTabWinData ) : ::comphelper::OContainerListener(m_aMutex) , Window( pParent, WB_3DLOOK|WB_MOVEABLE ) , m_xTitle( VclPtr<OTableWindowTitle>::Create(this) ) - , m_pData( pTabWinData ) + , m_pData(std::move( pTabWinData )) , m_nMoveCount(0) , m_nMoveIncrement(1) , m_nSizingFlags( SizingFlags::NONE ) diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx index d07c8214a17c..3cbead6e406c 100644 --- a/dbaccess/source/ui/querydesign/TableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/lang/XComponent.hpp> +#include <utility> using namespace dbaui; using namespace ::com::sun::star::lang; @@ -37,13 +38,13 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable - ,const OUString& _rComposedName - ,const OUString& rTableName - ,const OUString& rWinName ) + ,OUString _sComposedName + ,OUString sTableName + ,OUString sWinName ) :m_xTable(_xTable) - ,m_aTableName( rTableName ) - ,m_aWinName( rWinName ) - ,m_sComposedName(_rComposedName) + ,m_aTableName(std::move( sTableName )) + ,m_aWinName(std::move( sWinName )) + ,m_sComposedName(std::move(_sComposedName)) ,m_aPosition( Point(-1,-1) ) ,m_aSize( Size(-1,-1) ) ,m_bShowAll( true ) diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 230cb7f6eac8..677c44787e07 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -64,6 +64,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> +#include <utility> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -1381,8 +1382,8 @@ struct CommentStrip { OUString maComment; bool mbLastOnLine; - CommentStrip( const OUString& rComment, bool bLastOnLine ) - : maComment( rComment), mbLastOnLine( bLastOnLine) {} + CommentStrip( OUString sComment, bool bLastOnLine ) + : maComment(std::move( sComment)), mbLastOnLine( bLastOnLine) {} }; } diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index d60756a2e697..3769e5fd08cb 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -25,6 +25,7 @@ #include <TableDesignView.hxx> #include <FieldDescriptions.hxx> #include <svx/svxids.hrc> +#include <utility> using namespace dbaui; using namespace ::svt; @@ -116,11 +117,11 @@ OTableEditorUndoAct::~OTableEditorUndoAct() { } -OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ) +OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, TOTypeInfoSP _pOldType ) :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) - ,m_pOldType( _pOldType ) + ,m_pOldType(std::move( _pOldType )) { } diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index 5ad23b84fb0f..1863555f7556 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -78,7 +78,7 @@ namespace dbaui virtual void Undo() override; virtual void Redo() override; public: - OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ); + OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, TOTypeInfoSP _pOldType ); virtual ~OTableEditorTypeSelUndoAct() override; }; |