User: kz      
Date: 2008-03-05 16:33:26+0000
Modified:
   dba/dbaccess/source/ui/browser/unodatbr.cxx

Log:
 INTEGRATION: CWS directsbasemacros_DEV300 (1.192.18.1.8); FILE MERGED
 2008/03/03 22:08:03 fs 1.192.18.1.8.2: #i10000# 
(NamedValueCollection::getPropertyValues does not yet exist on this branch)
 2008/03/03 22:02:35 fs 1.192.18.1.8.1: #i86585# #i85010# pass an 
InteractionHandler and a MacroExecMode when loading a DB doc

File Changes:

Directory: /dba/dbaccess/source/ui/browser/
===========================================

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.193&r2=1.194
Delta lines:  +18 -5
--------------------
--- unodatbr.cxx        2008-01-30 08:43:13+0000        1.193
+++ unodatbr.cxx        2008-03-05 16:33:23+0000        1.194
@@ -105,6 +105,7 @@
 #ifndef _COM_SUN_STAR_UTIL_XFLUSHABLE_HPP_
 #include <com/sun/star/util/XFlushable.hpp>
 #endif
+#include <com/sun/star/document/MacroExecMode.hpp>
 #ifndef _URLOBJ_HXX //autogen
 #include <tools/urlobj.hxx>
 #endif
@@ -349,6 +350,7 @@
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::view;
 using namespace ::com::sun::star::datatransfer;
+using namespace ::com::sun::star::document;
 using namespace ::dbtools;
 using namespace ::comphelper;
 using namespace ::svx;
@@ -3393,14 +3395,25 @@
 
             if ( xDocumentModel.is() )
                        {
-                               Sequence<PropertyValue > aArgs(1);
-                               aArgs[0].Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model"));
-                               aArgs[0].Value <<= xDocumentModel;
+                Reference< XInteractionHandler > xInteractionHandler(
+                    getORB()->createInstance(
+                        ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.sdb.InteractionHandler" ) ) ),
+                        UNO_QUERY );
+                OSL_ENSURE( xInteractionHandler.is(), 
"SbaTableQueryBrowser::implAdministrate: no interaction handler available!" );
+
+                ::comphelper::NamedValueCollection aLoadArgs;
+                aLoadArgs.put( "Model", xDocumentModel );
+                aLoadArgs.put( "InteractionHandler", xInteractionHandler );
+                aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG 
);
+
+                Sequence< PropertyValue > aLoadArgPV;
+                aLoadArgs >>= aLoadArgPV;
+
                                xFrameLoader->loadComponentFromURL(
                                        xDocumentModel->getURL(),
                                        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")),
                                        nFrameSearchFlag,
-                                       aArgs
+                    aLoadArgPV
                                );
                        }
                }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to