Tag: cws_src680_dba24c User: fs Date: 2007-10-22 21:00:44+0000 Modified: dba/dbaccess/source/core/dataaccess/databasedocument.cxx
Log: during #i73705# #i52527#: ODatabaseModelImpl::m_aContainer not publicly accessible anymore / some other small refactoring 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.34.4.2&r2=1.34.4.3 Delta lines: +11 -13 --------------------- --- databasedocument.cxx 2007-10-22 10:27:19+0000 1.34.4.2 +++ databasedocument.cxx 2007-10-22 21:00:41+0000 1.34.4.3 @@ -4,9 +4,9 @@ * * $RCSfile: databasedocument.cxx,v $ * - * $Revision: 1.34.4.2 $ + * $Revision: 1.34.4.3 $ * - * last change: $Author: fs $ $Date: 2007/10/22 10:27:19 $ + * last change: $Author: fs $ $Date: 2007/10/22 21:00:41 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -259,6 +259,7 @@ } catch(const Exception&) { + DBG_UNHANDLED_EXCEPTION(); m_pImpl->m_xStorage = NULL; } @@ -357,10 +358,7 @@ // For now, as long as we do not have own macros, but only those in the embedded // forms/reports, it's sufficient to do the check here. // - ::comphelper::NamedValueCollection aArgs( m_pImpl->m_aArgs ); - Reference< XInteractionHandler > xInteraction; - xInteraction = aArgs.getOrDefault( "InteractionHandler", xInteraction ); - m_pImpl->m_aMacroMode.checkMacrosOnLoading( xInteraction ); + m_pImpl->checkMacrosOnLoading(); } } // ----------------------------------------------------------------------------- @@ -379,6 +377,11 @@ if ( m_aControllers.empty() ) { + // reset the macro mode: in case the our impl struct stays alive (e.g. because our DataSource + // object still exists), and somebody subsequently re-opens the document, we want to have + // the security warning, again. + m_pImpl->resetMacroExecutionMode(); + // if this was the last view, close the document as a whole // #i51157# / 2006-03-16 / [EMAIL PROTECTED] try @@ -768,13 +771,8 @@ Reference< XNameAccess > xContainer = rContainerRef; if ( !xContainer.is() ) { - if ( !m_pImpl->m_aContainer[ _eType ].get() ) - { - m_pImpl->m_aContainer[ _eType ] = TContentPtr( new ODefinitionContainer_Impl ); - m_pImpl->m_aContainer[ _eType ]->m_pDataSource = m_pImpl.get(); - m_pImpl->m_aContainer[ _eType ]->m_aProps.aTitle = ::rtl::OUString::createFromAscii( bFormsContainer ? "forms" : "reports" ); - } - rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_xServiceFactory, *this, m_pImpl->m_aContainer[ _eType ], bFormsContainer ); + TContentPtr& rContainerData( m_pImpl->getObjectContainer( _eType ) ); + rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_xServiceFactory, *this, rContainerData, bFormsContainer ); impl_reparent_nothrow( xContainer ); } return xContainer; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
