diff options
author | sushil_shinde <sushil.shinde@synerzip.com> | 2014-01-29 14:34:35 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-11 23:24:00 +0000 |
commit | 1d497297ec9bc2ed00bbc8f586a67c76eaa7013d (patch) | |
tree | ff289db4cd77cabcccb4c957da3939938e520381 /oox | |
parent | 83055835b1425b0a9d2fe5dce2f4db2d7a61919d (diff) |
fdo#74112 Write Chart Displayunits information back to XML.
During export access properties stored during import
and write back those. Currently we just support basic chart
display unit information such as builtinunit, there are more
properties ex. custUnit, dispUnitsLbl, extLst.
which are pending.
Conflicts:
chart2/qa/extras/chart2export.cxx
Change-Id: I87e0a8322fc0b0c3df2b8053b7f29fffea611040
Reviewed-on: https://gerrit.libreoffice.org/7722
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 1c8281630241..dbbeb07bcb7c 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2389,6 +2389,31 @@ void ChartExport::_exportAxis( FSEND ); } + sal_Bool bDisplayUnits = sal_False; + if(GetProperty( xAxisProp, "DisplayUnits" ) ) + { + mAny >>= bDisplayUnits; + if(bDisplayUnits) + { + OUString aVal; + pFS->startElement( FSNS( XML_c, XML_dispUnits ), + FSEND ); + if(GetProperty( xAxisProp, "BuiltInUnit" )) + { + mAny >>= aVal; + if(!aVal.isEmpty()) + { + OString aBuiltInUnit = OUStringToOString(aVal, RTL_TEXTENCODING_UTF8); + pFS->singleElement( FSNS( XML_c, XML_builtInUnit ), + XML_val, aBuiltInUnit.getStr(), + FSEND ); + } + } + pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ),FSEND); + pFS->endElement( FSNS( XML_c, XML_dispUnits ) ); + + } + } // TODO: text properties pFS->endElement( FSNS( XML_c, nAxisType ) ); |