diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2018-11-22 11:30:29 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-01-17 13:39:58 +0100 |
commit | cd66b523ca1c08e5641423d80f62efb27d68c2f7 (patch) | |
tree | cc937cf9895996169b062a8132ae07983270cf6a /sc/source | |
parent | 5ce47ed1f93f8b7f283630221e9fd738dc3d917a (diff) |
tdf#121612: update pivot caches during saving to XLSX
Cache was empty so pivot table was not exported completely
and pivot table filter were missing.
Reviewed-on: https://gerrit.libreoffice.org/63785
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/64265
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 78457f7462aa3bf92839667a550451f0d434f48b)
Reviewed-on: https://gerrit.libreoffice.org/64303
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
(cherry picked from commit 52c088c4d738a3299bda434635a2d9f2da03467c)
Change-Id: Ib0b9e98a5588159c5c7de1e2e5d2bdcbfe986d8d
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index 40b728f4fe35..5d47d628cee7 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -419,15 +419,22 @@ XclExpXmlPivotTableManager::XclExpXmlPivotTableManager( const XclExpRoot& rRoot void XclExpXmlPivotTableManager::Initialize() { - const ScDocument& rDoc = GetDoc(); + ScDocument& rDoc = GetDoc(); if (!rDoc.HasPivotTable()) // No pivot table to export. return; - const ScDPCollection* pDPColl = rDoc.GetDPCollection(); + ScDPCollection* pDPColl = rDoc.GetDPCollection(); if (!pDPColl) return; + // Update caches from DPObject + for (size_t i = 0; i < pDPColl->GetCount(); ++i) + { + ScDPObject& rDPObj = (*pDPColl)[i]; + rDPObj.SyncAllDimensionMembers(); + } + // Go through the caches first. std::vector<XclExpXmlPivotCaches::Entry> aCaches; |