sc/source/filter/oox/workbookhelper.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit b5ecee665f37527d2109d383090d8190c0e4621a Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Wed Jun 25 16:38:52 2014 -0400 bnc#882595: Process VBA blobs before formula cells. So that formula cells with user-defined functions will be interpreted correctly. Change-Id: I49c10109575f9f82d7f85dea63590bf02b70e041 (cherry picked from commit 5e83804da815a982aed567a8cae4cc078491dcbd) diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index fba445f..ca61154 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -760,6 +760,13 @@ void WorkbookHelper::finalizeWorkbookImport() mrBookGlob.getWorkbookSettings().finalizeImport(); mrBookGlob.getViewSettings().finalizeImport(); + // Import the VBA project (after finalizing workbook settings which + // contains the workbook code name). Do it before processing formulas in + // order to correctly resolve VBA custom function names. + StorageRef xVbaPrjStrg = mrBookGlob.getVbaProjectStorage(); + if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() ) + getBaseFilter().getVbaProject().importModulesAndForms( *xVbaPrjStrg, getBaseFilter().getGraphicHelper() ); + // need to import formulas before scenarios mrBookGlob.getFormulaBuffer().finalizeImport(); @@ -779,12 +786,6 @@ void WorkbookHelper::finalizeWorkbookImport() sheets. Automatic numbering is set by passing the value 0. */ PropertySet aDefPageStyle( getStyleObject( "Default", true ) ); aDefPageStyle.setProperty< sal_Int16 >( PROP_FirstPageNumber, 0 ); - - /* Import the VBA project (after finalizing workbook settings which - contains the workbook code name). */ - StorageRef xVbaPrjStrg = mrBookGlob.getVbaProjectStorage(); - if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() ) - getBaseFilter().getVbaProject().importModulesAndForms( *xVbaPrjStrg, getBaseFilter().getGraphicHelper() ); } // document model ------------------------------------------------------------- _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits