Tag: cws_src680_fwk29 User: fs Date: 06/01/12 00:16:39 Modified: /dba/dbaccess/source/core/dataaccess/ databasedocument.hxx
Log: #i60398# better defined ownership of m_xForms/m_xReports: now owned by the model exclusively, properly parented all the time, and properly disposed when document is closing 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.7&r2=1.7.6.1 Delta lines: +44 -9 -------------------- --- databasedocument.hxx 21 Dec 2005 13:35:05 -0000 1.7 +++ databasedocument.hxx 12 Jan 2006 08:16:36 -0000 1.7.6.1 @@ -4,9 +4,9 @@ * * $RCSfile: databasedocument.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.7.6.1 $ * - * last change: $Author: obo $ $Date: 2005/12/21 13:35:05 $ + * last change: $Author: fs $ $Date: 2006/01/12 08:16:36 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -119,6 +119,9 @@ ::cppu::OInterfaceContainerHelper m_aDocEventListeners; sal_Bool m_bCommitMasterStorage; + ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > m_xForms; + ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > m_xReports; + void setMeAsParent(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xName); /** stores the model @@ -306,10 +309,42 @@ determines if the ownership should be transfered to the component which possibly vetos the closing - @throws ::com::sun::star::util::CloseVetoException + @raises ::com::sun::star::util::CloseVetoException if the closing was vetoed by any instance */ void impl_closeControllerFrames( sal_Bool _bDeliverOwnership ); + + /** does a reparenting at the given object container to ourself + + Calls XChild::setParent at the given object, which must be one of our impl's or our + 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 + @param _bResetAndRelease + <TRUE/> if and only if the given container should also be reset and release. + */ + void impl_clearObjectContainer( + ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess >& _rxContainer, + bool _bResetAndRelease = false ); + + /** retrieves the forms or reports contained, creates and initializes it, if necessary + + @raises DisposedException + if the instance is already disposed + @raises IllegalArgumentException + if <arg>_eType</arg> is not ODatabaseModelImpl::E_FORM and not ODatabaseModelImpl::E_REPORT + */ + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > + impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType ); }; //........................................................................ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
