diff options
author | Noel Power <npower@openoffice.org> | 2009-09-30 09:08:19 +0000 |
---|---|---|
committer | Noel Power <npower@openoffice.org> | 2009-09-30 09:08:19 +0000 |
commit | 95eeb6c233eb2718399b5ffa69c1e9de86bf6bf5 (patch) | |
tree | 137b270ea38359d0efb5c93ff1e76348acc22b28 /sc/source/ui/docshell/docsh.cxx | |
parent | 4aa9c65e8853a300c0da1ef2e7f544d4ca927359 (diff) |
add some comments
Diffstat (limited to 'sc/source/ui/docshell/docsh.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 0dbde19943be..afc9327f7d8f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -365,6 +365,17 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) aArgs[ 0 ] <<= GetModel(); aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs ); GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); + // Fake ThisComponent being setup by Activate ( which is a view + // related thing ), + // a) if another document is opened then in theory ThisComponent + // will be reset as before, + // b) when this document is 'really' Activated then ThisComponent + // again will be set as before + // The only wrinkle seems if this document is loaded 'InVisible' + // but.. I don't see that this is possible from the vba API + // I could be wrong though + // There may be implications setting the current component + // too early :-/ so I will just manually set the Basic Variables BasicManager* pAppMgr = SFX_APP()->GetBasicManager(); if ( pAppMgr ) pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] ); |