User: hr      
Date: 06/04/19 06:18:43

Modified:
 /dba/dbaccess/source/core/dataaccess/
  databasedocument.cxx

Log:
 INTEGRATION: CWS oj17 (1.25.22); FILE MERGED
 2006/04/10 07:30:14 oj 1.25.22.4: RESYNC: (1.25-1.26); FILE MERGED
 2006/03/20 11:32:01 oj 1.25.22.3: #133634# do not dispose command definitions 
in database document
 2006/03/16 10:36:56 oj 1.25.22.2: #i63113# clear weak reference as well
 2006/03/09 06:24:15 oj 1.25.22.1: #i60290# remove globalevent broadcaster

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.26&r2=1.27
Delta lines:  +11 -42
---------------------
--- databasedocument.cxx        29 Mar 2006 12:33:47 -0000      1.26
+++ databasedocument.cxx        19 Apr 2006 13:18:41 -0000      1.27
@@ -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();
@@ -716,18 +705,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 )
@@ -1071,21 +1057,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&)
@@ -1119,13 +1091,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]

Reply via email to