Tag: cws_src680_warnings01 User: sb Date: 06/05/23 16:44:35 Modified: /dba/dbaccess/source/core/dataaccess/ databasedocument.cxx
Log: RESYNC: (1.26-1.28); FILE MERGED File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: databasedocument.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.cxx?r1=1.24.22.2&r2=1.24.22.3 Delta lines: +12 -43 --------------------- --- databasedocument.cxx 7 Apr 2006 20:47:01 -0000 1.24.22.2 +++ databasedocument.cxx 23 May 2006 23:44:32 -0000 1.24.22.3 @@ -175,17 +175,6 @@ { DBG_CTOR(ODatabaseDocument,NULL); - // adjust our readonly flag - try - { - m_xDocEventBroadcaster.set(m_pImpl->m_xServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster"))), - UNO_QUERY); - } - catch(Exception) - { - OSL_ENSURE(0,"Could not create GlobalEventBroadcaster!"); - } - osl_incrementInterlockedCount( &m_refCount ); { impl_reparent_nothrow( m_xForms ); @@ -254,10 +243,10 @@ if ( m_pImpl->m_bOwnStorage ) ::comphelper::disposeComponent(m_pImpl->m_xStorage); - impl_clearObjectContainer( m_xForms ); - impl_clearObjectContainer( m_xReports ); - impl_clearObjectContainer( m_pImpl->m_xTableDefinitions ); - impl_clearObjectContainer( m_pImpl->m_xCommandDefinitions ); + clearObjectContainer( m_xForms); + clearObjectContainer( m_xReports); + clearObjectContainer( m_pImpl->m_xTableDefinitions); + clearObjectContainer( m_pImpl->m_xCommandDefinitions); m_pImpl->m_aContainer.clear(); m_pImpl->lateInit(); @@ -318,7 +307,7 @@ { return sal_False; } - if ( m_pImpl->m_pDBContext ) + if ( m_pImpl->m_pDBContext && m_pImpl->m_sRealFileURL.getLength() ) { m_pImpl->m_pDBContext->registerPrivate(m_pImpl->m_sRealFileURL,m_pImpl); m_pImpl->setModified(sal_False); @@ -719,18 +708,15 @@ xChild->setParent( *this ); } // ----------------------------------------------------------------------------- -void ODatabaseDocument::impl_clearObjectContainer( WeakReference< XNameAccess >& _rxContainer, bool _bResetAndRelease ) +void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxContainer) { Reference< XNameAccess > xContainer = _rxContainer; ::comphelper::disposeComponent( xContainer ); - if ( _bResetAndRelease ) - { Reference< XChild > xChild( _rxContainer.get(),UNO_QUERY ); if ( xChild.is() ) xChild->setParent( NULL ); _rxContainer = Reference< XNameAccess >(); - } } // ----------------------------------------------------------------------------- Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType ) @@ -1072,21 +1058,7 @@ try { css::document::EventObject aEvt(*this, _sEventName); - Reference< XEventListener > xDocEventBroadcaster; - /// TODO: this code has to be deleted after AS' cws will be integrated - try - { - xDocEventBroadcaster = xDocEventBroadcaster.query( m_pImpl->m_xServiceFactory->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.GlobalEventBroadcaster" ) ) ) ); - } - catch(Exception) - { - OSL_ENSURE(0,"Could not create GlobalEventBroadcaster!"); - } - _rGuard.clear(); - if ( xDocEventBroadcaster.is() ) - xDocEventBroadcaster->notifyEvent(aEvt); m_aDocEventListeners.notifyEach( &css::document::XEventListener::notifyEvent, aEvt ); } catch(Exception&) @@ -1120,13 +1092,10 @@ m_aCloseListener.disposeAndClear( aDisposeEvent ); m_aDocEventListeners.disposeAndClear( aDisposeEvent ); - m_xDocEventBroadcaster = NULL; m_xUIConfigurationManager = NULL; - impl_clearObjectContainer( m_xForms, true ); - impl_clearObjectContainer( m_xReports, true ); - impl_clearObjectContainer( m_pImpl->m_xTableDefinitions, true ); - impl_clearObjectContainer( m_pImpl->m_xCommandDefinitions, true ); + clearObjectContainer( m_xForms); + clearObjectContainer( m_xReports); m_pImpl->modelIsDisposing( ODatabaseModelImpl::ResetModelAccess() ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
