Tag: cws_src680_dba24a
User: oj      
Date: 2007-08-29 13:21:42+0000
Modified:
   dba/dbaccess/source/core/dataaccess/databasedocument.cxx
   dba/dbaccess/source/core/dataaccess/databasedocument.hxx

Log:
 #i69084# lock and release mutex

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.33&r2=1.33.6.1
Delta lines:  +17 -11
---------------------
--- databasedocument.cxx        2007-07-24 12:04:32+0000        1.33
+++ databasedocument.cxx        2007-08-29 13:21:39+0000        1.33.6.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: databasedocument.cxx,v $
  *
- *  $Revision: 1.33 $
+ *  $Revision: 1.33.6.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/24 12:04:32 $
+ *  last change: $Author: oj $ $Date: 2007/08/29 13:21:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -456,7 +456,7 @@
     OSL_ENSURE(m_pImpl.is(),"Impl is NULL");
 
     if ( m_pImpl->m_sFileURL == m_pImpl->m_sRealFileURL )
-           store( m_pImpl->m_sFileURL, m_pImpl->m_aArgs );
+           store( m_pImpl->m_sFileURL, m_pImpl->m_aArgs ,aGuard);
     else
         storeAsURL( m_pImpl->m_sRealFileURL, m_pImpl->m_aArgs );
 
@@ -464,7 +464,8 @@
 }
 // 
-----------------------------------------------------------------------------
 void ODatabaseDocument::store(const ::rtl::OUString& _rURL
-                                                        ,const Sequence< 
PropertyValue >& _rArguments)
+                                                        ,const Sequence< 
PropertyValue >& _rArguments
+                             ,ModelMethodGuard& _rGuard)
 {
     OSL_ENSURE(m_pImpl.is(),"Impl is NULL");
        if ( m_pImpl->m_bDocumentReadOnly )
@@ -485,7 +486,7 @@
 
     m_pImpl->commitRootStorage();
 
-    setModified(sal_False);
+    setModified( sal_False,_rGuard );
 }
 // 
-----------------------------------------------------------------------------
 void SAL_CALL ODatabaseDocument::storeAsURL( const ::rtl::OUString& _rURL, 
const Sequence< PropertyValue >& _rArguments ) throw (IOException, 
RuntimeException)
@@ -578,7 +579,7 @@
         m_pImpl->m_sRealFileURL = m_pImpl->m_sFileURL = _rURL;
        }
        lcl_stripLoadArguments( aDescriptor, m_pImpl->m_aArgs );
-       store(m_pImpl->m_sFileURL,_rArguments);
+       store(m_pImpl->m_sFileURL,_rArguments,aGuard);
 
     impl_notifyEvent( "OnSaveAsDone", aGuard );
 }
@@ -656,19 +657,24 @@
 void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw 
(PropertyVetoException, RuntimeException)
 {
     ModelMethodGuard aGuard( *this );
-
+    setModified( _bModified,aGuard );
+}
+// 
-----------------------------------------------------------------------------
+void ODatabaseDocument::setModified( sal_Bool _bModified,ModelMethodGuard& 
_rGuard )
+{
        if ( m_pImpl->m_bModified == _bModified )
         return;
 
     m_pImpl->m_bModified = _bModified;
        lang::EventObject aEvt( *this );
 
-    aGuard.clear();
+    _rGuard.clear();
     m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvt );
 
-    aGuard.reset();
-    impl_notifyEvent( "OnModifyChanged", aGuard );
+    _rGuard.reset();
+    impl_notifyEvent( "OnModifyChanged", _rGuard );
 }
+// 
-----------------------------------------------------------------------------
 
 // ::com::sun::star::document::XEventBroadcaster
 void SAL_CALL ODatabaseDocument::addEventListener(const css::uno::Reference< 
css::document::XEventListener >& _xListener ) throw (css::uno::RuntimeException)

File [changed]: databasedocument.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.hxx?r1=1.13&r2=1.13.6.1
Delta lines:  +14 -4
--------------------
--- databasedocument.hxx        2007-07-24 12:04:48+0000        1.13
+++ databasedocument.hxx        2007-08-29 13:21:39+0000        1.13.6.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: databasedocument.hxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.13.6.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/24 12:04:48 $
+ *  last change: $Author: oj $ $Date: 2007/08/29 13:21:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -138,9 +138,12 @@
                        The media descriptor
                @param  _xStorageToSaveTo
                        The storage which should be used for saving
+        @param  _rGuard
+            The gurad will be clear before notifying
        */
        void store(const ::rtl::OUString& sURL
-                        , const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue>& lArguments);
+                        , const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue>& lArguments
+             ,ModelMethodGuard& _rGuard);
 
     /** notifies the global event broadcaster
         @param  _sEventName
@@ -359,6 +362,13 @@
     */
     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess 
>
             impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType 
_eType );
+
+    /** clears the guard before notifying.
+    *
+    * \param _bModified 
+    * \param _rGuard 
+    */
+    void setModified( sal_Bool _bModified,ModelMethodGuard& _rGuard );
 };
 
 //........................................................................




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

Reply via email to