Kaydet (Commit) d186420a authored tarafından Fridrich Štrba's avatar Fridrich Štrba

Removing the ext_std masterpiece

üst 75d9372d
...@@ -33,13 +33,11 @@ ...@@ -33,13 +33,11 @@
#include "mysqlc_preparedstatement.hxx" #include "mysqlc_preparedstatement.hxx"
#include "mysqlc_general.hxx" #include "mysqlc_general.hxx"
#include <preextstl.h>
#include <cppconn/driver.h> #include <cppconn/driver.h>
#include <cppconn/connection.h> #include <cppconn/connection.h>
#include <cppconn/statement.h> #include <cppconn/statement.h>
#include <cppconn/metadata.h> #include <cppconn/metadata.h>
#include <cppconn/exception.h> #include <cppconn/exception.h>
#include <postextstl.h>
#include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XRow.hpp>
...@@ -186,10 +184,10 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > ...@@ -186,10 +184,10 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
if (bEmbedded == sal_False) { if (bEmbedded == sal_False) {
try { try {
sql::ConnectOptionsMap connProps; sql::ConnectOptionsMap connProps;
ext_std::string host_str = OUStringToOString(aHostName, m_settings.encoding).getStr(); std::string host_str = OUStringToOString(aHostName, m_settings.encoding).getStr();
ext_std::string user_str = OUStringToOString(aUser, m_settings.encoding).getStr(); std::string user_str = OUStringToOString(aUser, m_settings.encoding).getStr();
ext_std::string pass_str = OUStringToOString(aPass, m_settings.encoding).getStr(); std::string pass_str = OUStringToOString(aPass, m_settings.encoding).getStr();
ext_std::string schema_str = OUStringToOString(aDbName, m_settings.encoding).getStr(); std::string schema_str = OUStringToOString(aDbName, m_settings.encoding).getStr();
connProps["hostName"] = sql::ConnectPropertyVal(host_str); connProps["hostName"] = sql::ConnectPropertyVal(host_str);
connProps["userName"] = sql::ConnectPropertyVal(user_str); connProps["userName"] = sql::ConnectPropertyVal(user_str);
connProps["password"] = sql::ConnectPropertyVal(pass_str); connProps["password"] = sql::ConnectPropertyVal(pass_str);
......
...@@ -43,9 +43,8 @@ ...@@ -43,9 +43,8 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp> #include <com/sun/star/util/XStringSubstitution.hpp>
#include <preextstl.h>
#include <cppconn/driver.h> #include <cppconn/driver.h>
#include <postextstl.h>
#include <cppuhelper/compbase3.hxx> #include <cppuhelper/compbase3.hxx>
#include <cppuhelper/weakref.hxx> #include <cppuhelper/weakref.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
......
...@@ -32,9 +32,7 @@ ...@@ -32,9 +32,7 @@
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <preextstl.h>
#include <cppconn/metadata.h> #include <cppconn/metadata.h>
#include <postextstl.h>
namespace connectivity namespace connectivity
{ {
...@@ -62,8 +60,8 @@ namespace connectivity ...@@ -62,8 +60,8 @@ namespace connectivity
bool identifier_quote_string_set; bool identifier_quote_string_set;
private: private:
OUString impl_getStringMetaData( const sal_Char* _methodName, const ext_std::string& (sql::DatabaseMetaData::*_Method)() ); OUString impl_getStringMetaData( const sal_Char* _methodName, const std::string& (sql::DatabaseMetaData::*_Method)() );
OUString impl_getStringMetaData( const sal_Char* _methodName, ext_std::string (sql::DatabaseMetaData::*_Method)() ); OUString impl_getStringMetaData( const sal_Char* _methodName, std::string (sql::DatabaseMetaData::*_Method)() );
OUString impl_getStringMetaData( const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() ); OUString impl_getStringMetaData( const sal_Char* _methodName, const sql::SQLString& (sql::DatabaseMetaData::*_Method)() );
OUString impl_getStringMetaData( const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() ); OUString impl_getStringMetaData( const sal_Char* _methodName, sql::SQLString (sql::DatabaseMetaData::*_Method)() );
sal_Int32 impl_getInt32MetaData( const sal_Char* _methodName, unsigned int (sql::DatabaseMetaData::*_Method)() ); sal_Int32 impl_getInt32MetaData( const sal_Char* _methodName, unsigned int (sql::DatabaseMetaData::*_Method)() );
......
...@@ -35,12 +35,10 @@ using namespace connectivity::mysqlc; ...@@ -35,12 +35,10 @@ using namespace connectivity::mysqlc;
using ::rtl::OUString; using ::rtl::OUString;
#include <stdio.h> #include <stdio.h>
#include <preextstl.h>
#include <cppconn/exception.h> #include <cppconn/exception.h>
#ifdef SYSTEM_MYSQL_CPPCONN #ifdef SYSTEM_MYSQL_CPPCONN
#include <mysql_driver.h> #include <mysql_driver.h>
#endif #endif
#include <postextstl.h>
/* {{{ MysqlCDriver::MysqlCDriver() -I- */ /* {{{ MysqlCDriver::MysqlCDriver() -I- */
......
...@@ -33,9 +33,7 @@ ...@@ -33,9 +33,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/compbase2.hxx> #include <cppuhelper/compbase2.hxx>
#include <preextstl.h>
#include <cppconn/driver.h> #include <cppconn/driver.h>
#include <postextstl.h>
#include <osl/module.h> #include <osl/module.h>
namespace connectivity namespace connectivity
......
...@@ -159,14 +159,14 @@ int mysqlToOOOType(int cppConnType) ...@@ -159,14 +159,14 @@ int mysqlToOOOType(int cppConnType)
} }
::rtl::OUString convert(const ::ext_std::string& _string, const rtl_TextEncoding encoding) ::rtl::OUString convert(const ::std::string& _string, const rtl_TextEncoding encoding)
{ {
return ::rtl::OUString( _string.c_str(), _string.size(), encoding ); return ::rtl::OUString( _string.c_str(), _string.size(), encoding );
} }
::ext_std::string convert(const ::rtl::OUString& _string, const rtl_TextEncoding encoding) ::std::string convert(const ::rtl::OUString& _string, const rtl_TextEncoding encoding)
{ {
return ::ext_std::string( ::rtl::OUStringToOString( _string, encoding ).getStr() ); return ::std::string( ::rtl::OUStringToOString( _string, encoding ).getStr() );
} }
......
...@@ -30,9 +30,7 @@ ...@@ -30,9 +30,7 @@
#include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdbc/SQLException.hpp>
#include <preextstl.h>
#include <cppconn/exception.h> #include <cppconn/exception.h>
#include <postextstl.h>
namespace mysqlc_sdbc_driver namespace mysqlc_sdbc_driver
{ {
...@@ -57,9 +55,9 @@ namespace mysqlc_sdbc_driver ...@@ -57,9 +55,9 @@ namespace mysqlc_sdbc_driver
int mysqlToOOOType(int mysqlType) throw (); int mysqlToOOOType(int mysqlType) throw ();
::rtl::OUString convert(const ::ext_std::string& _string, const rtl_TextEncoding encoding); ::rtl::OUString convert(const ::std::string& _string, const rtl_TextEncoding encoding);
::ext_std::string convert(const ::rtl::OUString& _string, const rtl_TextEncoding encoding); ::std::string convert(const ::rtl::OUString& _string, const rtl_TextEncoding encoding);
} }
#endif #endif
......
...@@ -231,7 +231,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 parameter, const OUString& ...@@ -231,7 +231,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 parameter, const OUString&
checkParameterIndex(parameter); checkParameterIndex(parameter);
try { try {
ext_std::string stringie(::rtl::OUStringToOString(x, m_pConnection->getConnectionEncoding()).getStr()); std::string stringie(::rtl::OUStringToOString(x, m_pConnection->getConnectionEncoding()).getStr());
((sql::PreparedStatement *)cppStatement)->setString(parameter, stringie); ((sql::PreparedStatement *)cppStatement)->setString(parameter, stringie);
} catch (sql::MethodNotImplementedException) { } catch (sql::MethodNotImplementedException) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::clearParameters", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::clearParameters", *this);
...@@ -341,7 +341,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData ...@@ -341,7 +341,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
ext_std::string dateStr; std::string dateStr;
char buf[20]; char buf[20];
dateStr.append(my_i_to_a(buf, sizeof(buf)-1, aData.Year)); dateStr.append(my_i_to_a(buf, sizeof(buf)-1, aData.Year));
dateStr.append("-", 1); dateStr.append("-", 1);
...@@ -369,7 +369,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal) ...@@ -369,7 +369,7 @@ void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal)
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
ext_std::string timeStr; std::string timeStr;
char buf[20]; char buf[20];
timeStr.append(my_i_to_a(buf, sizeof(buf)-1, aVal.Hours)); timeStr.append(my_i_to_a(buf, sizeof(buf)-1, aVal.Hours));
timeStr.append(":", 1); timeStr.append(":", 1);
...@@ -397,7 +397,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi ...@@ -397,7 +397,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 parameter, const DateTi
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
ext_std::string timeStr; std::string timeStr;
char buf[20]; char buf[20];
timeStr.append(my_i_to_a(buf, sizeof(buf)-1, aVal.Year)); timeStr.append(my_i_to_a(buf, sizeof(buf)-1, aVal.Year));
timeStr.append("-", 1); timeStr.append("-", 1);
...@@ -802,7 +802,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence< ...@@ -802,7 +802,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 parameter, const Sequence<
checkDisposed(OPreparedStatement::rBHelper.bDisposed); checkDisposed(OPreparedStatement::rBHelper.bDisposed);
checkParameterIndex(parameter); checkParameterIndex(parameter);
ext_std::string blobby((char *)x.getConstArray(), x.getLength()); std::string blobby((char *)x.getConstArray(), x.getLength());
try { try {
((sql::PreparedStatement *)cppStatement)->setString(parameter, blobby); ((sql::PreparedStatement *)cppStatement)->setString(parameter, blobby);
} catch (sql::MethodNotImplementedException) { } catch (sql::MethodNotImplementedException) {
......
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
#include <com/sun/star/sdbc/XPreparedBatchExecution.hpp> #include <com/sun/star/sdbc/XPreparedBatchExecution.hpp>
#include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XInputStream.hpp>
#include <preextstl.h>
#include <cppconn/prepared_statement.h> #include <cppconn/prepared_statement.h>
#include <postextstl.h>
namespace connectivity namespace connectivity
{ {
......
...@@ -32,9 +32,7 @@ ...@@ -32,9 +32,7 @@
#include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <com/sun/star/sdbc/XResultSetMetaData.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <preextstl.h>
#include <cppconn/resultset_metadata.h> #include <cppconn/resultset_metadata.h>
#include <postextstl.h>
namespace connectivity namespace connectivity
{ {
...@@ -61,7 +59,7 @@ namespace connectivity ...@@ -61,7 +59,7 @@ namespace connectivity
{ {
} }
inline ::rtl::OUString convert( const ::ext_std::string& _string ) const inline ::rtl::OUString convert( const ::std::string& _string ) const
{ {
return ::rtl::OUString( _string.c_str(), _string.size(), m_encoding ); return ::rtl::OUString( _string.c_str(), _string.size(), m_encoding );
} }
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
#include <com/sun/star/sdbc/XWarningsSupplier.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/util/XCancellable.hpp> #include <com/sun/star/util/XCancellable.hpp>
#include <preextstl.h>
#include <cppconn/statement.h> #include <cppconn/statement.h>
#include <postextstl.h>
#include <cppuhelper/compbase5.hxx> #include <cppuhelper/compbase5.hxx>
#include <list> #include <list>
......
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