diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 17:27:20 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 17:27:20 +0000 |
commit | ec434f70f4834b510a811a37e256d3a5064003cc (patch) | |
tree | a6d5135454810807c9ef45f1b96a9b8eaa00bdd3 /connectivity | |
parent | 95c359bd5d3b848dd28f5a93475c1817eb2cef6c (diff) |
INTEGRATION: CWS mozab04 (1.15.2); FILE MERGED
2004/04/13 09:15:19 windly 1.15.2.3: #1000# replace createFromAscii to RTL_CONSTASCII_USTRINGPARAM
2004/04/12 10:15:52 windly 1.15.2.2: #i6883# make mozab driver threadsafe
2004/04/05 09:54:40 windly 1.15.2.1: #i20338# Read and Write access to Address Books
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mozab/MConnection.cxx | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 6e7e92420254..7308651db52f 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.15 $ + * $Revision: 1.16 $ * - * last change: $Author: obo $ $Date: 2004-03-17 10:41:09 $ + * last change: $Author: hjs $ $Date: 2004-06-25 18:27:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -117,22 +117,7 @@ using namespace com::sun::star::sdbcx; // -------------------------------------------------------------------------------- -//------------------------------------------------------------------ - -namespace connectivity { - namespace mozab { - // For the moment, we will connect the Mozilla address book to the Mozilla - // top-level address book which will display whatever is in the preferences - // file of Mozilla. - static sal_Char* MOZ_SCHEME_MOZILLA = "moz-abdirectory://"; - // This one is a base uri which will be completed with the connection data. - static sal_Char* MOZ_SCHEME_LDAP = "moz-abldapdirectory://"; - // These two uris will be used to obtain directory factories to access all - // address books of the given type. - static sal_Char* MOZ_SCHEME_OUTLOOK_MAPI = "moz-aboutlookdirectory://op/"; - static sal_Char* MOZ_SCHEME_OUTLOOK_EXPRESS = "moz-aboutlookdirectory://oe/"; - } -} + // ----------------------------------------------------------------------------- const sal_Char* OConnection::getSDBC_SCHEME_MOZILLA() { @@ -218,7 +203,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV else { OSL_TRACE( "No subschema given!!!\n"); ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No subschema provided"),NULL); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No subschema provided")),NULL); } } else { @@ -242,8 +227,8 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV // * for windows system address book // "sdbc:address:outlookexp:" -> aboutlookdirectory://oe/ // - m_sBindDN = rtl::OUString::createFromAscii(""); - m_sPassword = rtl::OUString::createFromAscii(""); + m_sBindDN = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("")); + m_sPassword = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("")); m_bUseSSL = sal_False; if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_MOZILLA() ) == 0 ) { @@ -299,24 +284,24 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV } else { ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No HostName provided"),NULL); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No HostName provided")),NULL); } if ( nPortNumber > 0 ) { - m_sMozillaURI += rtl::OUString::createFromAscii( ":" ); + m_sMozillaURI += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(":") ); m_sMozillaURI += rtl::OUString::valueOf( nPortNumber ); } if ( sBaseDN.getLength() != 0 ) { - m_sMozillaURI += rtl::OUString::createFromAscii( "/" ); + m_sMozillaURI += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ); m_sMozillaURI += sBaseDN; } else { ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("No BaseDN provided"),NULL); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("No BaseDN provided")),NULL); } // Addition of a fake query to enable the Mozilla LDAP directory to work correctly. - m_sMozillaURI += ::rtl::OUString::createFromAscii("?(or(DisplayName,=,DontDoThisAtHome))"); + m_sMozillaURI += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?(or(DisplayName,=,DontDoThisAtHome)))")); } else if ( aAddrbookScheme.compareToAscii( getSDBC_SCHEME_OUTLOOK_MAPI() ) == 0 ) { @@ -331,7 +316,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV { OSL_TRACE("Invalid subschema given!!!\n"); ::dbtools::throwGenericSQLException( - ::rtl::OUString::createFromAscii("Invalid subschema provided"),NULL); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid subschema provided")),NULL); } OSL_TRACE("Moz URI = %s, %s\n", ((OUtoCStr(m_sMozillaURI)) ? (OUtoCStr(m_sMozillaURI)):("NULL")), usesFactory() ? "uses factory" : "no factory"); @@ -355,7 +340,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV // Test connection by getting to get the Table Names ::std::vector< ::rtl::OUString > tables; ::std::vector< ::rtl::OUString > types; - if ( !_aDbHelper.getTableStrings( this, tables, types,sal_True ) ) { + if ( !_aDbHelper.getTableStrings( this, tables, types ) ) { ::dbtools::throwGenericSQLException( _aDbHelper.getErrorString(), NULL); } |