User: vg Date: 2008-04-15 10:22:37+0000 Modified: dba/dbaccess/source/core/dataaccess/ModelImpl.cxx
Log: INTEGRATION: CWS mav31 (1.25.20); FILE MERGED 2008/04/09 10:19:20 mav 1.25.20.1: #i87197# fix the crash/deadlock File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: ModelImpl.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ModelImpl.cxx?r1=1.26&r2=1.27 Delta lines: +5 -4 ------------------- --- ModelImpl.cxx 2008-04-10 12:39:03+0000 1.26 +++ ModelImpl.cxx 2008-04-15 10:22:34+0000 1.27 @@ -1149,7 +1149,7 @@ // ----------------------------------------------------------------------------- namespace { - void lcl_modifyListening( ::osl::Mutex& _rMutex, ::sfx2::IModifiableDocument& _rDocument, + void lcl_modifyListening( ::sfx2::IModifiableDocument& _rDocument, const Reference< XStorage >& _rxStorage, ::rtl::Reference< ::sfx2::DocumentStorageModifyListener >& _inout_rListener, bool _bListen ) { @@ -1169,7 +1169,8 @@ if ( xModify.is() && _bListen ) { - _inout_rListener = new ::sfx2::DocumentStorageModifyListener( _rMutex, _rDocument ); + // the listener from sfx2 uses SolarMutex internally + _inout_rListener = new ::sfx2::DocumentStorageModifyListener( _rDocument ); xModify->addModifyListener( _inout_rListener.get() ); } } @@ -1179,13 +1180,13 @@ Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const Reference< XStorage >& _rxNewRootStorage ) { // stop listening for modifications at the old storage - lcl_modifyListening( m_xMutex->getMutex(), *this, m_xDocumentStorage.getTyped(), m_pStorageModifyListener, false ); + lcl_modifyListening( *this, m_xDocumentStorage.getTyped(), m_pStorageModifyListener, false ); // set new storage m_xDocumentStorage.reset( _rxNewRootStorage, SharedStorage::TakeOwnership ); // start listening for modifications - lcl_modifyListening( m_xMutex->getMutex(), *this, m_xDocumentStorage.getTyped(), m_pStorageModifyListener, true ); + lcl_modifyListening( *this, m_xDocumentStorage.getTyped(), m_pStorageModifyListener, true ); // forward new storage to Basic and Dialog library containers if ( m_xBasicLibraries.is() ) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
