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>
This commit is contained in:
Noel Grandin
2021-10-11 12:18:34 +02:00
parent 2938f09567
commit c7f8a54e05
31 changed files with 58 additions and 59 deletions
@@ -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 );
@@ -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
+1 -1
View File
@@ -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));
}
}
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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();
+2 -2
View File
@@ -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( )
+1 -1
View File
@@ -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( );
@@ -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();
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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{});
@@ -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));
@@ -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));
+1 -1
View File
@@ -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();
@@ -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);
+4 -4
View File
@@ -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();
}
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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,
@@ -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;
+3 -3
View File
@@ -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,
+2 -2
View File
@@ -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)
{
+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -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() )
+2 -2
View File
@@ -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(),
@@ -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();
}
@@ -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*/ )
+2 -2
View File
@@ -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 )
{
}
+1 -1
View File
@@ -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;
};
+3 -3
View File
@@ -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 )
{