[ooo-build-commit] 2 commits - patches/vba
Noel Power
noelp at kemper.freedesktop.org
Tue Jun 23 06:56:37 PDT 2009
patches/vba/basic-public-dim-fix.diff | 10 +++---
patches/vba/vba-fallback-to-calling-doc-context.diff | 30 +++++++++++++++++++
2 files changed, 35 insertions(+), 5 deletions(-)
New commits:
commit fdb6ecb809c3b604eecd4a3e732b00a075545612
Author: Noel Power <noel.power at novell.com>
Date: Tue Jun 23 14:38:14 2009 +0100
fix load problem for non MSO documents
* patches/vba/vba-fallback-to-calling-doc-context.diff:
diff --git a/patches/vba/vba-fallback-to-calling-doc-context.diff b/patches/vba/vba-fallback-to-calling-doc-context.diff
index b359f7d..4c1cafa 100644
--- a/patches/vba/vba-fallback-to-calling-doc-context.diff
+++ b/patches/vba/vba-fallback-to-calling-doc-context.diff
@@ -718,3 +718,33 @@ index 8290f66..110d15f 100644
}
sal_Int32
+diff --git sc/source/filter/xlsx/xlsx-excimp8.cxx sc/source/filter/xlsx/xlsx-excimp8.cxx
+index 2995571..d03666e 100644
+--- sc/source/filter/xlsx/xlsx-excimp8.cxx
++++ sc/source/filter/xlsx/xlsx-excimp8.cxx
+@@ -277,7 +277,9 @@ void ImportExcel8::ReadBasic( void )
+ if( bLoadCode || bLoadStrg )
+ {
+ uno::Any aGlobs;
+- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii( "ooo.vba.excel.Globals") );
++ uno::Sequence< uno::Any > aArgs(1);
++ aArgs[ 0 ] <<= pShell->GetModel();
++ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "ooo.vba.excel.Globals"), aArgs );
+ pShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ SvxImportMSVBasic aBasicImport( *pShell, *xRootStrg, bLoadCode, bLoadStrg );
+ bool bAsComment = !bLoadExecutable || !aGlobs.hasValue();
+diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
+index 337ceb3..72d92cf 100644
+--- sc/source/ui/docshell/docsh.cxx
++++ sc/source/ui/docshell/docsh.cxx
+@@ -376,7 +376,9 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
+ if ( pShell )
+ {
+ uno::Any aGlobs;
+- aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ) );
++ uno::Sequence< uno::Any > aArgs(1);
++ aArgs[ 0 ] <<= pShell->GetModel();
++ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
+ pShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ }
+ // suppress VBA events when loading the xml
commit 1002a8089fdc50a9747b2c34e833a9fbff291eae
Author: Noel Power <noel.power at novell.com>
Date: Tue Jun 23 14:35:08 2009 +0100
changed some comments in the patch
* patches/vba/basic-public-dim-fix.diff:
diff --git a/patches/vba/basic-public-dim-fix.diff b/patches/vba/basic-public-dim-fix.diff
index 5a712b0..d0a42e5 100644
--- a/patches/vba/basic-public-dim-fix.diff
+++ b/patches/vba/basic-public-dim-fix.diff
@@ -54,8 +54,8 @@ index cf5b5a5..36eb266 100644
+ for ( std::vector< String >::iterator it = mModuleVariableNames.begin(); it != it_end; ++it )
+ {
+ // We don't want a Find being called in a derived class ( e.g.
-+ // SbUserform because it could trigger say and initialise event
-+ // which would cause basic to be re-run in the middle of the init
++ // SbUserform because it could trigger say an initialise event
++ // which would cause basic to be re-run in the middle of the init ( and remember RemoveVars is called from compile and we don't want code to run as part of the compile )
+ SbxVariableRef p = SbModule::Find( *it, SbxCLASS_PROPERTY );
+ if( p.Is() )
+ Remove (p);
@@ -87,9 +87,9 @@ index 38e794d..644ecdb 100644
+ SbxObject* pStorage = &rBasic;
String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
-+ // Store module scope variables at module scope ( what about global )
-+ // in mso global is about visibility not scope, scope is always
-+ // determined by the placement of the variables
++ // Store module scope variables at module scope
++ // in non vba mode these are stored at the library level :/
++ // not sure if this really should not be enabled for ALL basic
+ if ( SbiRuntime::isVBAEnabled() )
+ {
+ pStorage = pMod;
More information about the ooo-build-commit
mailing list