diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2024-11-26 11:14:44 +0100 |
---|---|---|
committer | Regina Henschel <rb.henschel@t-online.de> | 2024-11-27 17:10:40 +0100 |
commit | 7cec59402d09077749cc6bbe96cbf19652d2d3d9 (patch) | |
tree | 7c8da9b69a6b5ae1400428226cbee8b19d450028 /xmloff/source | |
parent | 36b69c4525070f1258eac5c566c6dc4940deee24 (diff) |
tdf#131862 No table:cell-range-address in ODF 1.4
ODF 1.4 has removed the attribute table:cell-range-address from the
chart:plot-area element. So we may write it only in versions < 1.4.
The attribute was used to distinguish whether a chart has internal data.
The same information is given by the href attribute of the chart:chart
element.
The actual used cell-range-address values are already given in the
chart:axis and chart:series child elements and evaluated from there.
A global setting is not needed.
The attributes chart:data-source-has-labels, chart:column-mapping and
chart:row-mapping are related to the table:cell-range-address attribute.
These three attributes are deprecated already in ODF 1.2. Thus we will
not write them in ODF 1.4. Their information is given in the chart:axis
and chart:series child elements. The order of series is given by the
order of the chart:series child elements.
Change-Id: I08886723b1c8eb27489a7f44b5f8321572defdff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177323
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f58904997ce6..91b203bc2d42 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1329,8 +1329,10 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > OUString::number(fSplitPos)); } + // The attribute table:cell-range-address was removed from the standard in ODF 1.4. + // The associated attributes chart:column-mapping and chart:row-mapping are deprecated. //column-mapping or row-mapping - if( maSequenceMapping.hasElements() ) + if( maSequenceMapping.hasElements() && nCurrentODFVersion < SvtSaveOptions::ODFSVER_014) { enum XMLTokenEnum eTransToken = ::xmloff::token::XML_ROW_MAPPING; if( mbRowSourceColumns ) @@ -1981,7 +1983,10 @@ void SchXMLExportHelper_Impl::exportPlotArea( // write style name AddAutoStyleAttribute( aPropertyStates ); - if( !msChartAddress.isEmpty() ) + // The attribute table:cell-range-address was removed from the standard in ODF 1.4. + // The associated attribute chart:data-source-has-labels is deprecated. + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(mrExport.getSaneDefaultVersion()); + if( !msChartAddress.isEmpty() && nCurrentODFVersion < SvtSaveOptions::ODFSVER_014) { if( !bIncludeTable ) mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, msChartAddress ); |