Tag: mws_ooo300 User: kz Date: 2008-09-30 12:15:47+0000 Modified: dba/dbaccess/source/core/dataaccess/ContentHelper.cxx
Log: INTEGRATION: CWS dba30y (1.12.96); FILE MERGED 2008/09/30 07:17:19 fs 1.12.96.1: #i94433# prevent disposals during rename File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: ContentHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ContentHelper.cxx?r1=1.12&r2=1.12.64.1 Delta lines: +32 -0 -------------------- --- ContentHelper.cxx 2008-04-10 12:38:00+0000 1.12 +++ ContentHelper.cxx 2008-09-30 12:15:44+0000 1.12.64.1 @@ -118,6 +118,7 @@ ,m_aErrorHelper( m_aContext ) ,m_pImpl(_pImpl) ,m_nCommandId(0) + ,m_bRenaming( false ) { } //-------------------------------------------------------------------------- @@ -667,6 +668,35 @@ ::osl::MutexGuard aGuard(m_aMutex); m_xParentContainer = _xParent; } + +// ----------------------------------------------------------------------------- +void SAL_CALL OContentHelper::dispose( ) throw (::com::sun::star::uno::RuntimeException) +{ + if ( m_bRenaming ) + return; + OContentHelper_COMPBASE::dispose(); +} + +// ----------------------------------------------------------------------------- +namespace +{ + class FlagGuard + { + public: + FlagGuard( bool& _rFlag ) + :m_rFlag( _rFlag ) + { + m_rFlag = true; + } + ~FlagGuard() + { + m_rFlag = false; + } + private: + bool& m_rFlag; + }; +} + // ----------------------------------------------------------------------------- void SAL_CALL OContentHelper::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException) { @@ -682,6 +712,8 @@ try { + FlagGuard aPreventDispose( m_bRenaming ); + if ( xNameCont->hasByName(m_pImpl->m_aProps.aTitle) ) xNameCont->removeByName(m_pImpl->m_aProps.aTitle); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]