summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-07-29 15:57:42 +0200
committerTomaž Vajngerl <quikee@gmail.com>2022-08-15 13:08:17 +0200
commit203eaefb4ac012c36a1ecdd3753e1cb2c5876efc (patch)
treebec856e355c47cf7bf528865bcfa0232d28a16ee /xmloff/source/core
parent5861af0da5179689870d5b4f5ff56a5ea0a79901 (diff)
xmloff: import and export for the chart data table
This change adds import and export code for the the chart's data table properties to the ODF format for chart documents. The data table properties are exported to a new element "data-table", which then references a auto style with all the properties of a data table + new data table specific properties: HBorder, VBorder, Outline, Keys which are mapped to "show-horizontal-border", "show-vertical-border", "show-outline" and "show-keys" chart attributes. Also adds a test for the import and export: imports xlsx -> exports to ods -> imports ods Change-Id: Id45d9369fd619959e4d6eba7ca51c8ddce9c8f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138260 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/xmltoken.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 71d10f72d338..30158b20660e 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -617,6 +617,7 @@ namespace xmloff::token {
TOKEN( "data-stream-source", XML_DATA_STREAM_SOURCE ),
TOKEN( "data-style", XML_DATA_STYLE ),
TOKEN( "data-style-name", XML_DATA_STYLE_NAME ),
+ TOKEN( "data-table", XML_DATA_TABLE ),
TOKEN( "data-type", XML_DATA_TYPE ),
TOKEN( "database-display", XML_DATABASE_DISPLAY ),
TOKEN( "database-name", XML_DATABASE_NAME ),
@@ -1760,12 +1761,16 @@ namespace xmloff::token {
TOKEN( "show-changes-by-datetime-second-datetime", XML_SHOW_CHANGES_BY_DATETIME_SECOND_DATETIME ),
TOKEN( "show-changes-by-ranges", XML_SHOW_CHANGES_BY_RANGES ),
TOKEN( "show-changes-by-ranges-list", XML_SHOW_CHANGES_BY_RANGES_LIST ),
+ TOKEN( "show-horizontal-border", XML_SHOW_HORIZONTAL_BORDER ),
+ TOKEN( "show-keys", XML_SHOW_KEYS ),
TOKEN( "show-logo", XML_SHOW_LOGO ),
TOKEN( "show-rejected-changes", XML_SHOW_REJECTED_CHANGES ),
TOKEN( "show-shape", XML_SHOW_SHAPE ),
TOKEN( "show-text", XML_SHOW_TEXT ),
TOKEN( "show-unit", XML_SHOW_UNIT ),
TOKEN( "show-value", XML_SHOW_VALUE ),
+ TOKEN( "show-vertical-border", XML_SHOW_VERTICAL_BORDER ),
+ TOKEN( "show-outline", XML_SHOW_OUTLINE ),
TOKEN( "shows", XML_SHOWS ),
TOKEN( "side-by-side", XML_SIDE_BY_SIDE ),
TOKEN( "silver", XML_SILVER ),
@@ -3428,9 +3433,9 @@ namespace xmloff::token {
TOKEN( "rfc-language-tag", XML_RFC_LANGUAGE_TAG ),
TOKEN( "rfc-language-tag-asian", XML_RFC_LANGUAGE_TAG_ASIAN ),
TOKEN( "rfc-language-tag-complex", XML_RFC_LANGUAGE_TAG_COMPLEX ),
- TOKEN( "data-table-show-horz-border", XML_DATA_TABLE_SHOW_HORZ_BORDER ),
- TOKEN( "data-table-show-vert-border", XML_DATA_TABLE_SHOW_VERT_BORDER ),
- TOKEN( "data-table-show-outline", XML_DATA_TABLE_SHOW_OUTLINE ),
+ TOKEN( "data-table-show-horz-border", XML_DATA_TABLE_SHOW_HORZ_BORDER ), // obsolete - use XML_SHOW_HORIZONTAL_BORDER
+ TOKEN( "data-table-show-vert-border", XML_DATA_TABLE_SHOW_VERT_BORDER ), // obsolete - use XML_SHOW_VERTICAL_BORDER
+ TOKEN( "data-table-show-outline", XML_DATA_TABLE_SHOW_OUTLINE ), // obsolete - use XML_SHOW_OUTLINE
TOKEN( "display-units", XML_CHART_DUNITS_DISPLAYUNITS ),
TOKEN( "display-units-built-in-unit", XML_CHART_DUNITS_BUILTINUNIT ),
TOKEN( "external-data", XML_EXTERNALDATA),