Tag: cws_src680_hsqldb4 User: fs Date: 05/03/31 03:52:19 Modified: /dba/connectivity/source/drivers/hsqldb/ HDriver.cxx
Log: #i41785# (patch supplied by OJ) SDBCX driver 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.9.4.1&r2=1.9.4.2 Delta lines: +26 -6 -------------------- --- HDriver.cxx 31 Mar 2005 09:16:53 -0000 1.9.4.1 +++ HDriver.cxx 31 Mar 2005 11:52:16 -0000 1.9.4.2 @@ -2,9 +2,9 @@ * * $RCSfile: HDriver.cxx,v $ * - * $Revision: 1.9.4.1 $ + * $Revision: 1.9.4.2 $ * - * last change: $Author: fs $ $Date: 2005/03/31 09:16:53 $ + * last change: $Author: fs $ $Date: 2005/03/31 11:52:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -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]
