diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-05-21 00:00:30 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-07-26 14:14:12 +0200 |
commit | 5b1a8f39ee58fe5372eea18ce1ee99c95b11ba05 (patch) | |
tree | fa5eb8a39232591adf5ebeafcbbe5bb6906ab18c /oox | |
parent | 19807d4f31a1f58fe434dfe638e1f3c9a0d8e921 (diff) |
oox export: add export of basic properties of a data table
Change-Id: I2c8b76125fc788a9e4df164171d6cbd351bc1c4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137406
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 8a6d5fa7d298..988fe4413529 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1732,6 +1732,7 @@ void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >& } //Axis Data exportAxes( ); + // Data Table exportDataTable(); @@ -2033,35 +2034,41 @@ void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet void ChartExport::exportDataTable( ) { + auto xDataTable = mxNewDiagram->getDataTable(); + if (!xDataTable.is()) + return; + FSHelperPtr pFS = GetFS(); - Reference< beans::XPropertySet > aPropSet( mxDiagram, uno::UNO_QUERY ); + uno::Reference<beans::XPropertySet> aPropSet(xDataTable, uno::UNO_QUERY); bool bShowVBorder = false; bool bShowHBorder = false; bool bShowOutline = false; + bool bShowKeys = false; - if (GetProperty( aPropSet, "DataTableHBorder")) + if (GetProperty(aPropSet, "HBorder")) mAny >>= bShowHBorder; - if (GetProperty( aPropSet, "DataTableVBorder")) + if (GetProperty(aPropSet, "VBorder")) mAny >>= bShowVBorder; - if (GetProperty( aPropSet, "DataTableOutline")) + if (GetProperty(aPropSet, "Outline")) + mAny >>= bShowOutline; + if (GetProperty(aPropSet, "Keys")) mAny >>= bShowOutline; - - if (!(bShowVBorder || bShowHBorder || bShowOutline)) - return; pFS->startElement(FSNS(XML_c, XML_dTable)); + if (bShowHBorder) - pFS->singleElement( FSNS( XML_c, XML_showHorzBorder ), - XML_val, "1" ); + pFS->singleElement(FSNS(XML_c, XML_showHorzBorder), XML_val, "1" ); if (bShowVBorder) pFS->singleElement(FSNS(XML_c, XML_showVertBorder), XML_val, "1"); if (bShowOutline) pFS->singleElement(FSNS(XML_c, XML_showOutline), XML_val, "1"); + if (bShowKeys) + pFS->singleElement(FSNS(XML_c, XML_showKeys), XML_val, "1"); - pFS->endElement( FSNS( XML_c, XML_dTable)); - + pFS->endElement(FSNS(XML_c, XML_dTable)); } + void ChartExport::exportAreaChart( const Reference< chart2::XChartType >& xChartType ) { FSHelperPtr pFS = GetFS(); |