diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-22 14:56:07 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-22 15:56:31 +0200 |
commit | 7f6a6664a1f3a37a97d02d5f0894300aff0d8db5 (patch) | |
tree | 7f5bdfccd49434a0fa64594a0cdc94d9d976f549 /sc/source/filter/oox | |
parent | ac854a4ccfcdcd75e93fbf629b6191821099b0a3 (diff) |
tdf#124883: don't drop data field names on import
The name attribute of dataField element was already read in
PivotTable::importDataField; and then it was ignored in
PivotTableField::convertDataField. ScDataPilotFieldObj had no
handler for name in its ScDataPilotFieldObj::[gs]etPropertyValue,
although it has [gs]etName for that - so this change puts pieces
together to allow to use the imported name correctly.
Change-Id: I5357601b26e6635ab132ff6a1294645995aff97e
Reviewed-on: https://gerrit.libreoffice.org/71068
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r-- | sc/source/filter/oox/pivottablebuffer.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index 772637feb674..8af348942bcd 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -577,6 +577,9 @@ void PivotTableField::convertDataField( const PTDataFieldModel& rDataField ) // field orientation aPropSet.setProperty( PROP_Orientation, DataPilotFieldOrientation_DATA ); + if (!rDataField.maName.isEmpty()) + aPropSet.setProperty(PROP_Name, rDataField.maName); + /* Field aggregation function. Documentation is a little bit confused about which names to use for the count functions. The name 'count' means 'count all', and 'countNum' means 'count numbers'. On the |