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:
@@ -339,7 +339,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql )
|
|||||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||||
|
|
||||||
|
|
||||||
m_aBatchList.push_back(sql);
|
m_aBatchVector.push_back(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
||||||
@@ -352,7 +352,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
|||||||
|
|
||||||
OUString aBatchSql;
|
OUString aBatchSql;
|
||||||
sal_Int32 nLen = 0;
|
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 + ";";
|
aBatchSql = aBatchSql + *i + ";";
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "MacabConnection.hxx"
|
#include "MacabConnection.hxx"
|
||||||
#include "MacabHeader.hxx"
|
#include "MacabHeader.hxx"
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include <connectivity/sqliterator.hxx>
|
#include <connectivity/sqliterator.hxx>
|
||||||
#include <connectivity/sqlparse.hxx>
|
#include <connectivity/sqlparse.hxx>
|
||||||
#include <com/sun/star/sdbc/XStatement.hpp>
|
#include <com/sun/star/sdbc/XStatement.hpp>
|
||||||
@@ -54,7 +54,7 @@ namespace connectivity
|
|||||||
css::sdbc::SQLWarning m_aLastWarning;
|
css::sdbc::SQLWarning m_aLastWarning;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::list< OUString> m_aBatchList;
|
std::vector< OUString> m_aBatchVector;
|
||||||
connectivity::OSQLParser m_aParser;
|
connectivity::OSQLParser m_aParser;
|
||||||
connectivity::OSQLParseTreeIterator m_aSQLIterator;
|
connectivity::OSQLParseTreeIterator m_aSQLIterator;
|
||||||
connectivity::OSQLParseNode* m_pParseTree;
|
connectivity::OSQLParseNode* m_pParseTree;
|
||||||
|
@@ -671,7 +671,7 @@ void SAL_CALL OPreparedStatement::clearBatch( )
|
|||||||
{
|
{
|
||||||
::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::clearBatch", *this );
|
::dbtools::throwFunctionNotSupportedSQLException( "XPreparedBatchExecution::clearBatch", *this );
|
||||||
// clearParameters( );
|
// clearParameters( );
|
||||||
// m_aBatchList.erase();
|
// m_aBatchVector.erase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -474,7 +474,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql )
|
|||||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||||
|
|
||||||
|
|
||||||
m_aBatchList.push_back(sql);
|
m_aBatchVector.push_back(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
||||||
@@ -485,7 +485,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
|
|||||||
|
|
||||||
OString aBatchSql;
|
OString aBatchSql;
|
||||||
sal_Int32 nLen = 0;
|
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 += OUStringToOString(*i,getOwnConnection()->getTextEncoding());
|
||||||
aBatchSql += ";";
|
aBatchSql += ";";
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <comphelper/proparrhlp.hxx>
|
#include <comphelper/proparrhlp.hxx>
|
||||||
#include <comphelper/uno3.hxx>
|
#include <comphelper/uno3.hxx>
|
||||||
#include "ado/AConnection.hxx"
|
#include "ado/AConnection.hxx"
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include "ado/Awrapado.hxx"
|
#include "ado/Awrapado.hxx"
|
||||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ namespace connectivity
|
|||||||
css::sdbc::SQLWarning m_aLastWarning;
|
css::sdbc::SQLWarning m_aLastWarning;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::list< OUString> m_aBatchList;
|
std::vector< OUString> m_aBatchVector;
|
||||||
|
|
||||||
css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
|
css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
|
||||||
// for this Statement
|
// for this Statement
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include "odbc/OFunctions.hxx"
|
#include "odbc/OFunctions.hxx"
|
||||||
#include "odbc/OConnection.hxx"
|
#include "odbc/OConnection.hxx"
|
||||||
#include "odbc/odbcbasedllapi.hxx"
|
#include "odbc/odbcbasedllapi.hxx"
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||||
|
|
||||||
namespace connectivity
|
namespace connectivity
|
||||||
@@ -68,7 +68,7 @@ namespace connectivity
|
|||||||
css::uno::Reference< css::sdbc::XStatement> m_xGeneratedStatement;
|
css::uno::Reference< css::sdbc::XStatement> m_xGeneratedStatement;
|
||||||
// for this Statement
|
// for this Statement
|
||||||
|
|
||||||
std::list< OUString> m_aBatchList;
|
std::vector< OUString> m_aBatchVector;
|
||||||
OUString m_sSqlStatement;
|
OUString m_sSqlStatement;
|
||||||
|
|
||||||
rtl::Reference<OConnection> m_pConnection;// The owning Connection object
|
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);
|
MutexGuard aGuard(m_aMutex);
|
||||||
checkDisposed(rBHelper.bDisposed);
|
checkDisposed(rBHelper.bDisposed);
|
||||||
|
|
||||||
m_aBatchList.push_back(sql);
|
m_aBatchVector.push_back(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch()
|
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch()
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include <cppconn/statement.h>
|
#include <cppconn/statement.h>
|
||||||
#include <cppuhelper/compbase5.hxx>
|
#include <cppuhelper/compbase5.hxx>
|
||||||
#include <list>
|
#include <vector>
|
||||||
|
|
||||||
namespace connectivity
|
namespace connectivity
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,7 @@ namespace connectivity
|
|||||||
SQLWarning m_aLastWarning;
|
SQLWarning m_aLastWarning;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
::std::list< rtl::OUString> m_aBatchList;
|
::std::vector< rtl::OUString> m_aBatchVector;
|
||||||
|
|
||||||
OConnection* m_pConnection; // The owning Connection object
|
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);
|
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)
|
Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, RuntimeException)
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
#include <com/sun/star/util/XCancellable.hpp>
|
#include <com/sun/star/util/XCancellable.hpp>
|
||||||
#include <cppuhelper/compbase5.hxx>
|
#include <cppuhelper/compbase5.hxx>
|
||||||
#include "SConnection.hxx"
|
#include "SConnection.hxx"
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include "OSubComponent.hxx"
|
#include "OSubComponent.hxx"
|
||||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
#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
|
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
|
||||||
// for this Statement
|
// for this Statement
|
||||||
|
|
||||||
::std::list< ::rtl::OUString> m_aBatchList;
|
::std::vector< ::rtl::OUString> m_aBatchVector;
|
||||||
|
|
||||||
OConnection* m_pConnection; // The owning Connection object
|
OConnection* m_pConnection; // The owning Connection object
|
||||||
protected:
|
protected:
|
||||||
|
Reference in New Issue
Block a user