Tag: cws_src680_kaddrbook User: ebischoff Date: 05/09/01 22:07:21 Modified: /dba/connectivity/source/drivers/kab/ KConnection.cxx, KConnection.hxx, KDatabaseMetaData.cxx
Log: Simplifying File Changes: Directory: /dba/connectivity/source/drivers/kab/ ================================================ File [changed]: KConnection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KConnection.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +9 -14 -------------------- --- KConnection.cxx 2 Sep 2005 02:42:02 -0000 1.1.2.2 +++ KConnection.cxx 2 Sep 2005 05:07:18 -0000 1.1.2.3 @@ -1,8 +1,8 @@ /************************************************************************* * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: ebischoff $ $Date: 2005/09/02 02:42:02 $ + * last change: $Author: ebischoff $ $Date: 2005/09/02 05:07:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,10 +95,7 @@ OMetaConnection_BASE(m_aMutex), m_pAddressBook(NULL), m_pDriver(_pDriver), - m_bClosed(sal_False), - m_xMetaData(NULL), - m_bUseCatalog(sal_False), - m_bUseOldDateFormat(sal_False) + m_xMetaData(NULL) { m_pDriver->acquire(); } @@ -308,13 +305,6 @@ { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabConnection_BASE::rBHelper.bDisposed); - - if (m_pAddressBook != NULL) - { - m_pAddressBook->close(); - m_pAddressBook = NULL; - } - } dispose(); } @@ -344,7 +334,12 @@ } m_aStatements.clear(); - m_bClosed = sal_True; + if (m_pAddressBook != NULL) + { + m_pAddressBook->close(); + m_pAddressBook = NULL; + } + m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>(); dispose_ChildImpl(); File [changed]: KConnection.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KConnection.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +11 -30 --------------------- --- KConnection.hxx 2 Sep 2005 02:42:02 -0000 1.1.2.2 +++ KConnection.hxx 2 Sep 2005 05:07:18 -0000 1.1.2.3 @@ -2,9 +2,9 @@ * * $RCSfile: KConnection.hxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: ebischoff $ $Date: 2005/09/02 02:42:02 $ + * last change: $Author: ebischoff $ $Date: 2005/09/02 05:07:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,9 +71,6 @@ #ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_ #include "OSubComponent.hxx" #endif -#ifndef _CONNECTIVITY_OTYPEINFO_HXX_ -#include "OTypeInfo.hxx" -#endif #ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include "connectivity/CommonTools.hxx" #endif @@ -111,7 +108,6 @@ class KabDatabaseMetaData; typedef OMetaConnection_BASE KabConnection_BASE; // implements basics and text encoding - typedef ::std::vector< ::connectivity::OTypeInfo> TTypeInfoVector; typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray; class KabConnection : public comphelper::OBaseMutex, @@ -121,32 +117,19 @@ friend class OSubComponent<KabConnection, KabConnection_BASE>; protected: - - rtl_TextEncoding m_nTextEncoding; // the encoding which is used for all text conversions //==================================================================== // Data attributes //==================================================================== - TTypeInfoVector m_aTypeInfo; // vector containing an entry - // for each row returned by - // DatabaseMetaData.getTypeInfo. ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; - OWeakRefArray m_aStatements; // vector containing a list - // of all the Statement objects + OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects // for this Connection ::KABC::StdAddressBook* m_pAddressBook; // the address book - ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // last SQLWarning generated by an operation -// Some of these variables seem to be unnecessary. -// After programming, check which ones can be safely removed. KabDriver* m_pDriver; // pointer to the owning driver object ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog; // needed for the SQL interpreter - sal_Bool m_bClosed; - sal_Bool m_bUseCatalog; // should we use the catalog on filebased databases - sal_Bool m_bUseOldDateFormat; - public: virtual void construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException); @@ -194,10 +177,8 @@ // needed for the SQL interpreter ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL createCatalog(); - // should we use the catalog on filebased databases - inline sal_Bool isCatalogUsed() const { return m_bUseCatalog; } + // accessors inline KabDriver* getDriver() const { return m_pDriver;} - inline rtl_TextEncoding getTextEncoding() const { return m_nTextEncoding; } inline ::KABC::AddressBook* getAddressBook() const { return m_pAddressBook; } }; } File [changed]: KDatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KDatabaseMetaData.cxx?r1=1.1.2.1&r2=1.1.2.2 Delta lines: +9 -8 ------------------- --- KDatabaseMetaData.cxx 29 Aug 2005 08:43:49 -0000 1.1.2.1 +++ KDatabaseMetaData.cxx 2 Sep 2005 05:07:18 -0000 1.1.2.2 @@ -2,9 +2,9 @@ * * $RCSfile: KDatabaseMetaData.cxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: ebischoff $ $Date: 2005/08/29 08:43:49 $ + * last change: $Author: ebischoff $ $Date: 2005/09/02 05:07:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,6 +65,9 @@ #ifndef _CONNECTIVITY_FDATABASEMETADATARESULTSET_HXX_ #include "FDatabaseMetaDataResultSet.hxx" #endif +#ifndef _CONNECTIVITY_OTYPEINFO_HXX_ +#include "OTypeInfo.hxx" +#endif #ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_ #include <com/sun/star/sdbc/ColumnValue.hpp> @@ -84,12 +87,10 @@ m_bUseCatalog(sal_True) { OSL_ENSURE(m_pConnection,"KabDatabaseMetaData::KabDatabaseMetaData: No connection set!"); - if (!m_pConnection->isCatalogUsed()) - { + osl_incrementInterlockedCount( &m_refCount ); m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); osl_decrementInterlockedCount( &m_refCount ); - } } // ------------------------------------------------------------------------- KabDatabaseMetaData::~KabDatabaseMetaData() --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
