User: hr Date: 06/06/19 18:36:40 Modified: /dba/connectivity/source/drivers/jdbc/ Statement.cxx
Log: INTEGRATION: CWS warnings01 (1.25.30); FILE MERGED 2006/01/25 20:50:41 sb 1.25.30.4: RESYNC: (1.25-1.26); FILE MERGED 2005/11/21 10:07:49 fs 1.25.30.3: #i57457# warning-free code on unx* 2005/11/16 12:59:11 fs 1.25.30.2: #i57457# warning free code 2005/11/07 14:43:43 fs 1.25.30.1: #i57457# warning-free code File Changes: Directory: /dba/connectivity/source/drivers/jdbc/ ================================================= File [changed]: Statement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/jdbc/Statement.cxx?r1=1.26&r2=1.27 Delta lines: +62 -68 --------------------- --- Statement.cxx 10 Jan 2006 15:45:25 -0000 1.26 +++ Statement.cxx 20 Jun 2006 01:36:38 -0000 1.27 @@ -101,13 +101,13 @@ ,java_lang_Object( pEnv, NULL ) ,OPropertySetHelper(java_sql_Statement_BASE::rBHelper) ,m_pConnection(_pCon) - ,rBHelper(java_sql_Statement_BASE::rBHelper) ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY) ,m_nResultSetType(ResultSetType::FORWARD_ONLY) ,m_nFetchDirection(FetchDirection::FORWARD) ,m_nFetchSize(50) ,m_nMaxFieldSize(0) ,m_nQueryTimeOut(0) + ,rBHelper(java_sql_Statement_BASE::rBHelper) { OSL_ENSURE(m_pConnection, "java_sql_Statement_Base::java_sql_Statement_Base: invalid connection!"); if ( m_pConnection ) @@ -129,8 +129,8 @@ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ // temporaere Variable initialisieren - static char * cSignature = "()V"; - static char * cMethodName = "close"; + static const char * cSignature = "()V"; + static const char * cMethodName = "close"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -203,7 +203,7 @@ Sequence< Type > aOldTypes = java_sql_Statement_BASE::getTypes(); if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() ) { - const Type* pRemoveFrom = ::std::remove(aOldTypes.getArray(),aOldTypes.getArray() + aOldTypes.getLength(), + ::std::remove(aOldTypes.getArray(),aOldTypes.getArray() + aOldTypes.getLength(), ::getCppuType( (const Reference< XGeneratedResultSet > *)0 )); aOldTypes.realloc(aOldTypes.getLength() - 1); } @@ -219,8 +219,8 @@ { createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()Ljava/sql/ResultSet;"; - static char * cMethodName = "getGeneratedKeys"; + static const char * cSignature = "()Ljava/sql/ResultSet;"; + static const char * cMethodName = "getGeneratedKeys"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -263,8 +263,8 @@ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()V"; - static char * cMethodName = "cancel"; + static const char * cSignature = "()V"; + static const char * cMethodName = "cancel"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -295,8 +295,8 @@ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()V"; - static char * cMethodName = "clearBatch"; + static const char * cSignature = "()V"; + static const char * cMethodName = "clearBatch"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -318,8 +318,8 @@ createStatement(t.pEnv); m_sSqlStatement = sql; // temporaere Variable initialisieren - static char * cSignature = "(Ljava/lang/String;)Z"; - static char * cMethodName = "execute"; + static const char * cSignature = "(Ljava/lang/String;)Z"; + static const char * cMethodName = "execute"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -346,8 +346,8 @@ createStatement(t.pEnv); m_sSqlStatement = sql; // temporaere Variable initialisieren - static char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;"; - static char * cMethodName = "executeQuery"; + static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;"; + static const char * cMethodName = "executeQuery"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -385,8 +385,8 @@ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(Ljava/lang/String;)I"; - static char * cMethodName = "addBatch"; + static const char * cSignature = "(Ljava/lang/String;)I"; + static const char * cMethodName = "addBatch"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -410,8 +410,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()[I"; - static char * cMethodName = "executeBatch"; + static const char * cSignature = "()[I"; + static const char * cMethodName = "executeBatch"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -441,8 +441,8 @@ createStatement(t.pEnv); m_sSqlStatement = sql; // temporaere Variable initialisieren - static char * cSignature = "(Ljava/lang/String;)I"; - static char * cMethodName = "executeUpdate"; + static const char * cSignature = "(Ljava/lang/String;)I"; + static const char * cMethodName = "executeUpdate"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -468,8 +468,8 @@ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()Ljava/sql/ResultSet;"; - static char * cMethodName = "getResultSet"; + static const char * cSignature = "()Ljava/sql/ResultSet;"; + static const char * cMethodName = "getResultSet"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -492,8 +492,8 @@ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getUpdateCount"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getUpdateCount"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -515,8 +515,8 @@ { createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()Z"; - static char * cMethodName = "getMoreResults"; + static const char * cSignature = "()Z"; + static const char * cMethodName = "getMoreResults"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -539,8 +539,8 @@ { createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()Ljava/sql/SQLWarning;"; - static char * cMethodName = "getWarnings"; + static const char * cSignature = "()Ljava/sql/SQLWarning;"; + static const char * cMethodName = "getWarnings"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -569,8 +569,8 @@ { createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()V"; - static char * cMethodName = "clearWarnings"; + static const char * cSignature = "()V"; + static const char * cMethodName = "clearWarnings"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -589,8 +589,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getQueryTimeOut"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getQueryTimeOut"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -611,8 +611,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getMaxRows"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getMaxRows"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -632,8 +632,8 @@ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv && object ){ // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getResultSetConcurrency"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getResultSetConcurrency"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -655,8 +655,8 @@ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv && object ){ // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getResultSetType"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getResultSetType"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -679,8 +679,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getFetchDirection"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getFetchDirection"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -701,8 +701,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getFetchSize"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getFetchSize"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -723,8 +723,8 @@ if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()I"; - static char * cMethodName = "getMaxFieldSize"; + static const char * cSignature = "()I"; + static const char * cMethodName = "getMaxFieldSize"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -746,8 +746,8 @@ { createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "()Ljava/lang/String;"; - static char * cMethodName = "getCursorName"; + static const char * cSignature = "()Ljava/lang/String;"; + static const char * cMethodName = "getCursorName"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -765,13 +765,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setQueryTimeOut(sal_Int32 _par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(I)V"; - static char * cMethodName = "setQueryTimeOut"; + static const char * cSignature = "(I)V"; + static const char * cMethodName = "setQueryTimeOut"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -788,13 +787,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(I)V"; - static char * cMethodName = "setMaxRows"; + static const char * cSignature = "(I)V"; + static const char * cMethodName = "setMaxRows"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -843,13 +841,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setFetchDirection(sal_Int32 _par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(I)V"; - static char * cMethodName = "setFetchDirection"; + static const char * cSignature = "(I)V"; + static const char * cMethodName = "setFetchDirection"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -865,13 +862,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(I)V"; - static char * cMethodName = "setFetchSize"; + static const char * cSignature = "(I)V"; + static const char * cMethodName = "setFetchSize"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -887,13 +883,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setMaxFieldSize(sal_Int32 _par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(I)V"; - static char * cMethodName = "setMaxFieldSize"; + static const char * cSignature = "(I)V"; + static const char * cMethodName = "setMaxFieldSize"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -909,13 +904,12 @@ //------------------------------------------------------------------------------ void java_sql_Statement_Base::setCursorName(const ::rtl::OUString &_par0) throw(SQLException, RuntimeException) { - jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv ){ createStatement(t.pEnv); // temporaere Variable initialisieren - static char * cSignature = "(Ljava/lang/String;)V"; - static char * cMethodName = "setCursorName"; + static const char * cSignature = "(Ljava/lang/String;)V"; + static const char * cMethodName = "setCursorName"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) @@ -1109,8 +1103,8 @@ if( _pEnv && !object ){ // temporaere Variable initialisieren - static char * cSignature = "(II)Ljava/sql/Statement;"; - static char * cMethodName = "createStatement"; + static const char * cSignature = "(II)Ljava/sql/Statement;"; + static const char * cMethodName = "createStatement"; // Java-Call absetzen jobject out = NULL; static jmethodID mID = NULL; @@ -1121,8 +1115,8 @@ } //mID else { - static char * cSignature = "()Ljava/sql/Statement;"; - static jmethodID mID2 = _pEnv->GetMethodID( m_pConnection->getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID2,"Unknown method id!"); + static const char * cSignature2 = "()Ljava/sql/Statement;"; + static jmethodID mID2 = _pEnv->GetMethodID( m_pConnection->getMyClass(), cMethodName, cSignature2 );OSL_ENSURE(mID2,"Unknown method id!"); if( mID2 ){ out = _pEnv->CallObjectMethod( m_pConnection->getJavaObject(), mID2); } //mID --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
