Tag: cws_src680_dba22b
User: fs      
Date: 2006/12/13 02:42:19

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

Log:
 #i69460# proper support for EscapeProcessing property

File Changes:

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

File [changed]: JStatement.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/jdbc/JStatement.cxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +30 -9
--------------------
--- JStatement.cxx      13 Dec 2006 08:49:25 -0000      1.1.2.1
+++ JStatement.cxx      13 Dec 2006 10:42:16 -0000      1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: JStatement.cxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/12/13 08:49:25 $
+ *  last change: $Author: fs $ $Date: 2006/12/13 10:42:16 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -106,10 +106,7 @@
        ,m_pConnection(_pCon)
        ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY)
        ,m_nResultSetType(ResultSetType::FORWARD_ONLY)
-       ,m_nFetchDirection(FetchDirection::FORWARD)
-       ,m_nFetchSize(50)
-       ,m_nMaxFieldSize(0)
-       ,m_nQueryTimeOut(0)
+    ,m_bEscapeProcessing(sal_True)
     ,rBHelper(java_sql_Statement_BASE::rBHelper)
 {
        OSL_ENSURE(m_pConnection, 
"java_sql_Statement_Base::java_sql_Statement_Base: invalid connection!");
@@ -788,6 +785,27 @@
 }
 
 
//------------------------------------------------------------------------------
+void java_sql_Statement_Base::setEscapeProcessing(sal_Bool _par0) 
throw(SQLException, RuntimeException)
+{
+    SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
+    m_bEscapeProcessing = _par0;
+       if( t.pEnv )
+    {
+               createStatement( t.pEnv );
+               static const char * cSignature = "(Z)V";
+               static const char * cMethodName = "setEscapeProcessing";
+               static jmethodID mID = NULL;
+               if ( !mID  )
+                       mID  = t.pEnv->GetMethodID( getMyClass(), cMethodName, 
cSignature );OSL_ENSURE(mID,"Unknown method id!");
+               if( mID )
+               {
+                       t.pEnv->CallVoidMethod( object, mID,_par0);
+                       isExceptionOccured(t.pEnv,sal_True);
+               }
+       }
+}
+
+//------------------------------------------------------------------------------
 void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, 
RuntimeException)
 {
     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
@@ -982,7 +1000,7 @@
                case PROPERTY_ID_FETCHSIZE:
                        return ::comphelper::tryPropertyValue(rConvertedValue, 
rOldValue, rValue, getFetchSize());
                case PROPERTY_ID_ESCAPEPROCESSING:
-                       //      return 
::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
+                       return ::comphelper::tryPropertyValue(rConvertedValue, 
rOldValue, rValue, m_bEscapeProcessing );
                case PROPERTY_ID_USEBOOKMARKS:
                        //      return 
::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
                default:
@@ -1024,7 +1042,8 @@
                        setFetchSize(comphelper::getINT32(rValue));
                        break;
                case PROPERTY_ID_ESCAPEPROCESSING:
-                       //      return 
::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
+            setEscapeProcessing( ::comphelper::getBOOL( rValue ) );
+            break;
                case PROPERTY_ID_USEBOOKMARKS:
                        //      return 
::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink);
                default:
@@ -1065,6 +1084,8 @@
                        rValue <<= THIS->getFetchSize();
                        break;
                case PROPERTY_ID_ESCAPEPROCESSING:
+            rValue <<= (sal_Bool)m_bEscapeProcessing;
+            break;
                case PROPERTY_ID_USEBOOKMARKS:
                default:
                        ;




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

Reply via email to