Tag: cws_dev300_dba30c
User: fs      
Date: 2008-05-08 13:14:03+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.38.16.2&r2=1.38.16.3
Delta lines:  +9 -7
-------------------
--- databasecontext.cxx 2008-04-16 06:51:25+0000        1.38.16.2
+++ databasecontext.cxx 2008-05-08 13:14:00+0000        1.38.16.3
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: databasecontext.cxx,v $
- * $Revision: 1.38.16.2 $
+ * $Revision: 1.38.16.3 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -53,6 +53,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>
@@ -333,14 +334,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]

Reply via email to