diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2018-11-22 11:30:29 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-11-30 15:54:08 +0100 |
commit | 52c088c4d738a3299bda434635a2d9f2da03467c (patch) | |
tree | 4bf1f5923ef0899bbdb8fabbd62a690bde049c4b /sc/source/filter/excel | |
parent | d559d7085f8c160c9946ef3eb49250aa12358968 (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.
Change-Id: Ib0b9e98a5588159c5c7de1e2e5d2bdcbfe986d8d
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>
Diffstat (limited to 'sc/source/filter/excel')
-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 004f9938a72a..0f432793ec5a 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; |