User: obo     
Date: 05/12/21 05:35:08

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

Log:
 INTEGRATION: CWS dba202a (1.6.26); FILE MERGED
 2005/11/28 10:50:53 fs 1.6.26.2: #126702# improve the previous fix:
 don't crash if components are destroyed in "wrong" order
 keep mutex alive as long as at least one of 
DataSource/DatabaseDocument/ModelImpl is alive
 2005/11/25 13:37:22 fs 1.6.26.1: #126702# DatabaseDocument and DataSource 
share a common mutex instances now (held by ModelImpl) / 
DatabaseDocument::clearConnections more tolerant against re-entrance

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: databasedocument.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.hxx?r1=1.6&r2=1.7
Delta lines:  +17 -5
--------------------
--- databasedocument.hxx        23 Sep 2005 12:05:10 -0000      1.6
+++ databasedocument.hxx        21 Dec 2005 13:35:05 -0000      1.7
@@ -108,7 +108,7 @@
                             //,        
::com::sun::star::document::XStorageBasedDocument
                                                        >       
ODatabaseDocument_OfficeDocument; 
 
-class ODatabaseDocument        : public ::comphelper::OBaseMutex
+class ODatabaseDocument        :public ModelDependentComponent             // 
ModelDependentComponent must be first!
                          ,public ODatabaseDocument_OfficeDocument
 {
     ::com::sun::star::uno::Reference< 
::com::sun::star::ui::XUIConfigurationManager>   m_xUIConfigurationManager;
@@ -117,7 +117,6 @@
     ::cppu::OInterfaceContainerHelper                                  
m_aModifyListeners;
        ::cppu::OInterfaceContainerHelper                                       
m_aCloseListener;
     ::cppu::OInterfaceContainerHelper                                  
m_aDocEventListeners;
-    ::rtl::Reference<ODatabaseModelImpl>                m_pImpl;
     sal_Bool                                            m_bCommitMasterStorage;
 
        void setMeAsParent(const ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess >& _xName);
@@ -142,8 +141,18 @@
             OnSaveDone   => "Save" ended
             OnSaveAsDone   => "SaveAs" ended
             OnModifyChanged   => modified/unmodified 
+        @param _rClearForNotify
+            a guard to our mutex, which will be cleared (i.e. the mutex 
released) immediately before
+            the notification happens
     */
-    void notifyEvent(const ::rtl::OUString& _sEventName);
+    void impl_notifyEvent( const ::rtl::OUString& _sEventName, 
::osl::ClearableMutexGuard& _rClearForNotify );
+
+    /** notifies the global event broadcaster
+    */
+    inline void impl_notifyEvent( const sal_Char* _pAsciiEventName, 
::osl::ClearableMutexGuard& _rClearForNotify  )
+    {
+        impl_notifyEvent( ::rtl::OUString::createFromAscii( _pAsciiEventName 
), _rClearForNotify );
+    }
 
     /// write a single XML stream into the package
        sal_Bool WriteThroughComponent(
@@ -187,6 +196,9 @@
                                        , const 
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& 
_xStorageToSaveTo);
 
 
+    // ModelDependentComponent overridables
+    virtual ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > getThis();
+
 private:
        ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl);
     // Do NOT create those documents directly, always use 
ODatabaseModelImpl::getModel. Reason is that




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to