summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-04-05 18:10:55 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-05-04 11:57:51 +0200
commitf2eac63dcca642efc80a171a986aecc482f9cbc6 (patch)
tree0180f50886413bf0bdd6e0ad50ebe04c11827451 /schema
parent0f4a3823a6bab01723f2a958d44159d39d137b97 (diff)
WIP ODF import and export for MCGR
Current state uses: Element loext:gradient-stop with the attributes svg:offset, loext:color-type with value 'rgb', and loext:color-value with values of kind #rrggbb. Element loext:opacity-stop with the attributes svg:offset and svg:stop-opacity, both with datatype double. With MCGR enabled testColorGradientWithTransparencyDOCX in CppunitTest_chart_export3 has the value 90000 instead of 90196. That is same value as in original file. Thus I have adapted the test. Change-Id: I976934f9b8fb79be4f74adb180b3285486dce31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150060 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'schema')
-rw-r--r--schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng72
1 files changed, 71 insertions, 1 deletions
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index f772ce223f35..a3900e4f31c7 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -1974,7 +1974,28 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:element>
</rng:define>
- </rng:include>
+ <!-- Belongs to project MCGR (Armin Le Grand) LO 7.6 -->
+ <rng:define name="draw-gradient">
+ <rng:element name="draw:gradient">
+ <rng:ref name="common-draw-gradient-attlist"/>
+ <rng:ref name="draw-gradient-attlist"/>
+ <rng:zeroOrMore>
+ <rng:ref name="loext-gradient-stop"/>
+ </rng:zeroOrMore>
+ </rng:element>
+ </rng:define>
+ <!-- Belongs to project MCGR (Armin Le Grand) LO 7.6 -->
+ <rng:define name="draw-opacity">
+ <rng:element name="draw:opacity">
+ <rng:ref name="common-draw-gradient-attlist"/>
+ <rng:ref name="draw-opacity-attlist"/>
+ <rng:zeroOrMore>
+ <rng:ref name="loext-opacity-stop"/>
+ </rng:zeroOrMore>
+ </rng:element>
+ </rng:define>
+
+ </rng:include>
<!-- TODO no proposal -->
<rng:define name="loext-p">
@@ -3532,4 +3553,53 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:optional>
</rng:define>
+ <!-- Belongs to project MCGR (Armin Le Grand) LO 7.6
+ Intended to be used for theme colors too -->
+ <rng:define name="common-complex-color-attributes">
+ <rng:choice>
+ <rng:group>
+ <rng:attribute name="loext:color-type">
+ <rng:value>rgb</rng:value>
+ </rng:attribute>
+ <rng:attribute name="loext:color-value">
+ <rng:ref name="color"/>
+ </rng:attribute>
+ </rng:group>
+ <rng:group>
+ <rng:attribute name="loext:color-type">
+ <rng:value>theme</rng:value>
+ </rng:attribute>
+ <rng:attribute name="loext:color-value">
+ <!-- will become <rng:ref name="themeColorId"/>
+ when theme color related attributes are renamed -->
+ <rng:ref name="theme-color"/>
+ </rng:attribute>
+ </rng:group>
+ </rng:choice>
+ </rng:define>
+
+ <!-- Belongs to project MCGR (Armin Le Grand) LO 7.6 -->
+ <rng:define name="loext-gradient-stop">
+ <rng:element name="loext:gradient-stop">
+ <rng:attribute name="svg:offset">
+ <rng:ref name="zeroToOneDecimal"/>
+ </rng:attribute>
+ <rng:ref name="common-complex-color-attributes"/>
+ <rng:empty/>
+ </rng:element>
+ </rng:define>
+
+ <!-- Belongs to project MCGR (Armin Le Grand) LO 7.6 -->
+ <rng:define name="loext-opacity-stop">
+ <rng:element name="loext:opacity-stop">
+ <rng:attribute name="svg:offset">
+ <rng:ref name="zeroToOneDecimal"/>
+ </rng:attribute>
+ <rng:attribute name="svg:stop-opacity">
+ <rng:ref name="zeroToOneDecimal"/>
+ </rng:attribute>
+ <rng:empty/>
+ </rng:element>
+ </rng:define>
+
</rng:grammar>