summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/mozab/MColumnAlias.cxx10
-rw-r--r--connectivity/source/drivers/mozab/MConnection.cxx42
-rw-r--r--connectivity/source/drivers/mozab/MConnection.hxx10
-rw-r--r--connectivity/source/drivers/mozab/MDatabaseMetaData.cxx7
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx17
-rw-r--r--connectivity/source/drivers/mozab/MDriver.hxx10
-rw-r--r--connectivity/source/drivers/mozab/makefile.mk10
7 files changed, 68 insertions, 38 deletions
diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx
index 510835cf8137..8ab89656b4b3 100644
--- a/connectivity/source/drivers/mozab/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MColumnAlias.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mmaher $ $Date: 2001-10-11 10:07:54 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,8 +62,8 @@
#ifndef _CONNECTIVITY_MAB_COLUMNALIAS_HXX_
#include "MColumnAlias.hxx"
#endif
-#ifndef _CONNECTIVITY_MAB_DRIVER_HXX_
-#include "MDriver.hxx"
+#ifndef CONNECTIVITY_SCONNECTION_HXX
+#include "MConnection.hxx"
#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -210,7 +210,7 @@ void OColumnAlias::setAlias(const ::com::sun::star::uno::Reference<
// open our driver settings config node
// the config path for our own driver's settings
- Reference< XPropertySet > xDriverNode = createDriverConfigNode( _rxORB, MozabDriver::getImplementationName_Static() );
+ Reference< XPropertySet > xDriverNode = createDriverConfigNode( _rxORB, OConnection::getImplementationName_Static() );
if ( xDriverNode.is() )
{
try
diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx
index 1561d8775472..ea1b39b22c5e 100644
--- a/connectivity/source/drivers/mozab/MConnection.cxx
+++ b/connectivity/source/drivers/mozab/MConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MConnection.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2001-10-17 18:38:07 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -138,7 +138,35 @@ namespace connectivity {
}
}
// -----------------------------------------------------------------------------
-
+const sal_Char* OConnection::getSDBC_SCHEME_MOZILLA()
+{
+ static sal_Char* SDBC_SCHEME_MOZILLA = MOZAB_MOZILLA_SCHEMA;
+ return SDBC_SCHEME_MOZILLA;
+}
+// -----------------------------------------------------------------------------
+const sal_Char* OConnection::getSDBC_SCHEME_LDAP()
+{
+ static sal_Char* SDBC_SCHEME_LDAP = MOZAB_LDAP_SCHEMA;
+ return SDBC_SCHEME_LDAP;
+}
+// -----------------------------------------------------------------------------
+const sal_Char* OConnection::getSDBC_SCHEME_OUTLOOK_MAPI()
+{
+ static sal_Char* SDBC_SCHEME_OUTLOOK_MAPI = MOZAB_OUTLOOK_SCHEMA;
+ return SDBC_SCHEME_OUTLOOK_MAPI;
+}
+// -----------------------------------------------------------------------------
+const sal_Char* OConnection::getSDBC_SCHEME_OUTLOOK_EXPRESS()
+{
+ static sal_Char* SDBC_SCHEME_OUTLOOK_EXPRESS = MOZAB_OUTLOOKEXP_SCHEMA;
+ return SDBC_SCHEME_OUTLOOK_EXPRESS;
+}
+// -----------------------------------------------------------------------------
+::rtl::OUString OConnection::getImplementationName_Static()
+{
+ return rtl::OUString::createFromAscii(MOZAB_DRIVER_IMPL_NAME);
+}
+// -----------------------------------------------------------------------------
OConnection::OConnection(MozabDriver* _pDriver)
: OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this),
@@ -222,11 +250,11 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
// "sdbc:address:outlookexp:" -> aboutlookdirectory://oe/
//
m_IsLDAP = sal_False ;
- if ( aAddrbookScheme.compareToAscii( MozabDriver::getSDBC_SCHEME_MOZILLA() ) == 0 ) {
+ if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_MOZILLA() ) == 0 ) {
m_sMozillaURI = rtl::OUString::createFromAscii( MOZ_SCHEME_MOZILLA );
m_UsesFactory = USES_FACTORY_MOZILLA ;
}
- else if ( aAddrbookScheme.compareToAscii( MozabDriver::getSDBC_SCHEME_LDAP() ) == 0 ) {
+ else if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_LDAP() ) == 0 ) {
rtl::OUString sHostName;
rtl::OUString sBaseDN;
sal_Int32 nPortNumber = -1;
@@ -284,11 +312,11 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
m_sMozillaURI += ::rtl::OUString::createFromAscii("?(or(DisplayName,=,DontDoThisAtHome))");
}
- else if ( aAddrbookScheme.compareToAscii( MozabDriver::getSDBC_SCHEME_OUTLOOK_MAPI() ) == 0 ) {
+ else if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_OUTLOOK_MAPI() ) == 0 ) {
m_sMozillaURI = ::rtl::OUString::createFromAscii( MOZ_SCHEME_OUTLOOK_MAPI );
m_UsesFactory = USES_FACTORY_OUTLOOK_MAPI ;
}
- else if ( aAddrbookScheme.compareToAscii( MozabDriver::getSDBC_SCHEME_OUTLOOK_EXPRESS() ) == 0 ) {
+ else if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_OUTLOOK_EXPRESS() ) == 0 ) {
m_sMozillaURI = rtl::OUString::createFromAscii( MOZ_SCHEME_OUTLOOK_EXPRESS );
m_UsesFactory = USES_FACTORY_OUTLOOK_EXPRESS ;
m_bOutlookExpress = sal_True;
diff --git a/connectivity/source/drivers/mozab/MConnection.hxx b/connectivity/source/drivers/mozab/MConnection.hxx
index 09c126b14db2..b8a5692be999 100644
--- a/connectivity/source/drivers/mozab/MConnection.hxx
+++ b/connectivity/source/drivers/mozab/MConnection.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MConnection.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2001-10-17 18:27:28 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -216,6 +216,12 @@ namespace connectivity
const OColumnAlias & getColumnAlias() const
{ return (m_aColumnAlias); }
+ static const sal_Char* getSDBC_SCHEME_MOZILLA();
+ static const sal_Char* getSDBC_SCHEME_LDAP();
+ static const sal_Char* getSDBC_SCHEME_OUTLOOK_MAPI();
+ static const sal_Char* getSDBC_SCHEME_OUTLOOK_EXPRESS();
+ static ::rtl::OUString getImplementationName_Static();
+
// End of Additions from the land of mozilla
};
}
diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
index 46a3617ed9a6..8ecf48c8fff6 100644
--- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MDatabaseMetaData.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-10-15 12:57:28 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,11 +135,8 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows(
{
static ODatabaseMetaDataResultSet::ORows aRows;
ODatabaseMetaDataResultSet::ORow aRow(19);
-
- ODatabaseMetaDataResultSet::ORows().swap(aRows); // this makes real clear where memory is freed as well
aRows.clear();
-
const ::std::vector< ::rtl::OUString >& colNames = m_pConnection->getColumnAlias().getAlias();
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index e5cd087ba6b1..f9431f48f0ea 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MDriver.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2001-10-23 07:51:48 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,7 +125,7 @@ void MozabDriver::disposing()
//------------------------------------------------------------------------------
rtl::OUString MozabDriver::getImplementationName_Static( ) throw(RuntimeException)
{
- return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.MozabDriver");
+ return rtl::OUString::createFromAscii(MOZAB_DRIVER_IMPL_NAME);
// this name is referenced in the configuration and in the mozab.xml
// Please take care when changing it.
}
@@ -246,28 +246,27 @@ sal_Bool MozabDriver::acceptsURL_Stat( const ::rtl::OUString& url )
// -----------------------------------------------------------------------------
const sal_Char* MozabDriver::getSDBC_SCHEME_MOZILLA()
{
- static sal_Char* SDBC_SCHEME_MOZILLA = "mozilla";
+ static sal_Char* SDBC_SCHEME_MOZILLA = MOZAB_MOZILLA_SCHEMA;
return SDBC_SCHEME_MOZILLA;
}
// -----------------------------------------------------------------------------
const sal_Char* MozabDriver::getSDBC_SCHEME_LDAP()
{
- static sal_Char* SDBC_SCHEME_LDAP = "ldap";
+ static sal_Char* SDBC_SCHEME_LDAP = MOZAB_LDAP_SCHEMA;
return SDBC_SCHEME_LDAP;
}
// -----------------------------------------------------------------------------
const sal_Char* MozabDriver::getSDBC_SCHEME_OUTLOOK_MAPI()
{
- static sal_Char* SDBC_SCHEME_OUTLOOK_MAPI = "outlook";
+ static sal_Char* SDBC_SCHEME_OUTLOOK_MAPI = MOZAB_OUTLOOK_SCHEMA;
return SDBC_SCHEME_OUTLOOK_MAPI;
}
// -----------------------------------------------------------------------------
const sal_Char* MozabDriver::getSDBC_SCHEME_OUTLOOK_EXPRESS()
{
- static sal_Char* SDBC_SCHEME_OUTLOOK_EXPRESS = "outlookexp";
+ static sal_Char* SDBC_SCHEME_OUTLOOK_EXPRESS = MOZAB_OUTLOOKEXP_SCHEMA;
return SDBC_SCHEME_OUTLOOK_EXPRESS;
-}
-// -----------------------------------------------------------------------------
+}// -----------------------------------------------------------------------------
void MozabDriver::registerClient()
{
if (!s_hModule)
diff --git a/connectivity/source/drivers/mozab/MDriver.hxx b/connectivity/source/drivers/mozab/MDriver.hxx
index f121a57adb4a..cc5ad892fa6a 100644
--- a/connectivity/source/drivers/mozab/MDriver.hxx
+++ b/connectivity/source/drivers/mozab/MDriver.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MDriver.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-10-15 12:57:28 $
+ * last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,12 @@
#endif
+#define MOZAB_MOZILLA_SCHEMA "mozilla"
+#define MOZAB_LDAP_SCHEMA "ldap"
+#define MOZAB_OUTLOOK_SCHEMA "outlook"
+#define MOZAB_OUTLOOKEXP_SCHEMA "outlookexp"
+#define MOZAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.MozabDriver"
+
extern "C" void* SAL_CALL OMozabConnection_CreateInstance(void* _pDriver);
namespace connectivity
{
diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk
index 93c10ca689af..1c3b241b144e 100644
--- a/connectivity/source/drivers/mozab/makefile.mk
+++ b/connectivity/source/drivers/mozab/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: obo $ $Date: 2001-10-16 11:52:03 $
+# last change: $Author: oj $ $Date: 2001-10-23 09:08:04 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -149,7 +149,6 @@ MOZSLOFILES=\
SLO2FILES=\
$(SLO)$/MCatalog.obj \
$(SLO)$/MColumns.obj \
- $(SLO)$/MDriver.obj \
$(SLO)$/MTable.obj \
$(SLO)$/MTables.obj \
$(SLO)$/MColumnAlias.obj \
@@ -176,11 +175,6 @@ SHL2STDLIBS=\
$(COMPHELPERLIB) \
$(MOZ_LIB_XPCOM)
-.IF "$(GUI)" == "WNT"
-SHL2STDLIBS+= i$(MOZAB_TARGET)$(MOZAB_MAJOR).lib
-.ELSE
-SHL2STDLIBS+= -l$(MOZAB_TARGET)$(MOZAB_MAJOR)
-.ENDIF
SHL2DEPN=
SHL2IMPLIB= i$(TARGET2)