Tag: cws_src680_dba24
User: fs      
Date: 05/03/07 23:46:20

Modified:
 /dba/connectivity/source/drivers/mozab/
  MDriver.cxx

Log:
 RESYNC: (1.10-1.12); FILE MERGED

File Changes:

Directory: /dba/connectivity/source/drivers/mozab/
==================================================

File [changed]: MDriver.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MDriver.cxx?r1=1.10.52.1&r2=1.10.52.2
Delta lines:  +17 -5
--------------------
--- MDriver.cxx 4 Feb 2005 08:43:36 -0000       1.10.52.1
+++ MDriver.cxx 8 Mar 2005 07:46:17 -0000       1.10.52.2
@@ -67,7 +67,6 @@
 #ifndef _DBHELPER_DBEXCEPTION_HXX_
 #include "connectivity/dbexception.hxx"
 #endif
-
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
@@ -174,10 +173,15 @@
        if (s_pCreationFunc)
        {
        ::osl::MutexGuard aGuard(m_aMutex);
+               //We must make sure we create an 
com.sun.star.mozilla.MozillaBootstrap brfore call any mozilla codes
+               Reference<XInterface> xInstance = 
m_xMSFactory->createInstance(::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")) );
+               OSL_ENSURE( xInstance.is(), "failed to create instance" );
+
         OConnection* pCon = 
reinterpret_cast<OConnection*>((*s_pCreationFunc)(this));
                xCon = pCon;    // important here because otherwise the 
connection could be deleted inside (refcount goes -> 0)
                pCon->construct(url,info);                              // late 
constructor call which can throw exception and allows a correct dtor call when 
so
                m_xConnections.push_back(WeakReferenceHelper(*pCon));
+
        }
        else
        {
@@ -260,6 +264,8 @@
 
        if ( aAddrbookScheme.compareToAscii( 
MozabDriver::getSDBC_SCHEME_MOZILLA() ) == 0 )
                return Mozilla;
+       if ( aAddrbookScheme.compareToAscii( 
MozabDriver::getSDBC_SCHEME_THUNDERBIRD() ) == 0 )
+               return ThunderBird;
        if ( aAddrbookScheme.compareToAscii( MozabDriver::getSDBC_SCHEME_LDAP() 
) == 0 )
                return LDAP;
 
@@ -278,6 +284,12 @@
 {
        static sal_Char*    SDBC_SCHEME_MOZILLA                 = 
MOZAB_MOZILLA_SCHEMA;
        return SDBC_SCHEME_MOZILLA;
+}
+// 
-----------------------------------------------------------------------------
+const sal_Char* MozabDriver::getSDBC_SCHEME_THUNDERBIRD()
+{
+       static sal_Char*    SDBC_SCHEME_THUNDERBIRD                     = 
MOZAB_THUNDERBIRD_SCHEMA;
+       return SDBC_SCHEME_THUNDERBIRD;
 }
 // 
-----------------------------------------------------------------------------
 const sal_Char* MozabDriver::getSDBC_SCHEME_LDAP()




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to