summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-04-05 18:10:55 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-15 21:38:55 +0200
commitcaa424e6c77993dd0ac1325c20cc5068a1ed8e9a (patch)
tree7cf4e1617d84d8c85e423271022efe15f66d4850 /schema
parentfd6069d8cb4bfedba2f63f4f1839d6739a8299ac (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 5029a203bd18..4eb287249809 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -1912,7 +1912,28 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:interleave>
</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">
@@ -3468,4 +3489,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>