User: hr      
Date: 05/04/06 03:35:13

Modified:
 /dba/connectivity/source/drivers/hsqldb/
  HDriver.cxx

Log:
 INTEGRATION: CWS hsqldb4 (1.9.4); FILE MERGED
 2005/03/31 12:23:02 fs 1.9.4.3: #i10000#
 2005/03/31 11:52:16 fs 1.9.4.2: #i41785# (patch supplied by OJ) SDBCX driver
 2005/03/31 09:16:53 fs 1.9.4.1: pseudo-resync to m90, which is not ready yet 
(and thus not available to real resync)

File Changes:

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

File [changed]: HDriver.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HDriver.cxx?r1=1.10&r2=1.11
Delta lines:  +24 -4
--------------------
--- HDriver.cxx 30 Mar 2005 11:51:22 -0000      1.10
+++ HDriver.cxx 6 Apr 2005 10:35:10 -0000       1.11
@@ -58,6 +58,7 @@
  *
  *
  ************************************************************************/
+
 #ifndef CONNECTIVITY_HSQLDB_DRIVER_HXX
 #include "hsqldb/HDriver.hxx"
 #endif
@@ -102,6 +103,9 @@
 #ifndef CONNECTIVITY_HSQLDB_TERMINATELISTENER_HXX
 #include "HTerminateListener.hxx"
 #endif
+#ifndef CONNECTIVITY_HSQLDB_CATALOG_HXX
+#include "hsqldb/HCatalog.hxx"
+#endif
 #ifndef _RTL_USTRBUF_HXX_
 #include <rtl/ustrbuf.hxx>
 #endif
@@ -313,7 +317,7 @@
                        }
                     Reference< XComponent> xIfc = new 
OConnectionWeakWrapper(xOrig,m_xFactory);
                                    xConnection.set(xIfc,UNO_QUERY);
-                    
m_aConnections.push_back(TWeakPair(WeakReferenceHelper(xOrig),TWeakConnectionPair(sKey,WeakReferenceHelper(xConnection))));
+                    
m_aConnections.push_back(TWeakPair(WeakReferenceHelper(xOrig),TWeakConnectionPair(sKey,TWeakRefPair(WeakReferenceHelper(xConnection),WeakReferenceHelper()))));
 
                     Reference<XTransactionBroadcaster> 
xBroad(xStorage,UNO_QUERY);
                     if ( xBroad.is() )
@@ -386,6 +390,22 @@
                checkDisposed(ODriverDelegator_BASE::rBHelper.bDisposed);
 
                Reference< XTablesSupplier > xTab;
+
+        TWeakPairVector::iterator aEnd = m_aConnections.end();
+               for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd 
!= i; ++i)
+               {
+                       if ( i->second.second.first.get() == connection.get() )
+                       {
+                               xTab = Reference< XTablesSupplier 
>(i->second.second.second.get().get(),UNO_QUERY);
+                               if ( !xTab.is() )
+                               {
+                                       xTab = new OHCatalog(connection);
+                                       i->second.second.second = 
WeakReferenceHelper(xTab);
+                               }
+                               break;
+                       }
+               }
+
                return xTab;
        }
 
@@ -408,9 +428,9 @@
        
//------------------------------------------------------------------------------
        Sequence< ::rtl::OUString > 
ODriverDelegator::getSupportedServiceNames_Static(  ) throw (RuntimeException)
        {
-               Sequence< ::rtl::OUString > aSNS( 1 );
+               Sequence< ::rtl::OUString > aSNS( 2 );
                aSNS[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver"));
-               //      aSNS[1] = 
::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver");
+               aSNS[1] = 
::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver");
                return aSNS;
        }
        //------------------------------------------------------------------




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

Reply via email to