diff options
author | Nikhil Walvekar <nikhil.walvekar@synerzip.com> | 2013-12-12 17:50:37 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-12-19 03:55:05 +0100 |
commit | cf5c3e97b66ef31f2b8db4dca4c8eb179754e694 (patch) | |
tree | 587de0af8785a0f6ad08653df744bde83967b857 /oox | |
parent | ba76bf5c7b705d3f5e8d807346a34d9da34127d3 (diff) |
fdo#72304 Write Chart Data Table information back to XML.
During export access properties stored during import and write
back those. Currently we just support basic chart data table information
such as border and outline, there are more properties, which are pending.
Conflicts:
chart2/qa/extras/chart2export.cxx
Change-Id: Icbc1245fc829f49833a8c307e029c3dd3dc2e0bd
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 75752636da03..6a759d0b101c 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1080,11 +1080,48 @@ void ChartExport::exportPlotArea( ) exportShapeProps( xWallPropSet ); } } - + exportDataTable(); pFS->endElement( FSNS( XML_c, XML_plotArea ) ); } +void ChartExport::exportDataTable( ) +{ + FSHelperPtr pFS = GetFS(); + Reference< beans::XPropertySet > aPropSet( mxDiagram, uno::UNO_QUERY ); + + sal_Bool bShowVBorder = sal_False; + sal_Bool bShowHBorder = sal_False; + sal_Bool bShowOutline = sal_False; + + if (GetProperty( aPropSet, "DataTableHBorder")) + mAny >>= bShowHBorder; + if (GetProperty( aPropSet, "DataTableVBorder")) + mAny >>= bShowVBorder; + if (GetProperty( aPropSet, "DataTableOutline")) + mAny >>= bShowOutline; + + if (bShowVBorder || bShowHBorder || bShowOutline) + { + pFS->startElement( FSNS( XML_c, XML_dTable), + FSEND ); + if (bShowHBorder) + pFS->singleElement( FSNS( XML_c, XML_showHorzBorder ), + XML_val, "1", + FSEND ); + if (bShowVBorder) + pFS->singleElement( FSNS( XML_c, XML_showVertBorder ), + XML_val, "1", + FSEND ); + if (bShowOutline) + pFS->singleElement( FSNS( XML_c, XML_showOutline ), + XML_val, "1", + FSEND ); + + pFS->endElement( FSNS( XML_c, XML_dTable)); + } + +} void ChartExport::exportAreaChart( Reference< chart2::XChartType > xChartType ) { FSHelperPtr pFS = GetFS(); |