summaryrefslogtreecommitdiff
path: root/schema
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 /schema
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 'schema')
-rw-r--r--schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng113
1 files changed, 88 insertions, 25 deletions
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index c524533fd178..fe5c94a45ee4 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2,34 +2,34 @@
<!--
Open Document Format for Office Applications (OpenDocument) Version 1.3
OASIS Standard, In progress
- Relax-NG Schema
+ Relax-NG Schema
Source: https://tools.oasis-open.org/version-control/svn/office/
Copyright (c) OASIS Open 2002-2015. All Rights Reserved.
- All capitalized terms in the following text have the meanings assigned to them
- in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
- full Policy may be found at the OASIS website.
-
- This document and translations of it may be copied and furnished to others, and
- derivative works that comment on or otherwise explain it or assist in its
- implementation may be prepared, copied, published, and distributed, in whole or
- in part, without restriction of any kind, provided that the above copyright
- notice and this section are included on all such copies and derivative works.
- However, this document itself may not be modified in any way, including by
- removing the copyright notice or references to OASIS, except as needed for the
- purpose of developing any document or deliverable produced by an OASIS
- Technical Committee (in which case the rules applicable to copyrights, as set
- forth in the OASIS IPR Policy, must be followed) or as required to translate it
- into languages other than English.
-
- The limited permissions granted above are perpetual and will not be revoked by
- OASIS or its successors or assigns.
-
- This document and the information contained herein is provided on an "AS IS"
- basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
- INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
- FITNESS FOR A PARTICULAR PURPOSE.
+ All capitalized terms in the following text have the meanings assigned to them
+ in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
+ full Policy may be found at the OASIS website.
+
+ This document and translations of it may be copied and furnished to others, and
+ derivative works that comment on or otherwise explain it or assist in its
+ implementation may be prepared, copied, published, and distributed, in whole or
+ in part, without restriction of any kind, provided that the above copyright
+ notice and this section are included on all such copies and derivative works.
+ However, this document itself may not be modified in any way, including by
+ removing the copyright notice or references to OASIS, except as needed for the
+ purpose of developing any document or deliverable produced by an OASIS
+ Technical Committee (in which case the rules applicable to copyrights, as set
+ forth in the OASIS IPR Policy, must be followed) or as required to translate it
+ into languages other than English.
+
+ The limited permissions granted above are perpetual and will not be revoked by
+ OASIS or its successors or assigns.
+
+ This document and the information contained herein is provided on an "AS IS"
+ basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
+ INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
+ FITNESS FOR A PARTICULAR PURPOSE.
-->
<rng:grammar xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:db="urn:oasis:names:tc:opendocument:xmlns:database:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
@@ -1323,6 +1323,36 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:choice>
</rng:define>
+ <rng:define name="chart-chart">
+ <rng:element name="chart:chart">
+ <rng:ref name="chart-chart-attlist"/>
+ <rng:optional>
+ <rng:ref name="chart-title"/>
+ </rng:optional>
+ <rng:optional>
+ <rng:ref name="chart-subtitle"/>
+ </rng:optional>
+ <rng:optional>
+ <rng:ref name="chart-footer"/>
+ </rng:optional>
+ <rng:optional>
+ <rng:ref name="chart-legend"/>
+ </rng:optional>
+ <!-- Chart Data Table - TODO no proposal -->
+ <rng:optional>
+ <rng:ref name="chart-data-table"/>
+ </rng:optional>
+ <rng:ref name="chart-plot-area"/>
+ <rng:zeroOrMore>
+ <rng:ref name="shape"/>
+ </rng:zeroOrMore>
+ <!-- https://issues.oasis-open.org/browse/OFFICE-2123 -->
+ <rng:optional>
+ <rng:ref name="table-table"/>
+ </rng:optional>
+ </rng:element>
+ </rng:define>
+
<rng:define name="chart-axis">
<rng:element name="chart:axis">
<rng:ref name="chart-axis-attlist"/>
@@ -2423,6 +2453,39 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:optional>
</rng:define>
+ <!-- Chart Data Table - TODO no proposal -->
+ <rng:define name="chart-data-table">
+ <rng:element name="loext:data-table">
+ <rng:attribute name="chart:style-name">
+ <rng:ref name="styleNameRef"/>
+ </rng:attribute>
+ </rng:element>
+ </rng:define>
+
+ <!-- Chart Data Table Stlye Attributes - TODO no proposal -->
+ <rng:define name="style-chart-properties-attlist" combine="interleave">
+ <rng:optional>
+ <rng:attribute name="loext:show-horizontal-border">
+ <rng:ref name="boolean"/>
+ </rng:attribute>
+ </rng:optional>
+ <rng:optional>
+ <rng:attribute name="loext:show-vertical-border">
+ <rng:ref name="boolean"/>
+ </rng:attribute>
+ </rng:optional>
+ <rng:optional>
+ <rng:attribute name="loext:show-outline">
+ <rng:ref name="boolean"/>
+ </rng:attribute>
+ </rng:optional>
+ <rng:optional>
+ <rng:attribute name="loext:show-keys">
+ <rng:ref name="boolean"/>
+ </rng:attribute>
+ </rng:optional>
+ </rng:define>
+
<!-- TODO no proposal -->
<rng:define name="table-data-pilot-field-attlist" combine="interleave">
<rng:optional>