summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/JConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/jdbc/JConnection.cxx')
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/jdbc/JConnection.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index f61dc9287649..90209d8c528b 100644..100755
--- 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
static 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: */