Kaydet (Commit) 70d9ae23 authored tarafından Julien Nabet's avatar Julien Nabet

Use vector and replace m_aBatchList by m_aBatchVector

Change-Id: I7c2c529eb78679f9733374bf0785773684c728c4
Reviewed-on: https://gerrit.libreoffice.org/41770Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 39c6112b
......@@ -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 + ";";
......
......@@ -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;
......
......@@ -671,7 +671,7 @@ void SAL_CALL OPreparedStatement::clearBatch( )
{
::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::clearBatch", *this );
// clearParameters( );
// m_aBatchList.erase();
// m_aBatchVector.erase();
}
......
......@@ -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 += ";";
......
......@@ -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
......
......@@ -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
......
......@@ -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()
......
......@@ -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
......
......@@ -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)
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment