summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/jdbc')
-rw-r--r--connectivity/source/drivers/jdbc/Array.cxx54
-rw-r--r--connectivity/source/drivers/jdbc/Blob.cxx27
-rw-r--r--connectivity/source/drivers/jdbc/Boolean.cxx5
-rw-r--r--connectivity/source/drivers/jdbc/CallableStatement.cxx39
-rw-r--r--connectivity/source/drivers/jdbc/Class.cxx8
-rw-r--r--connectivity/source/drivers/jdbc/Clob.cxx22
-rw-r--r--connectivity/source/drivers/jdbc/ConnectionLog.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/ContextClassLoader.cxx3
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx49
-rw-r--r--connectivity/source/drivers/jdbc/Date.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/Exception.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/InputStream.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/JBigDecimal.cxx16
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx25
-rw-r--r--connectivity/source/drivers/jdbc/JDriver.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx30
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx23
-rw-r--r--connectivity/source/drivers/jdbc/PreparedStatement.cxx46
-rw-r--r--connectivity/source/drivers/jdbc/Reader.cxx12
-rw-r--r--connectivity/source/drivers/jdbc/Ref.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx75
-rw-r--r--connectivity/source/drivers/jdbc/ResultSetMetaData.cxx5
-rw-r--r--connectivity/source/drivers/jdbc/SQLException.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/SQLWarning.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/String.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/Throwable.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/Timestamp.cxx45
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/exports.dxp0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/jdbc.component0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/jdbc.mxp.map0
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/jdbc/jdbc.xcu0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/jdbc.xml2
-rw-r--r--connectivity/source/drivers/jdbc/jservices.cxx5
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/makefile.mk2
-rw-r--r--connectivity/source/drivers/jdbc/tools.cxx28
36 files changed, 304 insertions, 273 deletions
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx
index 6178f9ba385b..5e30c0c17ad3 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ java_sql_Array::~java_sql_Array()
jclass java_sql_Array::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, therefore its static
if( !theClass )
theClass = findMyClass("java/sql/Array");
@@ -64,89 +65,80 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL java_sql_Array::getArray( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- jobjectArray out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
{
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
static const char * cSignature = "(Ljava/util/Map;)[Ljava/lang/Object;";
static const char * cMethodName = "getArray";
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Java-Call absetzen
- out = (jobjectArray)t.pEnv->CallObjectMethod( object, mID, obj);
+ // submit Java-Call
+ (jobjectArray)t.pEnv->CallObjectMethod( object, mID, obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(obj);
} //t.pEnv
- return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();//copyArrayAndDelete< ::com::sun::star::uno::Any,jobject>(t.pEnv,out);
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();
}
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL java_sql_Array::getArrayAtIndex( sal_Int32 index, sal_Int32 count, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- jobjectArray out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
{
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
static const char * cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;";
static const char * cMethodName = "getArray";
- // Java-Call absetzen
+ // submit Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- out = (jobjectArray)t.pEnv->CallObjectMethod( object, mID, index,count,obj);
+ (jobjectArray)t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(obj);
- } //t.pEnv
- return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();//copyArrayAndDelete< ::com::sun::star::uno::Any,jobject>(t.pEnv,out);
+ }
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultSet( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSet";
- // Java-Call absetzen
+ // submit Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- out = t.pEnv->CallObjectMethod( object, mID, obj);
+ t.pEnv->CallObjectMethod( object, mID, obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and cleanup
t.pEnv->DeleteLocalRef(obj);
- } //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out );
+ }
return NULL;
}
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultSetAtIndex( sal_Int32 index, sal_Int32 count, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Parameter konvertieren
+ // convert parameter
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSetAtIndex";
// Java-Call absetzen
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- out = t.pEnv->CallObjectMethod( object, mID, index,count,obj);
+ t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and cleanup
t.pEnv->DeleteLocalRef(obj);
- } //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out );
+ }
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx
index cd448754585f..50765fa9cba4 100644
--- a/connectivity/source/drivers/jdbc/Blob.cxx
+++ b/connectivity/source/drivers/jdbc/Blob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,6 @@
#include "java/sql/Blob.hxx"
#include "java/tools.hxx"
#include "java/io/InputStream.hxx"
-#ifndef _INC_MEMORY
-//#include <memory.h>
-#endif
#include <connectivity/dbexception.hxx>
#include <string.h>
@@ -55,7 +53,7 @@ java_sql_Blob::~java_sql_Blob()
jclass java_sql_Blob::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore it's static
if( !theClass )
theClass = findMyClass("java/sql/Blob");
return theClass;
@@ -67,10 +65,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "()J";
static const char * cMethodName = "length";
- // Java-Call absetzen
+ // submit Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
@@ -84,10 +82,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
{
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(JI)[B";
static const char * cMethodName = "getBytes";
- // Java-Call absetzen
+ // submit Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jbyteArray out = (jbyteArray)t.pEnv->CallObjectMethod( object, mID,pos,count);
@@ -100,7 +98,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
t.pEnv->DeleteLocalRef(out);
}
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return aSeq;
}
@@ -109,7 +107,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getBinaryStream","()Ljava/io/InputStream;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
}
@@ -119,13 +117,13 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequenc
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "([BI)J";
static const char * cMethodName = "position";
- // Java-Call absetzen
+ // submit Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jbyteArray pByteArray = t.pEnv->NewByteArray(pattern.getLength());
t.pEnv->SetByteArrayRegion(pByteArray,0,pattern.getLength(),(jbyte*)pattern.getConstArray());
out = t.pEnv->CallLongMethod( object, mID, pByteArray,start );
@@ -142,7 +140,8 @@ sal_Int64 SAL_CALL java_sql_Blob::positionOfBlob( const ::com::sun::star::uno::R
// 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# / frank.schoenheit@sun.com
+ // #i57457#
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx
index fd52f3092c0e..307f6af80883 100644
--- a/connectivity/source/drivers/jdbc/Boolean.cxx
+++ b/connectivity/source/drivers/jdbc/Boolean.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@ java_lang_Boolean::~java_lang_Boolean()
{}
jclass java_lang_Boolean::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/lang/Boolean");
return theClass;
@@ -49,3 +50,5 @@ jclass java_lang_Boolean::getMyClass() const
{
return st_getMyClass();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index a411e0277514..81bb2c9859b3 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,6 @@
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -164,9 +164,9 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
static jmethodID mID(NULL);
- /*jobject out = */callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- return Any(); //out==0 ? 0 : new java_lang_Object( t.pEnv, out );
+ callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex);
+ // WARNING: the caller becomes the owner of the returned pointer
+ return Any();
}
sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException)
@@ -194,7 +194,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
}
@@ -204,7 +204,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
}
@@ -217,13 +217,13 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(IILjava/lang/String;)V";
static const char * cMethodName = "registerOutParameter";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName));
t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -237,10 +237,10 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(III)V";
static const char * cMethodName = "registerOutParameter";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,scale);
@@ -252,7 +252,7 @@ jclass java_sql_CallableStatement::theClass = 0;
jclass java_sql_CallableStatement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/CallableStatement");
return theClass;
@@ -275,7 +275,7 @@ Reference< starsdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
}
@@ -285,7 +285,7 @@ Reference< starsdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_I
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
}
Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException)
@@ -294,7 +294,7 @@ Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_I
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
}
@@ -304,7 +304,7 @@ Reference< starsdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
}
// -----------------------------------------------------------------------------
@@ -326,12 +326,12 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
if( t.pEnv && !object ){
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/CallableStatement;";
static const char * cMethodName = "prepareCall";
- // Java-Call absetzen
+ // execute Java-Call
jobject out = NULL;
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement));
static jmethodID mID(NULL);
@@ -357,3 +357,4 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx
index 02bd9ace59f6..b9c22e7bc955 100644
--- a/connectivity/source/drivers/jdbc/Class.cxx
+++ b/connectivity/source/drivers/jdbc/Class.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,7 @@ java_lang_Class::~java_lang_Class()
jclass java_lang_Class::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/lang/Class");
return theClass;
@@ -57,10 +58,10 @@ java_lang_Class * java_lang_Class::forName( const ::rtl::OUString& _par0 )
{
::rtl::OString sClassName = ::rtl::OUStringToOString(_par0, RTL_TEXTENCODING_JAVA_UTF8);
sClassName = sClassName.replace('.','/');
- out = t.pEnv->FindClass(sClassName);
+ out = t.pEnv->FindClass(sClassName.getStr());
ThrowSQLException(t.pEnv,0);
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? NULL : new java_lang_Class( t.pEnv, out );
}
@@ -71,3 +72,4 @@ jobject java_lang_Class::newInstanceObject()
return callObjectMethod(t.pEnv,"newInstance","()Ljava/lang/Object;", mID);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx
index f97bbbe49be6..634274b238a3 100644
--- a/connectivity/source/drivers/jdbc/Clob.cxx
+++ b/connectivity/source/drivers/jdbc/Clob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,7 @@ java_sql_Clob::~java_sql_Clob()
jclass java_sql_Clob::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/Clob");
return theClass;
@@ -65,10 +66,10 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "()J";
static const char * cMethodName = "length";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
@@ -83,17 +84,17 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
{
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(JI)Ljava/lang/String;";
static const char * cMethodName = "getSubString";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID,pos,subStringLength);
ThrowSQLException(t.pEnv,*this);
aStr = JavaString2String(t.pEnv,out);
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return aStr;
}
@@ -104,7 +105,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getCharacterStream","()Ljava/io/Reader;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
}
@@ -116,12 +117,12 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const ::rtl::OUString& searchstr, sa
{
jvalue args[1];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(t.pEnv,searchstr);
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;I)J";
static const char * cMethodName = "position";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID, args[0].l,start );
@@ -144,3 +145,4 @@ sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const ::com::sun::star::uno::R
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
index c15c5dc30055..2fea1cea6d14 100644
--- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx
+++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,5 @@ namespace comphelper { namespace log { namespace convert
//........................................................................
} } } // comphelper::log::convert
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
index e730f94e47c0..36ff7a067cc4 100644
--- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
+++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,5 @@ namespace connectivity { namespace jdbc
//........................................................................
} } // namespace connectivity::jdbc
//........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index 848206ecf551..4feff317369c 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
+#include <sal/macros.h>
#include "java/sql/DatabaseMetaData.hxx"
#include "java/sql/Connection.hxx"
#include "java/sql/ResultSet.hxx"
@@ -61,7 +63,7 @@ java_sql_DatabaseMetaData::~java_sql_DatabaseMetaData()
jclass java_sql_DatabaseMetaData::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/DatabaseMetaData");
return theClass;
@@ -128,10 +130,10 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- OSL_VERIFY_RES( !isExceptionOccured(t.pEnv,sal_True),"Exception occured!");
+ OSL_VERIFY_RES( !isExceptionOccurred(t.pEnv,sal_True),"Exception occurred!");
jvalue args[4];
args[3].l = 0;
@@ -139,7 +141,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
if ( typeFilterCount )
{
jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), 0 ) );
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
const ::rtl::OUString* typeFilter = _types.getConstArray();
bool bIncludeAllTypes = false;
for ( sal_Int32 i=0; i<typeFilterCount; ++i, ++typeFilter )
@@ -151,7 +153,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
}
jstring aT = convertwchar_tToJavaString( t.pEnv, *typeFilter );
t.pEnv->SetObjectArrayElement( pObjArray, (jsize)i, aT );
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
if ( bIncludeAllTypes )
@@ -159,7 +161,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
// the SDBC API allows to pass "%" as table type filter, but in JDBC, "all table types"
// is represented by the table type being <null/>
t.pEnv->DeleteLocalRef( pObjArray );
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
else
{
@@ -187,23 +189,23 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
if ( aCatalogFilter.hasValue() )
{
t.pEnv->DeleteLocalRef((jstring)args[0].l);
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
if(args[1].l)
{
t.pEnv->DeleteLocalRef((jstring)args[1].l);
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
if(tableNamePattern.getLength())
{
t.pEnv->DeleteLocalRef((jstring)args[2].l);
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
//for(INT16 i=0;i<len;i++)
if ( args[3].l )
{
t.pEnv->DeleteLocalRef( (jobjectArray)args[3].l );
- OSL_VERIFY_RES( !isExceptionOccured( t.pEnv, sal_True ), "Exception occured!" );
+ OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
if ( jThrow )
@@ -357,11 +359,11 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[5];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
@@ -369,7 +371,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
args[4].z = approximate;
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,args[3].z,args[4].z );
- // und aufraeumen
+ // and clean up
if(catalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -398,17 +400,17 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[3];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,scope,nullable);
- // und aufraeumen
+ // and cleanup
if(catalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -437,7 +439,6 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
if ( xReturn.is() )
{
// we have to check the result columns for the tables privleges
- // #106324#
Reference< XResultSetMetaDataSupplier > xMetaSup(xReturn,UNO_QUERY);
if ( xMetaSup.is() )
{
@@ -461,7 +462,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
for (sal_Int32 i = 1 ; i <= nCount ; ++i)
{
sColumnName = xMeta->getColumnName(i);
- for (sal_uInt32 j = 0 ; j < sizeof(sPrivs)/sizeof(sPrivs[0]); ++j)
+ for (sal_uInt32 j = 0 ; j < SAL_N_ELEMENTS(sPrivs); ++j)
{
if ( sPrivs[j] == sColumnName )
{
@@ -515,11 +516,11 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[6];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : 0;
args[1].l = primarySchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,primarySchema);
args[2].l = convertwchar_tToJavaString(t.pEnv,primaryTable);
@@ -528,7 +529,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
args[5].l = convertwchar_tToJavaString(t.pEnv,foreignTable);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[2].l,args[2].l,args[3].l,args[4].l,args[5].l );
- // und aufraeumen
+ // and clean up
if(primaryCatalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -1430,12 +1431,12 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I)Ljava/sql/ResultSet;";
static const char * cMethodName = "getUDTs";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
jvalue args[4];
- // temporaere Variable initialisieren
+ // initialize temporary Variable
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schemaPattern.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schemaPattern);
args[2].l = convertwchar_tToJavaString(t.pEnv,typeNamePattern);
@@ -1460,3 +1461,5 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : 0;
}
// -------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx
index 41fd2696177a..ac61b9da9d8a 100644
--- a/connectivity/source/drivers/jdbc/Date.cxx
+++ b/connectivity/source/drivers/jdbc/Date.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@ java_util_Date::~java_util_Date()
jclass java_util_Date::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/util/Date");
return theClass;
@@ -51,3 +52,4 @@ jclass java_util_Date::getMyClass() const
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
index 4a0895fee08d..8f0d67508936 100644
--- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,10 +32,10 @@
#include "java/lang/Boolean.hxx"
#include "java/tools.hxx"
#include "java/lang/String.hxx"
+
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -51,7 +52,7 @@ java_sql_DriverPropertyInfo::~java_sql_DriverPropertyInfo()
// --------------------------------------------------------------------------------
jclass java_sql_DriverPropertyInfo::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/DriverPropertyInfo");
return theClass;
@@ -139,3 +140,4 @@ Sequence< ::rtl::OUString> java_sql_DriverPropertyInfo::choices()
}
// --------------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx
index da6ceb0b19e0..330cb3eda39f 100644
--- a/connectivity/source/drivers/jdbc/Exception.cxx
+++ b/connectivity/source/drivers/jdbc/Exception.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,10 @@ java_lang_Exception::~java_lang_Exception()
jclass java_lang_Exception::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/lang/Exception");
return theClass;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index ed1f1b00abe4..6db9d15d2e55 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@ java_io_InputStream::~java_io_InputStream()
jclass java_io_InputStream::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/io/InputStream");
return theClass;
@@ -91,7 +92,7 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen
jbyteArray pByteArray = t.pEnv->NewByteArray(nBytesToRead);
static const char * cSignature = "([BII)I";
static const char * cMethodName = "read";
- // Java-Call absetzen
+ // execute Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallIntMethod( object, mID, pByteArray, 0, nBytesToRead );
@@ -108,3 +109,4 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen
return out;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
index 155ab5f694f9..de48039a3543 100644
--- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx
+++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,7 @@ java_math_BigDecimal::~java_math_BigDecimal()
jclass java_math_BigDecimal::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/math/BigDecimal");
return theClass;
@@ -53,8 +54,8 @@ java_math_BigDecimal::java_math_BigDecimal( const ::rtl::OUString& _par0 ): java
SDBThreadAttach t;
if( !t.pEnv )
return;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Java-Call for the Constructor
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;)V";
jobject tempObj;
static jmethodID mID(NULL);
@@ -66,7 +67,7 @@ java_math_BigDecimal::java_math_BigDecimal( const ::rtl::OUString& _par0 ): java
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
ThrowSQLException( t.pEnv, NULL );
- // und aufraeumen
+ // and cleanup
}
java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, (jobject)NULL )
@@ -74,8 +75,8 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj
SDBThreadAttach t;
if( !t.pEnv )
return;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Java-Call for the Constructor
+ // initialize temporary Variable
static const char * cSignature = "(D)V";
jobject tempObj;
static jmethodID mID(NULL);
@@ -84,6 +85,7 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
ThrowSQLException( t.pEnv, NULL );
- // und aufraeumen
+ // and cleanup
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index d17ad87d5e37..14cb26fa9f95 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -324,7 +325,7 @@ void java_sql_Connection::disposing()
// -------------------------------------------------------------------------
jclass java_sql_Connection::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/Connection");
return theClass;
@@ -426,9 +427,9 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connecti
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
- /*jobject out = */callObjectMethod(t.pEnv,"getTypeMap","()Ljava/util/Map;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- return 0;// ? 0 : Map2XNameAccess( t.pEnv, out );
+ callObjectMethod(t.pEnv,"getTypeMap","()Ljava/util/Map;", mID);
+ // WARNING: the caller becomes the owner of the returned pointer
+ return 0;
}
// -------------------------------------------------------------------------
void SAL_CALL java_sql_Connection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
@@ -544,13 +545,13 @@ Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareCall( const
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;)Ljava/lang/String;";
static const char * cMethodName = "nativeSQL";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,sql));
jobject out = t.pEnv->CallObjectMethod( object, mID, str.get() );
@@ -577,7 +578,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base(t.pEnv, out);
@@ -818,17 +819,17 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
if ( t.pEnv && m_Driver_theClass && m_pDriverobject )
{
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
static const char * cMethodName = "connect";
- // Java-Call absetzen
+ // Java-Call
jmethodID mID = NULL;
if ( !mID )
mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
if ( mID )
{
jvalue args[2];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(t.pEnv,url);
java_util_Properties* pProps = createStringPropertyArray(info);
args[1].l = pProps->getJavaObject();
@@ -871,3 +872,5 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
return object != NULL;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 09a9649f059d..da389c4188dd 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,7 +65,7 @@ java_sql_Driver::~java_sql_Driver()
//------------------------------------------------------------------------------
rtl::OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.JDBCDriver");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.JDBCDriver"));
// this name is referenced in the configuration and in the jdbc.xml
// Please take care when changing it.
}
@@ -72,7 +73,7 @@ rtl::OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeExc
Sequence< ::rtl::OUString > java_sql_Driver::getSupportedServiceNames_Static( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
- aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver");
+ aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver"));
return aSNS;
}
//------------------------------------------------------------------
@@ -115,7 +116,7 @@ Reference< XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUStrin
java_sql_Connection* pConnection = new java_sql_Connection( *this );
xOut = pConnection;
if ( !pConnection->construct(url,info) )
- xOut.clear(); // an error occured and the java driver didn't throw an exception
+ xOut.clear(); // an error occurred and the java driver didn't throw an exception
else
m_aLogger.log( LogLevel::INFO, STR_LOG_DRIVER_SUCCESS );
}
@@ -128,7 +129,7 @@ sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const ::rtl::OUString& url ) thro
// I feel responsible for all jdbc url's
sal_Bool bEnabled = sal_False;
OSL_VERIFY_EQUALS( jfw_getEnabled( &bEnabled ), JFW_E_NONE, "error in jfw_getEnabled" );
- static const ::rtl::OUString s_sJdbcPrefix = ::rtl::OUString::createFromAscii("jdbc:");
+ static const ::rtl::OUString s_sJdbcPrefix( RTL_CONSTASCII_USTRINGPARAM( "jdbc:" ));
return bEnabled && 0 == url.compareTo(s_sJdbcPrefix, 5);
}
// -------------------------------------------------------------------------
@@ -254,3 +255,4 @@ sal_Int32 SAL_CALL java_sql_Driver::getMinorVersion( ) throw(RuntimeException)
// -------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 29d8c189a66e..f34c7ef05ffc 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,7 +109,7 @@ void SAL_CALL OStatement_BASE2::disposing()
// -------------------------------------------------------------------------
jclass java_sql_Statement_Base::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/Statement");
return theClass;
@@ -162,7 +163,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( )
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary Variable
try
{
static jmethodID mID(NULL);
@@ -239,13 +240,13 @@ sal_Bool SAL_CALL java_sql_Statement_Base::execute( const ::rtl::OUString& sql )
{
createStatement(t.pEnv);
m_sSqlStatement = sql;
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;)Z";
static const char * cMethodName = "execute";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
{
jdbc::ContextClassLoaderScope ccl( t.env(),
@@ -274,13 +275,13 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const ::
{
createStatement(t.pEnv);
m_sSqlStatement = sql;
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;";
static const char * cMethodName = "executeQuery";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
{
jdbc::ContextClassLoaderScope ccl( t.env(),
@@ -293,7 +294,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const ::
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
// -------------------------------------------------------------------------
@@ -367,7 +368,7 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base
static jmethodID mID(NULL);
jobject out = callResultSetMethod(t.env(),"getResultSet",mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
// -------------------------------------------------------------------------
@@ -397,7 +398,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
@@ -757,7 +758,7 @@ java_sql_Statement::~java_sql_Statement()
jclass java_sql_Statement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/Statement");
return theClass;
@@ -770,10 +771,10 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv)
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
if( _pEnv && !object ){
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(II)Ljava/sql/Statement;";
static const char * cMethodName = "createStatement";
- // Java-Call absetzen
+ // Java-Call
jobject out = NULL;
static jmethodID mID(NULL);
if ( !mID )
@@ -827,3 +828,4 @@ void SAL_CALL java_sql_Statement::release() throw()
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 4f5670ace8aa..e9e90e77f9fe 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,15 +30,12 @@
#include "precompiled_connectivity.hxx"
-#ifndef _CONNECTIVITY_JAVA_LANG_OBJJECT_HXX_
#include "java/lang/Class.hxx"
-#endif
#include "connectivity/CommonTools.hxx"
#include <com/sun/star/uno/Exception.hpp>
#include "java/tools.hxx"
#include "java/sql/SQLException.hxx"
-#include <vos/process.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <com/sun/star/uno/Sequence.hxx>
#include "java/LocalRef.hxx"
@@ -106,7 +104,7 @@ void SDBThreadAttach::releaseRef()
}
}
// -----------------------------------------------------------------------------
-// statische Variablen der Klasse:
+// static variables of the class
jclass java_lang_Object::theClass = 0;
jclass java_lang_Object::getMyClass() const
@@ -115,14 +113,14 @@ jclass java_lang_Object::getMyClass() const
theClass = findMyClass("java/lang/Object");
return theClass;
}
-// der eigentliche Konstruktor
+// the actual constructor
java_lang_Object::java_lang_Object(const Reference<XMultiServiceFactory >& _rxFactory)
: m_xFactory(_rxFactory),object( 0 )
{
SDBThreadAttach::addRef();
}
-// der protected-Konstruktor fuer abgeleitete Klassen
+// the protected-constructor for the derived classes
java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj )
: object( NULL )
{
@@ -157,7 +155,7 @@ void java_lang_Object::clearObject()
clearObject(*t.pEnv);
}
}
-// der protected-Konstruktor fuer abgeleitete Klassen
+// the protected-constructor for the derived classes
void java_lang_Object::saveRef( JNIEnv * pXEnv, jobject myObj )
{
OSL_ENSURE( myObj, "object in c++ -> Java Wrapper" );
@@ -283,7 +281,7 @@ sal_Int32 java_lang_Object::callIntMethod( const char* _pMethodName, jmethodID&
// call method
jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) );
if ( _bIgnoreException )
- isExceptionOccured(t.pEnv,sal_True);
+ isExceptionOccurred(t.pEnv,sal_True);
else
ThrowSQLException( t.pEnv, NULL );
@@ -322,7 +320,7 @@ void java_lang_Object::callVoidMethodWithIntArg( const char* _pMethodName, jmeth
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
if ( _bIgnoreException )
- isExceptionOccured(t.pEnv,sal_True);
+ isExceptionOccurred(t.pEnv,sal_True);
else
ThrowSQLException( t.pEnv, NULL );
}
@@ -335,7 +333,7 @@ void java_lang_Object::callVoidMethodWithBoolArg( const char* _pMethodName, jmet
// call method
t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
if ( _bIgnoreException )
- isExceptionOccured(t.pEnv,sal_True);
+ isExceptionOccurred(t.pEnv,sal_True);
else
ThrowSQLException( t.pEnv, NULL );
}
@@ -414,7 +412,7 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName
// -----------------------------------------------------------------------------
jclass java_lang_Object::findMyClass(const char* _pClassName)
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
SDBThreadAttach t;
jclass tempClass = t.pEnv->FindClass(_pClassName); OSL_ENSURE(tempClass,"Java : FindClass nicht erfolgreich!");
if(!tempClass)
@@ -427,3 +425,4 @@ jclass java_lang_Object::findMyClass(const char* _pClassName)
return globClass;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 55abc30e9e26..a485372b3d66 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,7 +73,7 @@ java_sql_PreparedStatement::~java_sql_PreparedStatement()
jclass java_sql_PreparedStatement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/PreparedStatement");
return theClass;
@@ -128,16 +129,16 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c
m_aLogger.log( LogLevel::FINER, STR_LOG_STRING_PARAMETER, parameterIndex, x );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- { // temporaere Variable initialisieren
+ { // initialize temporary Variable
createStatement(t.pEnv);
static const char * cSignature = "(ILjava/lang/String;)V";
static const char * cMethodName = "setString";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
t.pEnv->CallVoidMethod( object, mID, parameterIndex,str.get());
- // und aufraeumen
+ // and clean up
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //t.pEnv
}
@@ -331,10 +332,10 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(ILjava/lang/Object;II)V";
static const char * cMethodName = "setObject";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
@@ -374,7 +375,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
t.pEnv->CallVoidMethod( object, mID, parameterIndex,obj,targetSqlType,scale);
t.pEnv->DeleteLocalRef(obj);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- // und aufraeumen
+ // and clean up
} //mID
} //t.pEnv
}
@@ -429,10 +430,10 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(I[B)V";
static const char * cMethodName = "setBytes";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jbyteArray pByteArray = t.pEnv->NewByteArray(x.getLength());
@@ -454,10 +455,10 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setCharacterStream";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
Sequence< sal_Int8 > aSeq;
@@ -471,9 +472,9 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
args2[0].l = pByteArray;
args2[1].i = 0;
args2[2].i = actualLength;
- // temporaere Variable initialisieren
+ // initialize temporary variable
const char * cSignatureStream = "([BII)V";
- // Java-Call absetzen
+ // Java-Call
jclass aClass = t.pEnv->FindClass("java/io/CharArrayInputStream");
static jmethodID mID2 = NULL;
if ( !mID2 )
@@ -483,7 +484,7 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,actualLength);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(pByteArray);
t.pEnv->DeleteLocalRef(tempObj);
t.pEnv->DeleteLocalRef(aClass);
@@ -501,10 +502,10 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setBinaryStream";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
@@ -520,9 +521,9 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
args2[1].i = 0;
args2[2].i = (sal_Int32)actualLength;
- // temporaere Variable initialisieren
+ // initialize temporary variable
const char * cSignatureStream = "([BII)V";
- // Java-Call absetzen
+ // Java-Call
jclass aClass = t.pEnv->FindClass("java/io/ByteArrayInputStream");
static jmethodID mID2 = NULL;
if ( !mID2 )
@@ -531,7 +532,7 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
if(mID2)
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,(sal_Int32)actualLength);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(pByteArray);
t.pEnv->DeleteLocalRef(tempObj);
t.pEnv->DeleteLocalRef(aClass);
@@ -629,14 +630,14 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
if( !object && _pEnv ){
- // temporaere Variable initialisieren
+ // initialize temporary variable
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/PreparedStatement;";
static const char * cMethodName = "prepareStatement";
jvalue args[1];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(_pEnv,m_sSqlStatement);
- // Java-Call absetzen
+ // Java-Call
jobject out = NULL;
static jmethodID mID(NULL);
if ( !mID )
@@ -664,3 +665,4 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index 4224929332fa..3415122d8ce6 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
#include "java/io/Reader.hxx"
-#ifndef _INC_MEMORY
-//#include <memory.h>
-#endif
#include <string.h>
using namespace connectivity;
+
//**************************************************************
//************ Class: java.io.Reader
//**************************************************************
@@ -50,7 +49,7 @@ java_io_Reader::~java_io_Reader()
jclass java_io_Reader::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/io/Reader");
return theClass;
@@ -75,7 +74,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not
{
static const char * cSignature = "()Z";
static const char * cMethodName = "available";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallBooleanMethod( object, mID);
@@ -100,7 +99,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s
jcharArray pCharArray = t.pEnv->NewCharArray(nBytesToRead);
static const char * cSignature = "([CII)I";
static const char * cMethodName = "read";
- // Java-Call absetzen
+ // Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallIntMethod( object, mID, pCharArray, 0, nBytesToRead );
@@ -119,3 +118,4 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s
return out;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx
index eb9fc1e53880..7d30e94c23b1 100644
--- a/connectivity/source/drivers/jdbc/Ref.cxx
+++ b/connectivity/source/drivers/jdbc/Ref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,7 @@ java_sql_Ref::~java_sql_Ref()
jclass java_sql_Ref::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/Ref");
return theClass;
@@ -59,3 +60,4 @@ jclass java_sql_Ref::getMyClass() const
return callStringMethod("getBaseTypeName",mID);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 2dc9760169f8..4ecf3f9678bd 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,7 +65,6 @@ using namespace ::comphelper;
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -104,7 +104,7 @@ java_sql_ResultSet::~java_sql_ResultSet()
jclass java_sql_ResultSet::getMyClass() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getMyClass" );
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched only once, therefore static
if( !theClass )
theClass = findMyClass("java/sql/ResultSet");
return theClass;
@@ -161,7 +161,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -172,7 +172,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -218,7 +218,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
}
// -------------------------------------------------------------------------
@@ -283,7 +283,7 @@ Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -294,7 +294,7 @@ Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -304,7 +304,7 @@ Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -316,7 +316,7 @@ Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) t
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -329,11 +329,11 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
jvalue args[2];
- // Parameter konvertieren
+ // convert parameter
args[0].i = (sal_Int32)columnIndex;
args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary Variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -346,7 +346,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
out = t.pEnv->CallObjectMethodA( object, mID, args);
t.pEnv->DeleteLocalRef((jstring)args[1].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- // und aufraeumen
+ // and clean up
if ( out )
{
if ( t.pEnv->IsInstanceOf(out,java_lang_String::st_getMyClass()) )
@@ -408,7 +408,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
}
// -------------------------------------------------------------------------
@@ -420,7 +420,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
}
// -------------------------------------------------------------------------
@@ -578,7 +578,7 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
@@ -706,8 +706,8 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -718,7 +718,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
}
{
- // Parameter konvertieren
+ // convert parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
t.pEnv->CallVoidMethod( object, mID,columnIndex,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -733,8 +733,8 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -747,7 +747,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
{
jbyteArray aArray = t.pEnv->NewByteArray(x.getLength());
t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),(jbyte*)x.getConstArray());
- // Parameter konvertieren
+ // convert parameter
t.pEnv->CallVoidMethod( object, mID,columnIndex,aArray);
t.pEnv->DeleteLocalRef(aArray);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -791,8 +791,8 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -802,14 +802,14 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con
}
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = createByteInputStream(x,length);
t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
}
- catch(Exception)
+ catch(const Exception&)
{
::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this );
}
@@ -823,8 +823,8 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex,
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -834,14 +834,14 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex,
}
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = createCharArrayReader(x,length);
t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
}
- catch(Exception)
+ catch(const Exception&)
{
::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this );
}
@@ -865,15 +865,15 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c
void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateNumericObject" );
- // OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI");
+ // OSL_FAIL("java_sql_ResultSet::updateNumericObject: NYI");
try
{
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temporary variable
+ // Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -884,7 +884,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
}
{
- // Parameter konvertieren
+ // convert parameter
double nTemp = 0.0;
::std::auto_ptr<java_math_BigDecimal> pBigDecimal;
if ( x >>= nTemp)
@@ -893,13 +893,13 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
}
else
pBigDecimal.reset(new java_math_BigDecimal(::comphelper::getString(x)));
- //obj = convertwchar_tToJavaString(t.pEnv,::comphelper::getString(x));
+
t.pEnv->CallVoidMethod( object, mID, columnIndex,pBigDecimal->getJavaObject(),scale);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
}
}
- catch(Exception)
+ catch(const Exception&)
{
updateObject( columnIndex,x);
}
@@ -1061,7 +1061,7 @@ void java_sql_ResultSet::getFastPropertyValue(
break;
}
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -1085,3 +1085,4 @@ void SAL_CALL java_sql_ResultSet::release() throw()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
index c487f3ccab26..98e8bdf096b3 100644
--- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -63,7 +63,7 @@ java_sql_ResultSetMetaData::~java_sql_ResultSetMetaData()
jclass java_sql_ResultSetMetaData::getMyClass() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getMyClass" );
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // The class needs to be fetched just once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/ResultSetMetaData");
return theClass;
@@ -236,3 +236,4 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) thr
}
// -------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx
index 25a1d5b06024..cf08f5c42ce5 100644
--- a/connectivity/source/drivers/jdbc/SQLException.cxx
+++ b/connectivity/source/drivers/jdbc/SQLException.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -66,7 +66,7 @@ jclass java_sql_SQLException_BASE::getMyClass() const
}
jclass java_sql_SQLException_BASE::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // The class needs to be fetched just once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/SQLException");
return theClass;
@@ -77,7 +77,7 @@ starsdbc::SQLException java_sql_SQLException_BASE::getNextException() const
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getNextException","()Ljava/sql/SQLException;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller will become the owner of the returned pointers !!!
if( out )
{
java_sql_SQLException_BASE warn_base(t.pEnv,out);
@@ -98,3 +98,4 @@ sal_Int32 java_sql_SQLException_BASE::getErrorCode() const
return callIntMethod("getErrorCode",mID);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/SQLWarning.cxx b/connectivity/source/drivers/jdbc/SQLWarning.cxx
index cf30b8b0e530..6a5e459f76c8 100644
--- a/connectivity/source/drivers/jdbc/SQLWarning.cxx
+++ b/connectivity/source/drivers/jdbc/SQLWarning.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,10 @@ java_sql_SQLWarning_BASE::~java_sql_SQLWarning_BASE()
jclass java_sql_SQLWarning_BASE::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs to be fetched only once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/SQLWarning");
return theClass;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx
index f32b0cce4325..a62454e3b601 100644
--- a/connectivity/source/drivers/jdbc/String.cxx
+++ b/connectivity/source/drivers/jdbc/String.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,7 @@ jclass java_lang_String::getMyClass() const
}
jclass java_lang_String::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs to be fetched only once, that is why it is static
if( !theClass )
theClass = findMyClass("java/lang/String");
return theClass;
@@ -60,3 +61,4 @@ java_lang_String::operator ::rtl::OUString()
return JavaString2String(t.pEnv,(jstring)object);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx
index 9bbd81f62b0e..6949a9748fb3 100644
--- a/connectivity/source/drivers/jdbc/Throwable.cxx
+++ b/connectivity/source/drivers/jdbc/Throwable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,7 @@ jclass java_lang_Throwable::getMyClass() const
}
jclass java_lang_Throwable::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs to be fetched only once, that is why it is static
if( !theClass )
theClass = findMyClass("java/lang/Throwable");
return theClass;
@@ -67,3 +68,4 @@ jclass java_lang_Throwable::st_getMyClass()
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index 7fcc3686eaaa..d8e9fe633ce7 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,13 +46,13 @@ java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java
if( !t.pEnv )
return;
jvalue args[1];
- // Parameter konvertieren
+ // Convert parameters
::rtl::OUString sDateStr;
sDateStr = ::dbtools::DBTypeConversion::toDateString(_rOut);
args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn of Java-Call for the constructor
+ // initialise temporary variables
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Date;";
jobject tempObj;
static jmethodID mID(NULL);
@@ -60,7 +61,7 @@ java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java
tempObj = t.pEnv->CallStaticObjectMethod( getMyClass(), mID, args[0].l );
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
- // und aufraeumen
+ // and clean
}
java_sql_Date::~java_sql_Date()
@@ -72,7 +73,7 @@ jclass java_sql_Date::getMyClass() const
}
jclass java_sql_Date::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs only be fetched once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/Date");
return theClass;
@@ -99,7 +100,7 @@ jclass java_sql_Time::getMyClass() const
}
jclass java_sql_Time::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs only be fetched once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/Time");
return theClass;
@@ -110,13 +111,13 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_
if( !t.pEnv )
return;
jvalue args[1];
- // Parameter konvertieren
+ // Convert parameters
::rtl::OUString sDateStr;
sDateStr = ::dbtools::DBTypeConversion::toTimeString(_rOut);
args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn off Java-Call for the constructor
+ // intialise temporary variables
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Time;";
jobject tempObj;
static jmethodID mID(NULL);
@@ -126,7 +127,7 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_
t.pEnv->DeleteLocalRef((jstring)args[0].l);
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
- // und aufraeumen
+ // and clean
}
// -----------------------------------------------------------------------------
java_sql_Time::operator ::com::sun::star::util::Time()
@@ -146,13 +147,15 @@ jclass java_sql_Timestamp::getMyClass() const
{
return st_getMyClass();
}
+
jclass java_sql_Timestamp::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs only be fetched once, that is why it is static
if( !theClass )
theClass = findMyClass("java/sql/Timestamp");
return theClass;
}
+
java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut)
:java_util_Date( NULL, (jobject)NULL )
{
@@ -160,14 +163,14 @@ java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _
if( !t.pEnv )
return;
jvalue args[1];
- // Parameter konvertieren
+ // Convert parameters
::rtl::OUString sDateStr;
sDateStr = ::dbtools::DBTypeConversion::toDateTimeString(_rOut);
args[0].l = convertwchar_tToJavaString(t.pEnv,sDateStr);
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn off Java-Call for the constructor
+ // initialise temporary variables
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/Timestamp;";
jobject tempObj;
static jmethodID mID(NULL);
@@ -177,20 +180,9 @@ java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
- // und aufraeumen
+ // and clean
}
-sal_Int32 java_sql_Timestamp::getNanos()
-{
- static jmethodID mID(NULL);
- return callIntMethod("getNanos",mID);
-}
-
-void java_sql_Timestamp::setNanos( sal_Int32 _par0 )
-{
- static jmethodID mID(NULL);
- callVoidMethodWithIntArg("setNanos",mID,_par0);
-}
// -----------------------------------------------------------------------------
java_sql_Timestamp::operator ::com::sun::star::util::DateTime()
{
@@ -199,3 +191,4 @@ java_sql_Timestamp::operator ::com::sun::star::util::DateTime()
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/exports.dxp b/connectivity/source/drivers/jdbc/exports.dxp
index f0e1c69934bc..f0e1c69934bc 100644..100755
--- a/connectivity/source/drivers/jdbc/exports.dxp
+++ b/connectivity/source/drivers/jdbc/exports.dxp
diff --git a/connectivity/source/drivers/jdbc/jdbc.component b/connectivity/source/drivers/jdbc/jdbc.component
index 5d7db4690ba5..5d7db4690ba5 100644..100755
--- a/connectivity/source/drivers/jdbc/jdbc.component
+++ b/connectivity/source/drivers/jdbc/jdbc.component
diff --git a/connectivity/source/drivers/jdbc/jdbc.mxp.map b/connectivity/source/drivers/jdbc/jdbc.mxp.map
index e02823e8c41b..e02823e8c41b 100644..100755
--- a/connectivity/source/drivers/jdbc/jdbc.mxp.map
+++ b/connectivity/source/drivers/jdbc/jdbc.mxp.map
diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu
index 2afaa54a9e90..2afaa54a9e90 100755..100644
--- a/connectivity/source/drivers/jdbc/jdbc.xcu
+++ b/connectivity/source/drivers/jdbc/jdbc.xcu
diff --git a/connectivity/source/drivers/jdbc/jdbc.xml b/connectivity/source/drivers/jdbc/jdbc.xml
index b8433f2bdd46..bdce638fcf0f 100644..100755
--- a/connectivity/source/drivers/jdbc/jdbc.xml
+++ b/connectivity/source/drivers/jdbc/jdbc.xml
@@ -17,11 +17,9 @@
<project-build-dependency>cppuhelper</project-build-dependency>
<project-build-dependency>cppu</project-build-dependency>
<project-build-dependency>sal</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<runtime-module-dependency>cppuhelper</runtime-module-dependency>
<runtime-module-dependency>cppu</runtime-module-dependency>
<runtime-module-dependency>sal</runtime-module-dependency>
- <runtime-module-dependency>vos</runtime-module-dependency>
<runtime-module-dependency>osl</runtime-module-dependency>
<runtime-module-dependency>dbtools</runtime-module-dependency>
<runtime-module-dependency>comphelper</runtime-module-dependency>
diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
index 85a8d37b9346..32fa42f22678 100644
--- a/connectivity/source/drivers/jdbc/jservices.cxx
+++ b/connectivity/source/drivers/jdbc/jservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,8 +87,7 @@ struct ProviderRequest
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
)
@@ -124,3 +124,4 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk
index 510daeac4a9f..befdc73d7bf8 100644..100755
--- a/connectivity/source/drivers/jdbc/makefile.mk
+++ b/connectivity/source/drivers/jdbc/makefile.mk
@@ -87,8 +87,8 @@ SHL1OBJS=$(SLOFILES)
SHL1STDLIBS=\
$(CPPULIB) \
$(CPPUHELPERLIB) \
- $(VOSLIB) \
$(SALLIB) \
+ $(SALHELPERLIB) \
$(JVMACCESSLIB) \
$(DBTOOLSLIB) \
$(UNOTOOLSLIB) \
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index 1be627b6d4ac..b2841391eec9 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
-// using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
@@ -52,13 +52,13 @@ void java_util_Properties::setProperty(const ::rtl::OUString key, const ::rtl::O
{
jvalue args[2];
- // Parameter konvertieren
+ // Convert Parameter
args[0].l = convertwchar_tToJavaString(t.pEnv,key);
args[1].l = convertwchar_tToJavaString(t.pEnv,value);
- // temporaere Variable initialisieren
+ // Initialize temporary Variables
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;";
static const char * cMethodName = "setProperty";
- // Java-Call absetzen
+ // Turn off Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallObjectMethod(object, mID, args[0].l,args[1].l);
@@ -69,7 +69,7 @@ void java_util_Properties::setProperty(const ::rtl::OUString key, const ::rtl::O
if(out)
t.pEnv->DeleteLocalRef(out);
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: The caller will be owner of the returned pointers!!!
}
jclass java_util_Properties::theClass = 0;
@@ -78,7 +78,7 @@ java_util_Properties::~java_util_Properties()
jclass java_util_Properties::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class needs only be called once, that is why it is static
if( !theClass )
theClass = findMyClass("java/util/Properties");
return theClass;
@@ -90,8 +90,8 @@ java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, (jobject)
SDBThreadAttach t;
if( !t.pEnv )
return;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn off Java-Call for the constructor
+ // Initialize temperary Variables
static const char * cSignature = "()V";
jobject tempObj;
static jmethodID mID(NULL);
@@ -191,7 +191,7 @@ jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference<
return 0;
}
// -----------------------------------------------------------------------------
-sal_Bool connectivity::isExceptionOccured(JNIEnv *pEnv,sal_Bool _bClear)
+sal_Bool connectivity::isExceptionOccurred(JNIEnv *pEnv,sal_Bool _bClear)
{
if ( !pEnv )
return sal_False;
@@ -224,8 +224,8 @@ jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Referen
SDBThreadAttach t;
if( !t.pEnv || !x.is() )
return NULL;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn off Java-Call for the constructor
+ // Initialize temperary variables
jclass clazz = java_lang_Object::findMyClass("java/io/ByteArrayInputStream");
static jmethodID mID(NULL);
if ( !mID )
@@ -251,8 +251,8 @@ jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Referen
SDBThreadAttach t;
if( !t.pEnv || !x.is() )
return NULL;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // Turn off Java-Call for the constructor
+ // Initialize temperary Variables
jclass clazz = java_lang_Object::findMyClass("java/io/CharArrayReader");
static jmethodID mID(NULL);
if ( !mID )
@@ -273,3 +273,5 @@ jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Referen
return out;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */