User: hr Date: 05/09/23 04:39:41 Modified: /dba/connectivity/source/drivers/hsqldb/ HStorageAccess.cxx
Log: INTEGRATION: CWS dba201b (1.7.38); FILE MERGED 2005/09/21 08:14:21 oj 1.7.38.2: RESYNC: (1.7-1.8); FILE MERGED 2005/07/11 13:56:39 fs 1.7.38.1: merging CWS dba201a into dba201b File Changes: Directory: /dba/connectivity/source/drivers/hsqldb/ =================================================== File [changed]: HStorageAccess.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HStorageAccess.cxx?r1=1.8&r2=1.9 Delta lines: +24 -24 --------------------- --- HStorageAccess.cxx 8 Sep 2005 06:03:54 -0000 1.8 +++ HStorageAccess.cxx 23 Sep 2005 11:39:38 -0000 1.9 @@ -73,7 +73,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_openStream (JNIEnv * env, jobject obj_this,jstring name, jstring key, jint mode) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile( env, name, "data" ).logOperation( "openStream" ); LogFile( env, name, "data" ).create(); @@ -91,7 +91,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_close (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sName = StorageContainer::jstring2ustring(env,name); @@ -108,7 +108,7 @@ { OSL_ENSURE( false, "NativeStorageAccess::close: caught an exception while flushing!" ); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "close" ); @@ -130,7 +130,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_getFilePointer (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "getFilePointer" ); #endif @@ -139,7 +139,7 @@ OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getPosition() : jlong(0); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nReturn ); #endif return nReturn; @@ -154,7 +154,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_length (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "length" ); #endif @@ -163,7 +163,7 @@ OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getLength() :jlong(0); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG aOpLog.logReturn( nReturn ); #endif return nReturn; @@ -200,7 +200,7 @@ if (tmpInt < 0 ) tmpInt = 256 +tmpInt; -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( tmpInt ); #endif @@ -220,7 +220,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv* env, jobject obj_this, jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "read" ); @@ -235,7 +235,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len, DataLogFile* logger ) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG { ::rtl::OUString sKey = StorageContainer::jstring2ustring(env,key); ::rtl::OUString sName = StorageContainer::jstring2ustring(env,name); @@ -271,7 +271,7 @@ return -1; env->SetByteArrayRegion(buffer,off,nBytesRead,&aData[0]); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( aData.getConstArray(), nBytesRead ); #endif @@ -292,7 +292,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_read__Ljava_lang_String_2Ljava_lang_String_2_3BII (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "read( byte[], int, int )" ); @@ -313,7 +313,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt (JNIEnv * env, jobject obj_this,jstring name, jstring key) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "readInt" ); #endif @@ -358,7 +358,7 @@ return -1; } jint nRet = ((ch[0] << 24) + (ch[1] << 16) + (ch[2] << 8) + (ch[3] << 0)); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG DataLogFile aDataLog( env, name, "data" ); aDataLog.write( nRet ); @@ -381,7 +381,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek (JNIEnv * env, jobject obj_this,jstring name, jstring key, jlong position) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "seek", position ); #endif @@ -392,7 +392,7 @@ OSL_ENSURE(xSeek.is(),"No Seekable stream!"); if ( xSeek.is() ) { - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG DataLogFile aDataLog( env, name, "data" ); #endif @@ -400,7 +400,7 @@ if ( nLen < position) { static ::sal_Int64 BUFFER_SIZE = 9192; - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.seek( nLen ); #endif xSeek->seek(nLen); @@ -424,7 +424,7 @@ Sequence< ::sal_Int8 > aData(n); memset(aData.getArray(),0,n); xOut->writeBytes(aData); - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.write( aData.getConstArray(), n ); #endif } @@ -432,7 +432,7 @@ xSeek->seek(position); OSL_ENSURE(xSeek->getPosition() == position,"Wrong position after seeking the stream"); - #if OSL_DEBUG_LEVEL > 1 + #ifdef HSQLDB_DBG aDataLog.seek( position ); OSL_ENSURE( xSeek->getPosition() == aDataLog.tell(), "Wrong position after seeking the stream" ); #endif @@ -451,7 +451,7 @@ if ( xOut.is() ) { jbyte *buf = env->GetByteArrayElements(buffer,NULL); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OSL_ENSURE(len <= env->GetArrayLength(buffer),"Length is greater than the buffer!"); #endif @@ -466,7 +466,7 @@ Sequence< ::sal_Int8 > aData(buf + off,len); xOut->writeBytes(aData); env->ReleaseByteArrayElements(buffer, buf, JNI_ABORT); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( aData.getConstArray(), len ); #endif @@ -496,7 +496,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write (JNIEnv * env, jobject obj_this,jstring name, jstring key, jbyteArray buffer, jint off, jint len) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "write( byte[], int, int )" ); @@ -524,7 +524,7 @@ oneByte[3] = (sal_Int8) ((v >> 0) & 0xFF); xOut->writeBytes(oneByte); -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG if ( logger ) logger->write( oneByte.getConstArray(), 4 ); #endif @@ -553,7 +553,7 @@ JNIEXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt (JNIEnv * env, jobject obj_this,jstring name, jstring key, jint v) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef HSQLDB_DBG OperationLogFile aOpLog( env, name, "data" ); aOpLog.logOperation( "writeInt" ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
