User: hr      
Date: 06/06/19 18:33:37

Modified:
 /dba/connectivity/source/drivers/jdbc/
  Clob.cxx

Log:
 INTEGRATION: CWS warnings01 (1.7.30); FILE MERGED
 2005/11/21 10:07:46 fs 1.7.30.2: #i57457# warning-free code on unx*
 2005/11/16 12:59:10 fs 1.7.30.1: #i57457# warning free code

File Changes:

Directory: /dba/connectivity/source/drivers/jdbc/
=================================================

File [changed]: Clob.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/jdbc/Clob.cxx?r1=1.7&r2=1.8
Delta lines:  +21 -32
---------------------
--- Clob.cxx    8 Sep 2005 06:08:55 -0000       1.7
+++ Clob.cxx    20 Jun 2006 01:33:35 -0000      1.8
@@ -42,6 +42,9 @@
 #ifndef _CONNECTIVITY_JAVA_IO_READER_HXX_
 #include "java/io/Reader.hxx"
 #endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
 using namespace connectivity;
 //**************************************************************
 //************ Class: java.sql.Clob
@@ -88,8 +91,8 @@
        if( t.pEnv )
        {
                // temporaere Variable initialisieren
-               static char * cSignature = "()J";
-               static char * cMethodName = "length";
+               static const char * cSignature = "()J";
+               static const char * cMethodName = "length";
                // Java-Call absetzen
                static jmethodID mID = NULL;
                if ( !mID  )
@@ -103,20 +106,20 @@
        return (sal_Int64)out;
 }
 
-::rtl::OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 
length ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
+::rtl::OUString SAL_CALL java_sql_Clob::getSubString( sal_Int64 pos, sal_Int32 
subStringLength ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
 {
     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
        ::rtl::OUString aStr;
        if( t.pEnv ){
                // temporaere Variable initialisieren
-               static char * cSignature = "(JI)Ljava/lang/String;";
-               static char * cMethodName = "getSubString";
+               static const char * cSignature = "(JI)Ljava/lang/String;";
+               static const char * cMethodName = "getSubString";
                // Java-Call absetzen
                static jmethodID mID = NULL;
                if ( !mID  )
                        mID  = t.pEnv->GetMethodID( getMyClass(), cMethodName, 
cSignature );OSL_ENSURE(mID,"Unknown method id!");
                if( mID ){
-                       jstring out = (jstring)t.pEnv->CallObjectMethod( 
object, mID,pos,length);
+                       jstring out = (jstring)t.pEnv->CallObjectMethod( 
object, mID,pos,subStringLength);
                        ThrowSQLException(t.pEnv,*this);
                        aStr = JavaString2String(t.pEnv,out);
                        // und aufraeumen
@@ -132,8 +135,8 @@
     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
        if( t.pEnv ){
                // temporaere Variable initialisieren
-               static char * cSignature = "()Ljava/io/Reader;";
-               static char * cMethodName = "getCharacterStream";
+               static const char * cSignature = "()Ljava/io/Reader;";
+               static const char * cMethodName = "getCharacterStream";
                // Java-Call absetzen
                static jmethodID mID = NULL;
                if ( !mID  )
@@ -157,8 +160,8 @@
                // Parameter konvertieren
                args[0].l = convertwchar_tToJavaString(t.pEnv,searchstr);
                // temporaere Variable initialisieren
-               static char * cSignature = "(Ljava/lang/String;I)J";
-               static char * cMethodName = "position";
+               static const char * cSignature = "(Ljava/lang/String;I)J";
+               static const char * cMethodName = "position";
                // Java-Call absetzen
                static jmethodID mID = NULL;
                if ( !mID  )
@@ -173,29 +176,15 @@
        return (sal_Int64)out;
 }
 
-sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& pattern, 
sal_Int64 start ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
+sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& /*pattern*/, 
sal_Int64 /*start*/ ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
 {
-       jlong out(0);
-    SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-       if( t.pEnv )
-       {
-               jvalue args[1];
-               // Parameter konvertieren
-               args[0].l = 0;
-               // temporaere Variable initialisieren
-               static char * cSignature = "(Ljava/sql/Clob;I)J";
-               static char * cMethodName = "positionOfClob";
-               // Java-Call absetzen
-               static jmethodID mID = NULL;
-               if ( !mID  )
-                       mID  = t.pEnv->GetMethodID( getMyClass(), cMethodName, 
cSignature );OSL_ENSURE(mID,"Unknown method id!");
-               if( mID ){
-                       out = t.pEnv->CallLongMethod( object, 
mID,args[0].l,start );
-                       ThrowSQLException(t.pEnv,*this);
-                       // und aufraeumen
-               } //mID
-       } //t.pEnv
-       return (sal_Int64)out;
+    ::dbtools::throwFeatureNotImplementedException( "XClob::positionOfClob", 
*this );
+    // this was put here in CWS warnings01. The previous implementation was 
defective, as it did ignore
+    // the pattern parameter. Since the effort for proper implementation is 
rather high - we would need
+    // to translated patter into a byte[] -, we defer this functionality for 
the moment (hey, it was
+    // unusable, anyway)
+    // 2005-11-15 / #i57457# / [EMAIL PROTECTED]
+    return 0;
 }
 
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to