Kaydet (Commit) bfaf4401 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Export data layout field to xlsx correctly.

Excel uses a field index of -2 to indicate a data layout field.

Change-Id: I6b18c0bcff439eb4425ef0b0d0b841633dc81dd7
üst 5c004922
...@@ -395,6 +395,10 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP ...@@ -395,6 +395,10 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
const ScDPSaveDimension& rDim = rDims[i]; const ScDPSaveDimension& rDim = rDims[i];
long nPos = -1; // position in cache long nPos = -1; // position in cache
if (rDim.IsDataLayout())
nPos = -2; // Excel uses an index of -2 to indicate a data layout field.
else
{
OUString aSrcName = ScDPUtil::getSourceDimensionName(rDim.GetName()); OUString aSrcName = ScDPUtil::getSourceDimensionName(rDim.GetName());
NameToIdMapType::iterator it = aNameToIdMap.find(aSrcName); NameToIdMapType::iterator it = aNameToIdMap.find(aSrcName);
if (it != aNameToIdMap.end()) if (it != aNameToIdMap.end())
...@@ -405,6 +409,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP ...@@ -405,6 +409,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (!aCachedDims[nPos]) if (!aCachedDims[nPos])
continue; continue;
}
sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation eOrient =
static_cast<sheet::DataPilotFieldOrientation>(rDim.GetOrientation()); static_cast<sheet::DataPilotFieldOrientation>(rDim.GetOrientation());
......
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