summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 10:45:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-11 12:18:34 +0200
commitc7f8a54e05dab430cf2f5b3e1fa90e729c7a5601 (patch)
tree2eae61ce10ffb555fffa2a09b76738a013c40028
parent2938f0956744e03ba0cc27a5b3fb1637811b267a (diff)
loplugin:moveparam in dbaccess
Change-Id: Iff4c5069d25dddd58d61b2a09a57a112854144da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx10
-rw-r--r--dbaccess/source/core/api/HelperCollections.hxx4
-rw-r--r--dbaccess/source/core/api/KeySet.cxx2
-rw-r--r--dbaccess/source/core/api/PrivateRow.hxx2
-rw-r--r--dbaccess/source/core/api/RowSet.cxx10
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx4
-rw-r--r--dbaccess/source/core/api/RowSetBase.hxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/columndef.cxx4
-rw-r--r--dbaccess/source/filter/hsqldb/columndef.hxx2
-rw-r--r--dbaccess/source/filter/hsqldb/createparser.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/rowinputbinary.cxx5
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx4
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx8
-rw-r--r--dbaccess/source/ui/inc/DExport.hxx2
-rw-r--r--dbaccess/source/ui/inc/HtmlReader.hxx2
-rw-r--r--dbaccess/source/ui/inc/RtfReader.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableRowExchange.hxx2
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx2
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx6
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx4
-rw-r--r--dbaccess/source/ui/misc/RtfReader.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx4
-rw-r--r--dbaccess/source/ui/misc/WExtendPages.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx6
31 files changed, 58 insertions, 59 deletions
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 4d4d367838a1..2e383596f12f 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -168,7 +168,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
_io_tableInfo.sType = OptionalString( sTypeName );
}
- static ::std::vector< OUString> lcl_filter( const TableInfos& _unfilteredTables,
+ static ::std::vector< OUString> lcl_filter( TableInfos&& _unfilteredTables,
const Sequence< OUString >& _tableFilter, const Sequence< OUString >& _tableTypeFilter,
const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
{
@@ -179,7 +179,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0] == "%" );
if( dontFilterTableNames )
{
- aFilteredTables = _unfilteredTables;
+ aFilteredTables = std::move(_unfilteredTables);
}
else
{
@@ -189,7 +189,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
Sequence< OUString > aNonWildCardTableFilter = _tableFilter;
nTableFilterCount = createWildCardVector( aNonWildCardTableFilter, aWildCardTableFilter );
- TableInfos aUnfilteredTables( _unfilteredTables );
+ TableInfos aUnfilteredTables( std::move(_unfilteredTables) );
aUnfilteredTables.reserve( nTableFilterCount + ( aWildCardTableFilter.size() * 10 ) );
for (auto & unfilteredTable : aUnfilteredTables)
@@ -277,7 +277,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
for ( ; name != nameEnd; ++name )
aUnfilteredTables.emplace_back( *name );
- reFill( lcl_filter( aUnfilteredTables,
+ reFill( lcl_filter( std::move(aUnfilteredTables),
_rTableFilter, _rTableTypeFilter, m_xMetaData, m_xMasterContainer ) );
m_bConstructed = true;
@@ -359,7 +359,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::
aUnfilteredTables.emplace_back( sCatalog, sSchema, sName, sType );
}
- reFill( lcl_filter( aUnfilteredTables,
+ reFill( lcl_filter( std::move(aUnfilteredTables),
_rTableFilter, aTableTypeFilter, m_xMetaData, nullptr ) );
disposeComponent( xTables );
diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx
index 18cf9d15ef93..ed89fc643054 100644
--- a/dbaccess/source/core/api/HelperCollections.hxx
+++ b/dbaccess/source/core/api/HelperCollections.hxx
@@ -87,9 +87,9 @@ namespace dbaccess
bool _bCase,
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
- const std::vector< OUString> &_rVector
+ std::vector< OUString> && _rVector
) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector)
- ,m_aTables(_rTables)
+ ,m_aTables(std::move(_rTables))
{
}
virtual void disposing() override
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 8999ded1e3c7..ffca2cb08662 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -782,7 +782,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
}
if ( !bRefetch )
{
- m_aKeyIter->second.second.second = new OPrivateRow(*_rInsertRow);
+ m_aKeyIter->second.second.second = new OPrivateRow(std::vector(*_rInsertRow));
}
}
diff --git a/dbaccess/source/core/api/PrivateRow.hxx b/dbaccess/source/core/api/PrivateRow.hxx
index a9bf9e70e0ea..c5ce74f15f43 100644
--- a/dbaccess/source/core/api/PrivateRow.hxx
+++ b/dbaccess/source/core/api/PrivateRow.hxx
@@ -29,7 +29,7 @@ namespace dbaccess
ORowSetValueVector::Vector m_aRow;
sal_Int32 m_nPos;
public:
- explicit OPrivateRow(const ORowSetValueVector::Vector& i_aRow) : m_aRow(i_aRow),m_nPos(0)
+ explicit OPrivateRow(ORowSetValueVector::Vector&& i_aRow) : m_aRow(std::move(i_aRow)),m_nPos(0)
{
}
virtual sal_Bool SAL_CALL wasNull( ) override;
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 6a5af36e205e..4e66304cd367 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -661,7 +661,7 @@ void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
checkUpdateIterator();
ORowSetValueVector::Vector& rRow = **m_aCurrentRow;
- ORowSetNotifier aNotify(this,rRow);
+ ORowSetNotifier aNotify(this, std::vector(rRow));
m_pCache->updateValue(columnIndex,x,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
@@ -677,7 +677,7 @@ void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex )
checkUpdateIterator();
ORowSetValueVector::Vector& rRow = **m_aCurrentRow;
- ORowSetNotifier aNotify(this,rRow);
+ ORowSetNotifier aNotify(this, std::vector(rRow));
m_pCache->updateNull(columnIndex,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
@@ -765,7 +765,7 @@ void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Refer
checkUpdateConditions(columnIndex);
checkUpdateIterator();
ORowSetValueVector::Vector& rRow = **m_aCurrentRow;
- ORowSetNotifier aNotify(this,rRow);
+ ORowSetNotifier aNotify(this, std::vector(rRow));
m_pCache->updateCharacterStream(columnIndex,x,length,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
@@ -809,7 +809,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x )
if (!::dbtools::implUpdateObject(this, columnIndex, aNewValue))
{ // there is no other updateXXX call which can handle the value in x
ORowSetValueVector::Vector& rRow = **m_aCurrentRow;
- ORowSetNotifier aNotify(this,rRow);
+ ORowSetNotifier aNotify(this, std::vector(rRow));
m_pCache->updateObject(columnIndex,aNewValue,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
@@ -823,7 +823,7 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x,
checkUpdateConditions(columnIndex);
checkUpdateIterator();
ORowSetValueVector::Vector& rRow = **m_aCurrentRow;
- ORowSetNotifier aNotify(this,rRow);
+ ORowSetNotifier aNotify(this, std::vector(rRow));
m_pCache->updateNumericObject(columnIndex,x,rRow,aNotify.getChangedColumns());
m_bModified = m_bModified || !aNotify.getChangedColumns().empty();
aNotify.firePropertyChange();
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 4eabb3eb0bee..d1feea15ae59 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1382,7 +1382,7 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet )
m_pRowSet->doCancelModification( ORowSetBase::GrantNotifierAccess() );
}
-ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector::Vector& i_aRow )
+ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet, ORowSetValueVector::Vector&& i_aRow )
:m_pImpl(new ORowSetNotifierImpl)
,m_pRowSet( _pRowSet )
,m_bWasNew( false )
@@ -1390,7 +1390,7 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector
{
OSL_ENSURE( m_pRowSet, "ORowSetNotifier::ORowSetNotifier: invalid row set. This will crash." );
- m_pImpl->aRow = i_aRow; // yes, create a copy to store the old values
+ m_pImpl->aRow = std::move(i_aRow); // yes, create a copy to store the old values
}
ORowSetNotifier::~ORowSetNotifier( )
diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx
index 58087a85bb14..f5443a2afcad 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -367,7 +367,7 @@ namespace dbaccess
/** use this one to construct a vector for change value notification
*/
- ORowSetNotifier( ORowSetBase* m_pRowSet,const ORowSetValueVector::Vector& i_aRow );
+ ORowSetNotifier( ORowSetBase* m_pRowSet, ORowSetValueVector::Vector&& i_aRow );
// destructs the object. <member>fire</member> has to be called before.
~ORowSetNotifier( );
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 38ff97293a99..31455e055727 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -717,7 +717,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables( )
for (auto const& elem : aTables)
aNames.push_back(elem.first);
- m_pTables.reset( new OPrivateTables(aTables,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames) );
+ m_pTables.reset( new OPrivateTables(aTables,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,std::move(aNames)) );
}
return m_pTables.get();
diff --git a/dbaccess/source/filter/hsqldb/columndef.cxx b/dbaccess/source/filter/hsqldb/columndef.cxx
index 62bd7b541bf1..5a7b741089e2 100644
--- a/dbaccess/source/filter/hsqldb/columndef.cxx
+++ b/dbaccess/source/filter/hsqldb/columndef.cxx
@@ -26,12 +26,12 @@ namespace dbahsql
using namespace css::sdbc;
ColumnDefinition::ColumnDefinition(const OUString& sName, sal_Int32 eType,
- const std::vector<sal_Int32>& aParams, bool bPrimary,
+ std::vector<sal_Int32>&& aParams, bool bPrimary,
sal_Int32 nAutoIncr, bool bNullable, bool bCaseInsensitive,
const OUString& sDefault)
: m_sName(sName)
, m_eType(eType)
- , m_aParams(aParams)
+ , m_aParams(std::move(aParams))
, m_bPrimaryKey(bPrimary)
, m_nAutoIncrement(nAutoIncr)
, m_bNullable(bNullable)
diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx b/dbaccess/source/filter/hsqldb/columndef.hxx
index faad744c554e..5ffa18ba574b 100644
--- a/dbaccess/source/filter/hsqldb/columndef.hxx
+++ b/dbaccess/source/filter/hsqldb/columndef.hxx
@@ -28,7 +28,7 @@ private:
OUString m_sDefaultValue;
public:
- ColumnDefinition(const OUString& sName, sal_Int32 eType, const std::vector<sal_Int32>& aParams,
+ ColumnDefinition(const 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{});
diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx
index 9aad116535fb..de1213945151 100644
--- a/dbaccess/source/filter/hsqldb/createparser.cxx
+++ b/dbaccess/source/filter/hsqldb/createparser.cxx
@@ -256,7 +256,7 @@ void CreateStmtParser::parseColumnPart(const OUString& sColumnPart)
const OUString sColumnWithoutName = sColumn.copy(sColumn.indexOf(typeParts.typeName));
ColumnDefinition aColDef(rColumnName, lcl_getDataTypeFromHsql(typeParts.typeName),
- typeParts.params, isPrimaryKey,
+ std::move(typeParts.params), isPrimaryKey,
lcl_getAutoIncrementDefault(sColumnWithoutName),
lcl_isNullable(sColumnWithoutName), bCaseInsensitive,
lcl_getDefaultValue(sColumnWithoutName));
diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
index 5ded17936c38..cfbef28a2b11 100644
--- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
+++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
@@ -90,9 +90,8 @@ OUString lcl_double_dabble(const std::vector<sal_uInt8>& bytes)
RTL_TEXTENCODING_UTF8);
}
-OUString lcl_makeStringFromBigint(const std::vector<sal_uInt8>& bytes)
+OUString lcl_makeStringFromBigint(std::vector<sal_uInt8>&& aBytes)
{
- std::vector<sal_uInt8> aBytes{ bytes };
OUStringBuffer sRet;
// two's complement
@@ -311,7 +310,7 @@ std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefiniti
m_pStream->ReadInt32(nScale);
Sequence<Any> result(2);
- OUString sNum = lcl_makeStringFromBigint(aBytes);
+ OUString sNum = lcl_makeStringFromBigint(std::move(aBytes));
result[0] <<= lcl_putDot(sNum, nScale);
result[1] <<= nScale;
aData.push_back(makeAny(result));
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index dfa9bf355187..cbe866cf5be4 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -641,7 +641,7 @@ namespace dbaui
m_xUnique->set_sensitive(!aSelectedIndex->bPrimaryKey);
m_xUnique->save_state();
- m_xFields->initializeFrom(aSelectedIndex->aFields);
+ m_xFields->initializeFrom(std::vector(aSelectedIndex->aFields));
m_xFields->Enable(!aSelectedIndex->bPrimaryKey);
m_xFields->SaveValue();
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 88cf056dbfc7..3770fb737e1a 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -137,10 +137,10 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
_rDev.SetClipRegion();
}
- void IndexFieldsControl::initializeFrom(const IndexFields& _rFields)
+ void IndexFieldsControl::initializeFrom(IndexFields&& _rFields)
{
// copy the field descriptions
- m_aFields = _rFields;
+ m_aFields = std::move(_rFields);
m_aSeekRow = m_aFields.end();
SetUpdateMode(false);
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index f5610156c6a5..eacc5908328d 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -266,7 +266,7 @@ class OExceptionChainDialog : public weld::GenericDialogController
ExceptionDisplayChain m_aExceptions;
public:
- OExceptionChainDialog(weld::Window* pParent, const ExceptionDisplayChain& rExceptions);
+ OExceptionChainDialog(weld::Window* pParent, ExceptionDisplayChain&& rExceptions);
protected:
DECL_LINK(OnExceptionSelected, weld::TreeView&, void);
@@ -274,11 +274,11 @@ protected:
}
-OExceptionChainDialog::OExceptionChainDialog(weld::Window* pParent, const ExceptionDisplayChain& rExceptions)
+OExceptionChainDialog::OExceptionChainDialog(weld::Window* pParent, ExceptionDisplayChain&& rExceptions)
: GenericDialogController(pParent, "dbaccess/ui/sqlexception.ui", "SQLExceptionDialog")
, m_xExceptionList(m_xBuilder->weld_tree_view("list"))
, m_xExceptionText(m_xBuilder->weld_text_view("description"))
- , m_aExceptions(rExceptions)
+ , m_aExceptions(std::move(rExceptions))
{
int nListWidth = m_xExceptionText->get_approximate_digit_width() * 28;
int nTextWidth = m_xExceptionText->get_approximate_digit_width() * 42;
@@ -581,7 +581,7 @@ OSQLMessageBox::~OSQLMessageBox()
IMPL_LINK_NOARG(OSQLMessageBox, ButtonClickHdl, weld::Button&, void)
{
- OExceptionChainDialog aDlg(m_xDialog.get(), m_pImpl->aDisplayInfo);
+ OExceptionChainDialog aDlg(m_xDialog.get(), std::vector(m_pImpl->aDisplayInfo));
aDlg.run();
}
diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx
index 3e2804a654e0..ab7c85811778 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -137,7 +137,7 @@ namespace dbaui
// required for automatic type recognition
ODatabaseExport(
sal_Int32 nRows,
- const TPositions& _rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx
index 3c1fa88d2d60..5c4ddde13f4e 100644
--- a/dbaccess/source/ui/inc/HtmlReader.hxx
+++ b/dbaccess/source/ui/inc/HtmlReader.hxx
@@ -54,7 +54,7 @@ namespace dbaui
// required for automatic type recognition
OHTMLReader(SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx
index 0bda00b2f5fa..58f6aa26ba2b 100644
--- a/dbaccess/source/ui/inc/RtfReader.hxx
+++ b/dbaccess/source/ui/inc/RtfReader.hxx
@@ -45,7 +45,7 @@ namespace dbaui
// required for automatic type recognition
ORTFReader( SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx
index 729862721d44..36e249795137 100644
--- a/dbaccess/source/ui/inc/TableRowExchange.hxx
+++ b/dbaccess/source/ui/inc/TableRowExchange.hxx
@@ -28,7 +28,7 @@ namespace dbaui
{
std::vector< std::shared_ptr<OTableRow> > m_vTableRow;
public:
- OTableRowExchange(const std::vector< std::shared_ptr<OTableRow> >& _rvTableRow);
+ OTableRowExchange(std::vector< std::shared_ptr<OTableRow> >&& _rvTableRow);
protected:
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 1d650d7a6171..936acfc80c96 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -311,7 +311,7 @@ namespace dbaui
weld::Window* pParent,
const OUString& _rDefaultName,
sal_Int16 _nOperation,
- const ODatabaseExport::TColumns& _rDestColumns,
+ ODatabaseExport::TColumns&& _rDestColumns,
const ODatabaseExport::TColumnVector& _rSourceColVec,
const css::uno::Reference< css::sdbc::XConnection >& _xConnection,
const css::uno::Reference< css::util::XNumberFormatter >& _xFormatter,
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index a973d4c1b495..90ae7172e3df 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -54,7 +54,7 @@ namespace dbaui
void Init(const css::uno::Sequence< OUString >& _rAvailableFields, bool _bAddIndexAppendix);
- void initializeFrom(const IndexFields& _rFields);
+ void initializeFrom(IndexFields&& _rFields);
void commitTo(IndexFields& _rFields);
bool SaveModified() override;
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index adab71f29d8f..e899af729f2f 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -69,14 +69,14 @@ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOper
// ODatabaseExport
ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&&_rColumnPositions,
const Reference< XNumberFormatter >& _rxNumberF,
const Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
bool _bAutoIncrementEnabled,
SvStream& _rInputStream)
- :m_vColumnPositions(_rColumnPositions)
+ :m_vColumnPositions(std::move(_rColumnPositions))
,m_aDestColumns(true)
,m_xFormatter(_rxNumberF)
,m_xContext(_rxContext)
@@ -667,7 +667,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe
nullptr,
sTableName,
bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData,
- m_aDestColumns,
+ ODatabaseExport::TColumns(m_aDestColumns),
m_vDestVector,
m_xConnection,
m_xFormatter,
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 6e3d329e3ef2..56eade49356d 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -64,14 +64,14 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection,
OHTMLReader::OHTMLReader(SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
bool _bAutoIncrementEnabled)
: HTMLParser(rIn)
- , ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
+ , ODatabaseExport( nRows, std::move(_rColumnPositions), _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
, m_nTableCount(0)
, m_nColumnWidth(87)
{
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 1a247ca88b06..8895d494f817 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -57,14 +57,14 @@ ORTFReader::ORTFReader( SvStream& rIn,
ORTFReader::ORTFReader(SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* pList,
const OTypeInfoMap* _pInfoMap,
bool _bAutoIncrementEnabled)
:SvRTFParser(rIn)
- ,ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
+ ,ODatabaseExport( nRows, std::move(_rColumnPositions), _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn )
{
m_bAppendFirstLine = false;
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 56341d35f4f1..b72e16180727 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -583,11 +583,11 @@ weld::Container* OCopyTableWizard::CreatePageContainer()
}
OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDefaultName, sal_Int16 _nOperation,
- const ODatabaseExport::TColumns& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec,
+ ODatabaseExport::TColumns&& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec,
const Reference< XConnection >& _xConnection, const Reference< XNumberFormatter >& _xFormatter,
TypeSelectionPageFactory _pTypeSelectionPageFactory, SvStream& _rTypeSelectionPageArg, const Reference< XComponentContext >& _rxContext )
: vcl::RoadmapWizardMachine(pParent)
- , m_vSourceColumns(_rSourceColumns)
+ , m_vSourceColumns(std::move(_rSourceColumns))
, m_mNameMapping(_xConnection->getMetaData().is() && _xConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers())
, m_xDestConnection( _xConnection )
, m_rSourceObject( DummyCopySource::Instance() )
diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx
index f34661cabd7d..c7eac9181e00 100644
--- a/dbaccess/source/ui/misc/WExtendPages.cxx
+++ b/dbaccess/source/ui/misc/WExtendPages.cxx
@@ -31,7 +31,7 @@ void OWizHTMLExtend::createReaderAndCallParser(sal_Int32 _nRows)
{
tools::SvRef<OHTMLReader> xParser = new OHTMLReader(*m_pParserStream,
_nRows,
- m_pParent->GetColumnPositions(),
+ std::vector(m_pParent->GetColumnPositions()),
m_pParent->GetFormatter(),
m_pParent->GetComponentContext(),
&m_pParent->getDestVector(),
@@ -44,7 +44,7 @@ void OWizRTFExtend::createReaderAndCallParser(sal_Int32 _nRows)
{
tools::SvRef<ORTFReader> xParser = new ORTFReader(*m_pParserStream,
_nRows,
- m_pParent->GetColumnPositions(),
+ std::vector(m_pParent->GetColumnPositions()),
m_pParent->GetFormatter(),
m_pParent->GetComponentContext(),
&m_pParent->getDestVector(),
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 010ce0878c50..728b21cf55d6 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -734,7 +734,7 @@ void OTableEditorCtrl::CopyRows()
}
if(!vClipboardList.empty())
{
- rtl::Reference<OTableRowExchange> pData = new OTableRowExchange(vClipboardList);
+ rtl::Reference<OTableRowExchange> pData = new OTableRowExchange(std::move(vClipboardList));
pData->CopyToClipboard(GetParent());
}
}
@@ -806,7 +806,7 @@ void OTableEditorCtrl::InsertRows( sal_Int32 nRow )
RowInserted( nRow,vInsertedUndoRedoRows.size() );
// Create the Undo-Action
- GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsUndoAct>(this, nRow,vInsertedUndoRedoRows) );
+ GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsUndoAct>(this, nRow, std::move(vInsertedUndoRedoRows)) );
GetView()->getController().setModified( true );
InvalidateFeatures();
}
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index 916b8112f7c5..2728fbdfbe61 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -28,8 +28,8 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
- OTableRowExchange::OTableRowExchange(const std::vector< std::shared_ptr<OTableRow> >& _rvTableRow)
- : m_vTableRow(_rvTableRow)
+ OTableRowExchange::OTableRowExchange(std::vector< std::shared_ptr<OTableRow> >&& _rvTableRow)
+ : m_vTableRow(std::move(_rvTableRow))
{
}
bool OTableRowExchange::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& /*rFlavor*/ )
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 4ef28032795e..d60756a2e697 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -213,9 +213,9 @@ void OTableEditorDelUndoAct::Redo()
OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner,
tools::Long nInsertPosition ,
- const std::vector< std::shared_ptr<OTableRow> >& _vInsertedRows)
+ std::vector< std::shared_ptr<OTableRow> >&& _vInsertedRows)
:OTableEditorUndoAct( pOwner,STR_TABED_UNDO_ROWINSERTED )
- ,m_vInsertedRows(_vInsertedRows)
+ ,m_vInsertedRows(std::move(_vInsertedRows))
,m_nInsPos( nInsertPosition )
{
}
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
index 2bd25f9d6447..5ad23b84fb0f 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.hxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -103,7 +103,7 @@ namespace dbaui
public:
OTableEditorInsUndoAct( OTableEditorCtrl* pOwner,
tools::Long nInsertPosition,
- const std::vector< std::shared_ptr<OTableRow> >& _vInsertedRows);
+ std::vector< std::shared_ptr<OTableRow> >&& _vInsertedRows);
virtual ~OTableEditorInsUndoAct() override;
};
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index a33d0607de83..40443652705b 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -942,11 +942,11 @@ namespace
class ValueTransfer
{
public:
- ValueTransfer( const sal_Int32& _rSourcePos, const sal_Int32& _rDestPos, const std::vector< sal_Int32 >& _rColTypes,
+ ValueTransfer( const sal_Int32& _rSourcePos, const sal_Int32& _rDestPos, std::vector< sal_Int32 >&& _rColTypes,
const Reference< XRow >& _rxSource, const Reference< XParameters >& _rxDest )
:m_rSourcePos( _rSourcePos )
,m_rDestPos( _rDestPos )
- ,m_rColTypes( _rColTypes )
+ ,m_rColTypes( std::move(_rColTypes) )
,m_xSource( _rxSource )
,m_xDest( _rxDest )
{
@@ -1144,7 +1144,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
sal_Int32 nDestColumn( 0 );
sal_Int32 nSourceColumn( 1 );
- ValueTransfer aTransfer( nSourceColumn, nDestColumn, aSourceColTypes, xRow, xStatementParams );
+ ValueTransfer aTransfer( nSourceColumn, nDestColumn, std::vector(aSourceColTypes), xRow, xStatementParams );
for ( auto const& rColumnPos : aColumnPositions )
{