Tag: cws_ooh680_dba241d User: fs Date: 2008-05-05 13:07:58+0000 Modified: dba/dbaccess/source/core/dataaccess/databasecontext.cxx
Log: #i87741# when newly creating a database document to be loaded, then pass an interaction handler and a macro execution mode of USE_CONFIG 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.36.110.1&r2=1.36.110.1.20.1 Delta lines: +12 -7 -------------------- --- databasecontext.cxx 2008-01-18 15:38:58+0000 1.36.110.1 +++ databasecontext.cxx 2008-05-05 13:07:45+0000 1.36.110.1.20.1 @@ -4,9 +4,9 @@ * * $RCSfile: databasecontext.cxx,v $ * - * $Revision: 1.36.110.1 $ + * $Revision: 1.36.110.1.20.1 $ * - * last change: $Author: kz $ $Date: 2008/01/18 15:38:58 $ + * last change: $Author: fs $ $Date: 2008/05/05 13:07:45 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -83,6 +83,7 @@ #ifndef _COMPHELPER_ENUMHELPER_HXX_ #include <comphelper/enumhelper.hxx> #endif +#include <comphelper/namedvaluecollection.hxx> #ifndef UNOTOOLS_INC_SHAREDUNOCOMPONENT_HXX #include <unotools/sharedunocomponent.hxx> #endif @@ -110,6 +111,7 @@ #ifndef _COM_SUN_STAR_DOCUMENT_XFILTER_HPP_ #include <com/sun/star/document/XFilter.hpp> #endif +#include <com/sun/star/document/MacroExecMode.hpp> #ifndef _UNOTOOLS_CONFIGNODE_HXX_ #include <unotools/confignode.hxx> #endif @@ -380,14 +382,17 @@ ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( _rName, m_aContext.getLegacyServiceFactory(), this ) ); xExistent = pImpl->getDataSource().get(); - 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 = pImpl->createNewModel_deliverOwnership(); DBG_ASSERT( xModel.is(), "ODatabaseContext::loadObjectFromURL: no model?" ); // calls registerPrivate in attachResource - xModel->attachResource(_sURL,aArgs); + Sequence< PropertyValue > aTypedArgs; + aArgs >>= aTypedArgs; + xModel->attachResource( _sURL, aTypedArgs ); ::utl::CloseableComponent aEnsureClose( xModel ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
