summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2000-10-24 15:34:43 +0000
committerOcke Janssen <oj@openoffice.org>2000-10-24 15:34:43 +0000
commit444c5cbdeb11577f265f256d616c921c20246e99 (patch)
tree8e057c49a4a2d97a98ea22481bd83f52f70a0a86 /connectivity
parent7ca8b14889621c6ad5bf3f654bfa51476685ce7c (diff)
make strings unique for lib's
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DDatabaseMetaData.cxx8
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx5
-rw-r--r--connectivity/source/drivers/flat/EDatabaseMetaData.cxx8
-rw-r--r--connectivity/source/drivers/flat/EResultSet.cxx17
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx5
-rw-r--r--connectivity/source/drivers/flat/ETables.cxx5
-rw-r--r--connectivity/source/drivers/flat/makefile.mk6
-rw-r--r--connectivity/source/drivers/jdbc/JDriver.cxx51
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx17
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx5
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx5
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx8
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx18
13 files changed, 114 insertions, 44 deletions
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index 85b7a3a69dc1..6c1138f56285 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DDatabaseMetaData.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-10-05 14:39:02 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:34:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,10 @@
#ifndef _CONNECTIVITY_DBASE_INDEX_HXX_
#include "dbase/DIndex.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE dbase
+#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
+#include "propertyids.hxx"
+#endif
using namespace connectivity::dbase;
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 8e17d1fc1f39..aeb9d2b3fb26 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FResultSet.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2000-10-19 11:56:36 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:34:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,7 @@
#ifndef _CONNECTIVITY_FILE_ORESULTSET_HXX_
#include "file/FResultSet.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE file
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
index 9eb8411ec573..1ab1a0e79b7f 100644
--- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: EDatabaseMetaData.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2000-10-05 14:42:54 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:32:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,10 @@
#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE flat
+#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
+#include "propertyids.hxx"
+#endif
using namespace connectivity::flat;
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx
index 1f4a74a834b1..1bda37b4a085 100644
--- a/connectivity/source/drivers/flat/EResultSet.cxx
+++ b/connectivity/source/drivers/flat/EResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: EResultSet.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: obo $ $Date: 2000-10-24 15:21:58 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:32:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,9 +74,22 @@
#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE flat
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
+// define the properties of this lib
+// this file includes the properties for this dll
+namespace connectivity
+{
+ namespace flat
+ {
+#ifndef CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
+#include "UStringDescription_Impl.hxx"
+#endif
+ }
+}
+
using namespace connectivity::flat;
using namespace connectivity::file;
using namespace cppu;
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 11d71ae0ddb5..540d94440af6 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ETable.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-10-19 11:55:41 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:32:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,6 +123,7 @@
#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.hxx>
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE flat
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx
index 89483e3a74e7..7ab745935af8 100644
--- a/connectivity/source/drivers/flat/ETables.cxx
+++ b/connectivity/source/drivers/flat/ETables.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ETables.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2000-10-05 14:44:11 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:32:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,7 @@
#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE flat
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
diff --git a/connectivity/source/drivers/flat/makefile.mk b/connectivity/source/drivers/flat/makefile.mk
index 82b379c6f3be..ac68397f98b2 100644
--- a/connectivity/source/drivers/flat/makefile.mk
+++ b/connectivity/source/drivers/flat/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: oj $ $Date: 2000-10-19 11:55:41 $
+# last change: $Author: oj $ $Date: 2000-10-24 16:32:46 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -112,6 +112,8 @@ SLOFILES=\
SLOFILES+=$(SLO)$/staticmbdbase.obj
.ENDIF
+SHL1VERSIONMAP= $(TARGET).map
+
# --- Library -----------------------------------
SHL1TARGET=$(TARGET)$(UPD)$(DLLPOSTFIX)
SHL1OBJS=$(SLOFILES)
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 80e1a7013623..424448e37956 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: JDriver.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:14:22 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:31:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -163,10 +163,10 @@ void java_sql_Driver::saveClassRef( jclass pClass )
theClass = pClass;
}
// -------------------------------------------------------------------------
-Reference< starsdbc::XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUString& url, const
- Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(starsdbc::SQLException, RuntimeException)
+Reference< XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUString& url, const
+ Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(SQLException, RuntimeException)
{
- Reference< starsdbc::XConnection > xRet;
+ Reference< XConnection > xRet;
object = java_sql_DriverManager::getDriver(url);
jobject out(0);
@@ -185,42 +185,59 @@ Reference< starsdbc::XConnection > SAL_CALL java_sql_Driver::connect( const ::rt
if( mID )
{
out = t.pEnv->CallObjectMethodA( getMyClass(), mID, args );
- ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
- t.pEnv->DeleteLocalRef((jstring)args[0].l);
- t.pEnv->DeleteLocalRef((jstring)args[1].l);
} //mID
+ // und aufraeumen
+ t.pEnv->DeleteLocalRef((jstring)args[0].l);
+ t.pEnv->DeleteLocalRef((jstring)args[1].l);
+ ThrowSQLException(t.pEnv,*this);
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- Reference< starsdbc::XConnection > xOut;
+ Reference< XConnection > xOut;
return out==0 ? 0 : new java_sql_Connection( t.pEnv, out,this );
// return xOut;
}
// -------------------------------------------------------------------------
-sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const ::rtl::OUString& url ) throw(starsdbc::SQLException, RuntimeException)
+sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException)
{
- if(!object)
+ try
+ {
+ if(object)
+ {
+ SDBThreadAttach t;
+ if( t.pEnv )
+ t.pEnv->DeleteGlobalRef( object );
+ object = NULL;
+ }
object = java_sql_DriverManager::getDriver(url);
+ }
+ catch(SQLException&)
+ {
+ return sal_False;
+ }
jboolean out(0);
SDBThreadAttach t; OSL_ENSHURE(t.pEnv,"Java Enviroment gelöscht worden!");
if( t.pEnv )
{
if(!object)
- ThrowSQLException(t.pEnv,*this);
+ return sal_False;
+ jvalue args;
+ args.l = convertwchar_tToJavaString(t.pEnv,url);
// temporaere Variable initialisieren
char * cSignature = "(Ljava/lang/String;)Z";
char * cMethodName = "acceptsURL";
// Java-Call absetzen
jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );
if( mID )
- out = t.pEnv->CallBooleanMethod( object, mID);
- ThrowSQLException(t.pEnv,*this);
+ out = t.pEnv->CallBooleanMethod( object, mID,args);
+ // und aufraeumen
+ t.pEnv->DeleteLocalRef((jstring)args.l);
+ ThrowSQLException(t.pEnv,*this);
} //t.pEnv
return out;
}
// -------------------------------------------------------------------------
-Sequence< starsdbc::DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(starsdbc::SQLException, RuntimeException)
+Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(SQLException, RuntimeException)
{
if(!object)
object = java_sql_DriverManager::getDriver(url);
@@ -248,7 +265,7 @@ Sequence< starsdbc::DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyIn
} //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
- return copyArrayAndDelete( t.pEnv, out, starsdbc::DriverPropertyInfo(),java_sql_DriverPropertyInfo(NULL,NULL));
+ return copyArrayAndDelete( t.pEnv, out, DriverPropertyInfo(),java_sql_DriverPropertyInfo(NULL,NULL));
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL java_sql_Driver::getMajorVersion( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index b7c9bb886081..67f427b2e4bd 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ResultSet.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2000-10-11 10:46:14 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:31:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,6 +91,7 @@
#ifndef _CONNECTIVITY_JAVA_TOOLS_HXX_
#include "java/tools.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE jdbc
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
@@ -110,6 +111,18 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#endif
+// define the properties of this lib
+// this file includes the properties for this dll
+namespace connectivity
+{
+ namespace jdbc
+ {
+#ifndef CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
+#include "UStringDescription_Impl.hxx"
+#endif
+ }
+}
+
using namespace connectivity;
using namespace ::com::sun::star::uno;
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 924c6f8ef483..f91bd5359a40 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: OConnection.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2000-10-06 14:50:41 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:27:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,7 @@
#endif
using namespace connectivity::odbc;
+using namespace connectivity::dbtools;
//------------------------------------------------------------------------------
using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index e1d7c655c074..caad4af8a778 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: OPreparedStatement.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2000-10-11 10:46:17 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:27:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,7 @@
#ifndef _CONNECTIVITY_ODBC_ORESULTSETMETADATA_HXX_
#include "odbc/OResultSetMetaData.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE odbc
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index c47f9e59ed69..c7e6769731fe 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: OResultSet.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2000-10-11 10:46:17 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:27:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,7 @@
#ifndef _CONNECTIVITY_ODBC_ORESULTSET_HXX_
#include "odbc/OResultSet.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE odbc
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
@@ -94,9 +95,6 @@
#ifndef _CPPUHELPER_EXTRACT_HXX_
#include <cppuhelper/extract.hxx>
#endif
-//#ifndef _CONNECTIVITY_OTOOLS_HXX_
-//#include "odbc/OTools.hxx"
-//#endif
using namespace connectivity::odbc;
using namespace cppu;
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index d814396bdaf9..2ae4d502d1b8 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: OStatement.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-10-17 08:52:52 $
+ * last change: $Author: oj $ $Date: 2000-10-24 16:27:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,7 @@
#ifndef _CONNECTIVITY_ODBC_ORESULTSET_HXX_
#include "odbc/OResultSet.hxx"
#endif
+#define CONNECTIVITY_PROPERTY_NAME_SPACE odbc
#ifndef _CONNECTIVITY_PROPERTYIDS_HXX_
#include "propertyids.hxx"
#endif
@@ -119,6 +120,19 @@
}
#endif
+// define the properties of this lib
+// this file includes the properties for this dll
+namespace connectivity
+{
+ namespace odbc
+ {
+#ifndef CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
+#include "UStringDescription_Impl.hxx"
+#endif
+ }
+}
+
+
using namespace connectivity::odbc;
//------------------------------------------------------------------------------
using namespace com::sun::star::uno;