diff options
author | Michael E. Bohn <mbn@openoffice.org> | 2010-08-24 13:14:28 +0200 |
---|---|---|
committer | Michael E. Bohn <mbn@openoffice.org> | 2010-08-24 13:14:28 +0200 |
commit | bd215a796f9ff124bd291571e49526b6a54df247 (patch) | |
tree | 1541ef4fc7d3aa0130d78b80dcff45d785558b84 /vbahelper | |
parent | df970ca6a70349f6e887661fe6164a1c857c5cdb (diff) |
mib19 #163409# set the macro exeution mode during workbooks.add
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbadocumentsbase.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index 2d4175b90939..f7af3a43d977 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -215,7 +215,13 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP uno::Any SAL_CALL VbaDocumentsBase::Add() throw (uno::RuntimeException) { - uno::Reference< lang::XMultiComponentFactory > xSMgr( + uno::Sequence< beans::PropertyValue > aArgs( 1 ); + beans::PropertyValue aArg; + aArg.Name = ::rtl::OUString::createFromAscii("MacroExecutionMode"); + aArg.Value = uno::Any(com::sun::star::document::MacroExecMode::USE_CONFIG); + aArgs[ 0 ] = aArg; + + uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XComponentLoader > xLoader( @@ -231,8 +237,7 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL( sURL , - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, - uno::Sequence< beans::PropertyValue >(0) ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, aArgs ); return uno::makeAny( xComponent ); } |