Tag: cws_src680_kaddrbook User: ebischoff Date: 05/09/02 08:22:55 Modified: /dba/connectivity/source/drivers/kab/ KResultSet.cxx, KResultSet.hxx
Log: Fixed statement ownership File Changes: Directory: /dba/connectivity/source/drivers/kab/ ================================================ File [changed]: KResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KResultSet.cxx?r1=1.1.2.5&r2=1.1.2.6 Delta lines: +13 -10 --------------------- --- KResultSet.cxx 2 Sep 2005 14:09:38 -0000 1.1.2.5 +++ KResultSet.cxx 2 Sep 2005 15:22:52 -0000 1.1.2.6 @@ -2,9 +2,9 @@ * * $RCSfile: KResultSet.cxx,v $ * - * $Revision: 1.1.2.5 $ + * $Revision: 1.1.2.6 $ * - * last change: $Author: ebischoff $ $Date: 2005/09/02 14:09:38 $ + * last change: $Author: ebischoff $ $Date: 2005/09/02 15:22:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,9 +100,8 @@ KabResultSet::KabResultSet(KabCommonStatement* pStmt) : KabResultSet_BASE(m_aMutex), OPropertySetHelper(KabResultSet_BASE::rBHelper), - m_aStatement((OWeakObject*) pStmt), + m_xStatement(pStmt), m_xMetaData(NULL), - m_pStatement(pStmt), m_aKabAddressees(), m_nRowPos(-1), m_bWasNull(sal_True) @@ -115,15 +114,19 @@ // ------------------------------------------------------------------------- void KabResultSet::allKabAddressees() { - KabConnection* pConnection = (KabConnection *) m_pStatement->getConnection().get(); + KabCommonStatement* pStatement = m_xStatement.get(); + KabConnection* pConnection = (KabConnection *) pStatement->getConnection().get(); + KABC::AddressBook* pAddressBook = pConnection->getAddressBook(); - m_aKabAddressees = pConnection->getAddressBook()->allAddressees(); + m_aKabAddressees = pAddressBook->allAddressees(); } // ------------------------------------------------------------------------- void KabResultSet::someKabAddressees(const KabCondition *pCondition) { - KabConnection* pConnection = (KabConnection *) m_pStatement->getConnection().get(); + KabCommonStatement* pStatement = m_xStatement.get(); + KabConnection* pConnection = (KabConnection *) pStatement->getConnection().get(); KABC::AddressBook* pAddressBook = pConnection->getAddressBook(); + KABC::AddressBook::Iterator iterator; for (iterator = pAddressBook->begin(); @@ -141,7 +144,7 @@ ::osl::MutexGuard aGuard(m_aMutex); - m_aStatement = NULL; + m_xStatement = NULL; m_xMetaData = NULL; } // ------------------------------------------------------------------------- @@ -283,7 +286,7 @@ checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); if (!m_xMetaData.is()) - m_xMetaData = new KabResultSetMetaData(m_pStatement->getOwnConnection()); + m_xMetaData = new KabResultSetMetaData(m_xStatement.get()->getOwnConnection()); return m_xMetaData; } @@ -526,7 +529,7 @@ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - return m_aStatement.get(); + return m_xStatement; } // ------------------------------------------------------------------------- sal_Bool SAL_CALL KabResultSet::rowDeleted() throw(SQLException, RuntimeException) File [changed]: KResultSet.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KResultSet.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +4 -6 ------------------- --- KResultSet.hxx 1 Sep 2005 17:11:31 -0000 1.1.2.2 +++ KResultSet.hxx 2 Sep 2005 15:22:52 -0000 1.1.2.3 @@ -2,9 +2,9 @@ * * $RCSfile: KResultSet.hxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: ebischoff $ $Date: 2005/09/01 17:11:31 $ + * last change: $Author: ebischoff $ $Date: 2005/09/02 15:22:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -118,10 +118,8 @@ public comphelper::OPropertyArrayUsageHelper<KabResultSet> { protected: - KabCommonStatement* m_pStatement; - ::com::sun::star::uno::WeakReferenceHelper m_aStatement; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> - m_xMetaData; + ::com::sun::star::uno::Reference< KabCommonStatement > m_xStatement; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query sal_Int32 m_nRowPos; sal_Bool m_bWasNull; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
