Tag: cws_src680_dba201 User: oj Date: 05/05/31 00:55:38 Modified: /dba/dbaccess/source/core/dataaccess/ databasedocument.cxx
Log: RESYNC: (1.17-1.19); FILE MERGED 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.17.6.2&r2=1.17.6.3 Delta lines: +30 -1 -------------------- --- databasedocument.cxx 9 May 2005 12:50:54 -0000 1.17.6.2 +++ databasedocument.cxx 31 May 2005 07:55:35 -0000 1.17.6.3 @@ -70,6 +70,7 @@ #ifndef _COMPHELPER_GUARDING_HXX_ #include <comphelper/guarding.hxx> #endif +#include <comphelper/documentconstants.hxx> #ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_ #include <com/sun/star/embed/XTransactedObject.hpp> #endif @@ -218,6 +219,19 @@ { OSL_ENSURE(0,"Could not create GlobalEventBroadcaster!"); } + Reference<XChild> xChild(m_pImpl->m_xForms.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(static_cast<OWeakObject*>(this)); + + xChild.set(m_pImpl->m_xReports.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(static_cast<OWeakObject*>(this)); + xChild.set(m_pImpl->m_xTableDefinitions.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(static_cast<OWeakObject*>(this)); + xChild.set(m_pImpl->m_xCommandDefinitions.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(static_cast<OWeakObject*>(this)); } //-------------------------------------------------------------------------- ODatabaseDocument::~ODatabaseDocument() @@ -952,7 +966,7 @@ { static const ::rtl::OUString sPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); Any aAny; - aAny <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.base") ); + aAny <<= MIMETYPE_OASIS_OPENDOCUMENT_DATABASE; xProp->setPropertyValue( sPropName, aAny ); } @@ -1100,6 +1114,7 @@ //------------------------------------------------------------------------------ void ODatabaseDocument::disposing() { + Reference<XInterface> xHold = m_pImpl->m_xModel; { notifyEvent(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnUnload"))); @@ -1125,6 +1140,20 @@ if ( xComp.is() ) xComp->removeEventListener( static_cast< XTransactionListener* >( this ) ); } + + Reference<XChild> xChild(m_pImpl->m_xForms.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(NULL); + + xChild.set(m_pImpl->m_xReports.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(NULL); + xChild.set(m_pImpl->m_xTableDefinitions.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(NULL); + xChild.set(m_pImpl->m_xCommandDefinitions.get(),UNO_QUERY); + if ( xChild.is() ) + xChild->setParent(NULL); m_pImpl->m_xModel.clear(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
