diff options
Diffstat (limited to 'sc/source/filter/excel/excimp8.cxx')
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 9608804da9f9..d75a0e669603 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -56,7 +56,6 @@ #include <svx/xflclit.hxx> #include <filter/msfilter/svxmsbas.hxx> #include <basic/basmgr.hxx> -#include <oox/xls/excelvbaproject.hxx> #include <vcl/graph.hxx> #include <vcl/bmpacc.hxx> @@ -243,17 +242,6 @@ void ImportExcel8::ReadBasic( void ) { SvxImportMSVBasic aBasicImport( *pShell, *xRootStrg, bLoadCode, bLoadStrg ); bool bAsComment = !bLoadExecutable; - if ( !bAsComment ) - { - uno::Any aGlobs; - 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 ); - BasicManager* pAppMgr = SFX_APP()->GetBasicManager(); - if ( pAppMgr ) - pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] ); - } aBasicImport.Import( EXC_STORAGE_VBA_PROJECT, EXC_STORAGE_VBA, bAsComment ); } } @@ -292,8 +280,6 @@ void ImportExcel8::PostDocLoad( void ) // read doc info (no docshell while pasting from clipboard) LoadDocumentProperties(); - // attach document events to VBA macros - AttachDocumentEvents(); // #i45843# Pivot tables are now handled outside of PostDocLoad, so they are available // when formula cells are calculated, for the GETPIVOTDATA function. @@ -318,21 +304,6 @@ void ImportExcel8::LoadDocumentProperties() } } -void ImportExcel8::AttachDocumentEvents() -{ - SfxObjectShell* pShell = GetDocShell(); - if( HasBasic() && pShell ) - { - uno::Reference< lang::XMultiServiceFactory > xGlobalFactory = ::comphelper::getProcessServiceFactory(); - uno::Reference< sheet::XSpreadsheetDocument > xDocument( pShell->GetModel(), uno::UNO_QUERY ); - if( xGlobalFactory.is() && xDocument.is() ) - { - ::oox::xls::VbaProject aVbaProject( xGlobalFactory, xDocument ); - aVbaProject.attachToEvents(); - } - } -} - //___________________________________________________________________ // autofilter |