Use vector and replace m_aBatchList by m_aBatchVector

Change-Id: I7c2c529eb78679f9733374bf0785773684c728c4
Reviewed-on: https://gerrit.libreoffice.org/41770
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2017-08-31 20:32:58 +02:00
parent 39c6112b5b
commit 70d9ae239b
10 changed files with 17 additions and 17 deletions

View File

@@ -339,7 +339,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql )
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
m_aBatchList.push_back(sql);
m_aBatchVector.push_back(sql);
}
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
@@ -352,7 +352,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
OUString aBatchSql;
sal_Int32 nLen = 0;
for(std::list< OUString>::const_iterator i=m_aBatchList.begin();i != m_aBatchList.end();++i,++nLen)
for(std::vector< OUString>::const_iterator i=m_aBatchVector.begin();i != m_aBatchVector.end();++i,++nLen)
aBatchSql = aBatchSql + *i + ";";

View File

@@ -22,7 +22,7 @@
#include "MacabConnection.hxx"
#include "MacabHeader.hxx"
#include <list>
#include <vector>
#include <connectivity/sqliterator.hxx>
#include <connectivity/sqlparse.hxx>
#include <com/sun/star/sdbc/XStatement.hpp>
@@ -54,7 +54,7 @@ namespace connectivity
css::sdbc::SQLWarning m_aLastWarning;
protected:
std::list< OUString> m_aBatchList;
std::vector< OUString> m_aBatchVector;
connectivity::OSQLParser m_aParser;
connectivity::OSQLParseTreeIterator m_aSQLIterator;
connectivity::OSQLParseNode* m_pParseTree;

View File

@@ -671,7 +671,7 @@ void SAL_CALL OPreparedStatement::clearBatch( )
{
::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::clearBatch", *this );
// clearParameters( );
// m_aBatchList.erase();
// m_aBatchVector.erase();
}

View File

@@ -474,7 +474,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql )
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
m_aBatchList.push_back(sql);
m_aBatchVector.push_back(sql);
}
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
@@ -485,7 +485,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
OString aBatchSql;
sal_Int32 nLen = 0;
for(std::list< OUString>::const_iterator i=m_aBatchList.begin();i != m_aBatchList.end();++i,++nLen)
for(std::vector< OUString>::const_iterator i=m_aBatchVector.begin();i != m_aBatchVector.end();++i,++nLen)
{
aBatchSql += OUStringToOString(*i,getOwnConnection()->getTextEncoding());
aBatchSql += ";";

View File

@@ -32,7 +32,7 @@
#include <comphelper/proparrhlp.hxx>
#include <comphelper/uno3.hxx>
#include "ado/AConnection.hxx"
#include <list>
#include <vector>
#include "ado/Awrapado.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -62,7 +62,7 @@ namespace connectivity
css::sdbc::SQLWarning m_aLastWarning;
protected:
std::list< OUString> m_aBatchList;
std::vector< OUString> m_aBatchVector;
css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
// for this Statement

View File

@@ -36,7 +36,7 @@
#include "odbc/OFunctions.hxx"
#include "odbc/OConnection.hxx"
#include "odbc/odbcbasedllapi.hxx"
#include <list>
#include <vector>
#include <com/sun/star/lang/XServiceInfo.hpp>
namespace connectivity
@@ -68,7 +68,7 @@ namespace connectivity
css::uno::Reference< css::sdbc::XStatement> m_xGeneratedStatement;
// for this Statement
std::list< OUString> m_aBatchList;
std::vector< OUString> m_aBatchVector;
OUString m_sSqlStatement;
rtl::Reference<OConnection> m_pConnection;// The owning Connection object

View File

@@ -192,7 +192,7 @@ void SAL_CALL OStatement::addBatch(const rtl::OUString& sql)
MutexGuard aGuard(m_aMutex);
checkDisposed(rBHelper.bDisposed);
m_aBatchList.push_back(sql);
m_aBatchVector.push_back(sql);
}
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch()

View File

@@ -34,7 +34,7 @@
#include <cppconn/statement.h>
#include <cppuhelper/compbase5.hxx>
#include <list>
#include <vector>
namespace connectivity
{
@@ -71,7 +71,7 @@ namespace connectivity
SQLWarning m_aLastWarning;
protected:
::std::list< rtl::OUString> m_aBatchList;
::std::vector< rtl::OUString> m_aBatchVector;
OConnection* m_pConnection; // The owning Connection object

View File

@@ -195,7 +195,7 @@ void SAL_CALL OStatement::addBatch( const ::rtl::OUString& sql ) throw(SQLExcept
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
m_aBatchList.push_back(sql);
m_aBatchVector.push_back(sql);
}
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, RuntimeException)

View File

@@ -45,7 +45,7 @@
#include <com/sun/star/util/XCancellable.hpp>
#include <cppuhelper/compbase5.hxx>
#include "SConnection.hxx"
#include <list>
#include <vector>
#include "OSubComponent.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -72,7 +72,7 @@ namespace connectivity
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
// for this Statement
::std::list< ::rtl::OUString> m_aBatchList;
::std::vector< ::rtl::OUString> m_aBatchVector;
OConnection* m_pConnection; // The owning Connection object
protected: