diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-13 17:08:57 -0400 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-08-14 14:17:17 +0200 |
commit | 0eeab7204ac244bebb0f8c4d8a8891037423534a (patch) | |
tree | 025a8ecd93a617a9c91d9f371cb09ee739001db3 | |
parent | 22571981cdae59bce508dfd2af4c873aa216d885 (diff) |
fdo#53456: initialize pivot tables *after* the formula cells.
Or else all the formula cells within pivot table's source ranges would
be treated as if they are empty.
(cherry picked from commit ae296a60781a2b5d5b7523cbda3444e3dd21506f)
Signed-off-by: Eike Rathke <erack@redhat.com>
Conflicts:
sc/source/filter/oox/workbookhelper.cxx
Change-Id: Ib04f4902863b091c483711eeaf31a282f6feaf67
-rw-r--r-- | sc/source/filter/oox/workbookhelper.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index e8df821cae17..071b9a66d736 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -590,9 +590,17 @@ void WorkbookGlobals::finalize() aPropSet.setProperty( PROP_IsExecuteLinkEnabled, true ); // #i79826# enable updating automatic row height after loading the document aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); + getFormulaBuffer().finalizeImport(); + // hack, setting it true the second time will delete the cache 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) @@ -659,10 +667,6 @@ void WorkbookHelper::finalizeWorkbookImport() mrBookGlob.getWorkbookSettings().finalizeImport(); mrBookGlob.getViewSettings().finalizeImport(); - /* Insert all pivot tables. Must be done after loading all sheets, because - data pilots expect existing source data on creation. */ - mrBookGlob.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. */ |