Kaydet (Commit) 70b960b9 authored tarafından Noel Power's avatar Noel Power

fix sometimes data corruption with xlsx import ( with scenario sheets )

formula import is buffered 'till the end of import. The processing of the
formula data need to happen before the scenario import happens. This is
necessary because sheet numbers stored in the formula addresses can become
invalid as scenario import insertes new hidden sheets upsetting the previous
table order

Change-Id: I9357f028f31bec1b1504ca991f5534f80d79c9bc
üst 2551fec6
...@@ -597,8 +597,6 @@ void WorkbookGlobals::finalize() ...@@ -597,8 +597,6 @@ void WorkbookGlobals::finalize()
// #i79826# enable updating automatic row height after loading the document // #i79826# enable updating automatic row height after loading the document
aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true );
getFormulaBuffer().finalizeImport();
// Insert all pivot tables. Must be done after loading all sheets and // Insert all pivot tables. Must be done after loading all sheets and
// formulas, because data pilots expect existing source data on // formulas, because data pilots expect existing source data on
// creation. // creation.
...@@ -674,6 +672,8 @@ void WorkbookHelper::finalizeWorkbookImport() ...@@ -674,6 +672,8 @@ void WorkbookHelper::finalizeWorkbookImport()
mrBookGlob.getWorkbookSettings().finalizeImport(); mrBookGlob.getWorkbookSettings().finalizeImport();
mrBookGlob.getViewSettings().finalizeImport(); mrBookGlob.getViewSettings().finalizeImport();
// need to import formulas before scenarios
mrBookGlob.getFormulaBuffer().finalizeImport();
/* Insert scenarios after all sheet processing is done, because new hidden /* Insert scenarios after all sheet processing is done, because new hidden
sheets are created for scenarios which would confuse code that relies sheets are created for scenarios which would confuse code that relies
on certain sheet indexes. Must be done after pivot tables too. */ on certain sheet indexes. Must be done after pivot tables too. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment