Tag: cws_dev300_dba30b User: fs Date: 2008-03-17 09:27:19+0000 Modified: dba/dbaccess/source/core/dataaccess/databasecontext.cxx
Log: #i85010# provide an interaction handler and macro execution mode when newly-creating a database document File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: databasecontext.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasecontext.cxx?r1=1.38&r2=1.38.4.1 Delta lines: +9 -7 ------------------- --- databasecontext.cxx 2008-03-06 17:57:46+0000 1.38 +++ databasecontext.cxx 2008-03-17 09:27:17+0000 1.38.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: databasecontext.cxx,v $ * - * $Revision: 1.38 $ + * $Revision: 1.38.4.1 $ * - * last change: $Author: kz $ $Date: 2008/03/06 17:57:46 $ + * last change: $Author: fs $ $Date: 2008/03/17 09:27:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -58,6 +58,7 @@ #include <com/sun/star/task/InteractionClassification.hpp> #include <com/sun/star/ucb/InteractiveIOException.hpp> #include <com/sun/star/ucb/IOErrorCode.hpp> +#include <com/sun/star/document/MacroExecMode.hpp> /** === end UNO includes === **/ #include <basic/basmgr.hxx> @@ -338,14 +339,15 @@ { pExistent.set( new ODatabaseModelImpl( _rName, m_aContext.getLegacyServiceFactory(), this ) ); - Sequence< PropertyValue > aArgs(1); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")); - aArgs[0].Value <<= _sURL; + ::comphelper::NamedValueCollection aArgs; + aArgs.put( "FileName", _sURL ); + aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG ); + aArgs.put( "InteractionHandler", m_aContext.createComponent( "com.sun.star.sdb.InteractionHandler" ) ); Reference< XModel > xModel = pExistent->createNewModel_deliverOwnership(); DBG_ASSERT( xModel.is(), "ODatabaseContext::loadObjectFromURL: no model?" ); // calls registerPrivate in attachResource - xModel->attachResource( _sURL, aArgs ); + xModel->attachResource( _sURL, aArgs.getPropertyValues() ); ::utl::CloseableComponent aEnsureClose( xModel ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
