summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-12-18 14:33:20 +0000
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-18 10:12:27 -0500
commit28549ae77dee063da50a56eb3cdf9114365a6afd (patch)
treecb87ea58f73d16c163aa76a6815ae44d0f460c0f /sc
parent5220a3615a806224d3a54283da4abdaae4b15795 (diff)
finalize pivot *before* scenario sheet to ensure table numbers are correct
Change-Id: I15cf378b51b1ecfbd05c7013e5a5b69fb87fdafb Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index dce942c04dae..c10a1596465b 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -591,11 +591,6 @@ void WorkbookGlobals::finalize()
// #i79826# enable updating automatic row height after loading the document
aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true );
- // Insert all pivot tables. Must be done after loading all sheets and
- // formulas, because data pilots expect existing source data on
- // creation.
- getPivotTables().finalizeImport();
-
// #i76026# enable Undo after loading the document
aPropSet.setProperty( PROP_IsUndoEnabled, true );
// disable editing read-only documents (e.g. from read-only files)
@@ -664,6 +659,12 @@ void WorkbookHelper::finalizeWorkbookImport()
// need to import formulas before scenarios
mrBookGlob.getFormulaBuffer().finalizeImport();
+
+ // Insert all pivot tables. Must be done after loading all sheets and
+ // formulas, because data pilots expect existing source data on
+ // creation.
+ getPivotTables().finalizeImport();
+
/* Insert scenarios after all sheet processing is done, because new hidden
sheets are created for scenarios which would confuse code that relies
on certain sheet indexes. Must be done after pivot tables too. */