Tag: cws_src680_dba24 User: oj Date: 05/02/25 02:29:49 Modified: /dba/dbaccess/source/core/dataaccess/ datasource.cxx
Log: #i42460# check impl File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: datasource.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.53.2.7&r2=1.53.2.8 Delta lines: +16 -9 -------------------- --- datasource.cxx 23 Feb 2005 13:23:10 -0000 1.53.2.7 +++ datasource.cxx 25 Feb 2005 10:29:46 -0000 1.53.2.8 @@ -2,9 +2,9 @@ * * $RCSfile: datasource.cxx,v $ * - * $Revision: 1.53.2.7 $ + * $Revision: 1.53.2.8 $ * - * last change: $Author: oj $ $Date: 2005/02/23 13:23:10 $ + * last change: $Author: oj $ $Date: 2005/02/25 10:29:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -610,6 +610,7 @@ // ----------------------------------------------------------------------------- void SAL_CALL ODatabaseSource::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException) { + if ( m_pImpl.is() ) m_pImpl->disposing(Source); } // XServiceInfo @@ -652,10 +653,9 @@ OSubComponent::disposing(); OPropertySetHelper::disposing(); - MutexGuard aGuard(m_aMutex); - EventObject aDisposeEvent(static_cast<XWeak*>(this)); m_aFlushListeners.disposeAndClear( aDisposeEvent ); + m_pImpl.clear(); } //------------------------------------------------------------------------------ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::OUString& _rUid, const ::rtl::OUString& _rPwd) @@ -940,6 +940,7 @@ //------------------------------------------------------------------------------ void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, RuntimeException ) { + ::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed); MutexGuard aGuard(m_aMutex); m_pImpl->m_nLoginTimeout = seconds; } @@ -947,6 +948,7 @@ //------------------------------------------------------------------------------ sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeException ) { + ::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed); return m_pImpl->m_nLoginTimeout; } @@ -1109,6 +1111,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed); Reference< XNameAccess > xContainer = m_pImpl->m_xCommandDefinitions; if ( !xContainer.is() ) { @@ -1145,6 +1148,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException ) { MutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed); Reference< XNameAccess > xContainer = m_pImpl->m_xTableDefinitions; if ( !xContainer.is() ) { @@ -1188,23 +1192,26 @@ // ----------------------------------------------------------------------------- void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& Event ) throw (RuntimeException) { + if ( m_pImpl.is() ) m_pImpl->setModified(sal_True); } // ----------------------------------------------------------------------------- void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& Event ) throw (RuntimeException) { + if ( m_pImpl.is() ) m_pImpl->setModified(sal_True); } // ----------------------------------------------------------------------------- void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& Event ) throw (RuntimeException) { + if ( m_pImpl.is() ) m_pImpl->setModified(sal_True); } // ----------------------------------------------------------------------------- // XDocumentDataSource Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocument() throw (RuntimeException) { - return Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >(m_pImpl->getModel(),UNO_QUERY); + return m_pImpl.is() ? Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >(m_pImpl->getModel(),UNO_QUERY) : Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >(); } // ----------------------------------------------------------------------------- //........................................................................ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
