Tag: cws_src680_oj17 User: oj Date: 06/03/20 03:32:11 Modified: /dba/dbaccess/source/core/dataaccess/ databasedocument.cxx, databasedocument.hxx, datasource.cxx
Log: #133634# do not dispose command definitions in database document 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.25.22.2&r2=1.25.22.3 Delta lines: +9 -11 -------------------- --- databasedocument.cxx 16 Mar 2006 10:36:56 -0000 1.25.22.2 +++ databasedocument.cxx 20 Mar 2006 11:32:01 -0000 1.25.22.3 @@ -4,9 +4,9 @@ * * $RCSfile: databasedocument.cxx,v $ * - * $Revision: 1.25.22.2 $ + * $Revision: 1.25.22.3 $ * - * last change: $Author: oj $ $Date: 2006/03/16 10:36:56 $ + * last change: $Author: oj $ $Date: 2006/03/20 11:32:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -240,10 +240,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(); @@ -667,7 +667,7 @@ xChild->setParent( *this ); } // ----------------------------------------------------------------------------- -void ODatabaseDocument::impl_clearObjectContainer( WeakReference< XNameAccess >& _rxContainer) +void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxContainer) { Reference< XNameAccess > xContainer = _rxContainer; ::comphelper::disposeComponent( xContainer ); @@ -1056,10 +1056,8 @@ m_xUIConfigurationManager = NULL; - 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); m_pImpl->modelIsDisposing( ODatabaseModelImpl::ResetModelAccess() ); } File [changed]: databasedocument.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.hxx?r1=1.8.22.2&r2=1.8.22.3 Delta lines: +14 -14 --------------------- --- databasedocument.hxx 16 Mar 2006 10:36:57 -0000 1.8.22.2 +++ databasedocument.hxx 20 Mar 2006 11:32:01 -0000 1.8.22.3 @@ -4,9 +4,9 @@ * * $RCSfile: databasedocument.hxx,v $ * - * $Revision: 1.8.22.2 $ + * $Revision: 1.8.22.3 $ * - * last change: $Author: oj $ $Date: 2006/03/16 10:36:57 $ + * last change: $Author: oj $ $Date: 2006/03/20 11:32:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -304,6 +304,18 @@ // XOfficeDatabaseDocument virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > SAL_CALL getDataSource() throw (::com::sun::star::uno::RuntimeException); + /** clears the given object container + + Clearing is done via disposal - the method calls XComponent::dispose at the given object, + which must be one of our impl's or our object containers (m_xForms, m_xReports, + m_xTableDefinitions, m_xCommandDefinitions) + + @param _rxContainer + the container to clear + */ + static void clearObjectContainer( + ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess >& _rxContainer); + private: /** closes the frames of all connected controllers @@ -322,18 +334,6 @@ object containers (m_xForms, m_xReports, m_xTableDefinitions, m_xCommandDefinitions) */ void impl_reparent_nothrow( const ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess >& _rxContainer ); - - /** clears the given object container - - Clearing is done via disposal - the method calls XComponent::dispose at the given object, - which must be one of our impl's or our object containers (m_xForms, m_xReports, - m_xTableDefinitions, m_xCommandDefinitions) - - @param _rxContainer - the container to clear - */ - void impl_clearObjectContainer( - ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess >& _rxContainer); /** retrieves the forms or reports contained, creates and initializes it, if necessary File [changed]: datasource.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.66&r2=1.66.32.1 Delta lines: +6 -3 ------------------- --- datasource.cxx 25 Jan 2006 13:44:20 -0000 1.66 +++ datasource.cxx 20 Mar 2006 11:32:02 -0000 1.66.32.1 @@ -4,9 +4,9 @@ * * $RCSfile: datasource.cxx,v $ * - * $Revision: 1.66 $ + * $Revision: 1.66.32.1 $ * - * last change: $Author: hr $ $Date: 2006/01/25 13:44:20 $ + * last change: $Author: oj $ $Date: 2006/03/20 11:32:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -752,6 +752,9 @@ EventObject aDisposeEvent(static_cast<XWeak*>(this)); m_aFlushListeners.disposeAndClear( aDisposeEvent ); + + ODatabaseDocument::clearObjectContainer(m_pImpl->m_xCommandDefinitions); + ODatabaseDocument::clearObjectContainer(m_pImpl->m_xTableDefinitions); m_pImpl.clear(); } //------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
