include/docmodel/color/ComplexColor.hxx                     |    2 +
 oox/qa/unit/data/ReferenceShapeFill.fodp                    |   14 ++++----
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |    3 +
 xmloff/qa/unit/data/theme.fodp                              |   20 ++++++------
 xmloff/qa/unit/draw.cxx                                     |    6 +++
 xmloff/source/text/XMLComplexColorContext.cxx               |    8 ++++
 xmloff/source/text/XMLComplexColorExport.cxx                |    1 
 7 files changed, 37 insertions(+), 17 deletions(-)

New commits:
commit 433a2ced036b8522a60559d9ca6387e5b478e3a9
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu May 25 13:55:21 2023 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Sun Jun 4 15:37:30 2023 +0200

    xmloff: add color-type attribute to complex color
    
    We need to identify what the color type of the complex color is.
    For now we mostly use "theme", but in the future we can also have
    other types like "rgb",... when the infrastructure for that is
    built.
    
    Change-Id: I38c91d294a191ca3124be4e99050977c9815d23e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152253
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 38e0e78998153463caf9c3c72ef7f4549ddff0e8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152516
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/include/docmodel/color/ComplexColor.hxx 
b/include/docmodel/color/ComplexColor.hxx
index 471c6b30e4d1..1cac6816bfa5 100644
--- a/include/docmodel/color/ComplexColor.hxx
+++ b/include/docmodel/color/ComplexColor.hxx
@@ -92,6 +92,8 @@ public:
 public:
     ColorType getType() const { return meType; }
 
+    void setType(ColorType eType) { meType = eType; }
+
     ThemeColorType getSchemeType() const { return meSchemeType; }
 
     Color getRGBColor() const { return Color(mnComponent1, mnComponent2, 
mnComponent3); }
diff --git a/oox/qa/unit/data/ReferenceShapeFill.fodp 
b/oox/qa/unit/data/ReferenceShapeFill.fodp
index d3db08712ac9..432891b0d849 100644
--- a/oox/qa/unit/data/ReferenceShapeFill.fodp
+++ b/oox/qa/unit/data/ReferenceShapeFill.fodp
@@ -350,28 +350,28 @@
    </style:graphic-properties>
    <style:paragraph-properties fo:margin-top="0.5cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" 
fo:font-family="Calibri" fo:font-size="28pt" fo:letter-spacing="normal" 
fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" 
style:text-underline-style="none" fo:font-weight="normal" 
style:letter-kerning="true" fo:background-color="transparent" 
style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto 
Sans CJK SC&apos;" style:font-family-generic-asian="system" 
style:font-pitch-asian="variable" style:font-size-asian="28pt" 
style:font-style-asian="normal" style:font-weight-asian="normal" 
style:font-name-complex="Droid Sans Devanagari" 
style:font-family-complex="&apos;Droid Sans Devanagari&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" s
 tyle:font-size-complex="28pt" style:font-style-complex="normal" 
style:font-weight-complex="normal" style:text-emphasize="none" 
style:font-relief="none" style:text-overline-style="none" 
style:text-overline-color="font-color" fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline2" style:display-name="Title 
Slide-outline2" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline1">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.4cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" 
fo:font-family="Calibri" fo:font-size="20pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="20pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="20pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline3" style:display-name="Title 
Slide-outline3" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline2">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.3cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline4" style:display-name="Title 
Slide-outline4" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline3">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.2cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline5" style:display-name="Title 
Slide-outline5" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline4">
@@ -489,7 +489,7 @@
    </style:graphic-properties>
    <style:paragraph-properties fo:line-height="100%" fo:text-align="start" 
style:punctuation-wrap="hanging" style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" 
style:text-underline-style="none" fo:font-weight="normal" 
style:letter-kerning="true" fo:background-color="transparent" 
style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto 
Sans CJK SC&apos;" style:font-family-generic-asian="system" 
style:font-pitch-asian="variable" style:font-size-asian="18pt" 
style:font-style-asian="normal" style:font-weight-asian="normal" 
style:font-name-complex="Droid Sans Devanagari" 
style:font-family-complex="&apos;Droid Sans Devanagari&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" s
 tyle:font-size-complex="18pt" style:font-style-complex="normal" 
style:font-weight-complex="normal" style:text-emphasize="none" 
style:font-relief="none" style:text-overline-style="none" 
style:text-overline-color="font-color" fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:presentation-page-layout style:name="AL0T26">
@@ -531,7 +531,7 @@
   </style:style>
   <style:style style:name="gr3" style:family="graphic" 
style:parent-style-name="standard" style:list-style-name="L3">
    <style:graphic-properties draw:stroke="solid" svg:stroke-width="0.035cm" 
svg:stroke-color="#325490" draw:stroke-linejoin="miter" 
svg:stroke-linecap="butt" draw:fill="solid" draw:fill-color="#548235" 
draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" 
draw:auto-grow-height="false" draw:fit-to-size="false" 
style:shrink-to-fit="false" fo:min-height="0cm" fo:min-width="0cm" 
fo:padding-top="0.125cm" fo:padding-bottom="0.125cm" fo:padding-left="0.25cm" 
fo:padding-right="0.25cm" fo:wrap-option="wrap" style:writing-mode="lr-tb">
-    <loext:fill-complex-color loext:theme-type="accent6">
+    <loext:fill-complex-color loext:color-type="theme" 
loext:theme-type="accent6">
      <loext:transformation loext:type="lummod" loext:value="7500"/>
     </loext:fill-complex-color>
    </style:graphic-properties>
@@ -585,7 +585,7 @@
   </style:style>
   <style:style style:name="T2" style:family="text">
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#ffffff" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri" fo:font-size="18pt" 
fo:letter-spacing="normal" fo:language="en" fo:country="GB" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal">
-    <loext:char-complex-color loext:theme-type="light1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="light1"/>
    </style:text-properties>
   </style:style>
   <text:list-style style:name="L1">
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 50968cb1a62e..8160b6bbd845 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -3411,6 +3411,9 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   <rng:define name="loext-complex-color-attlist">
     <rng:interleave>
+      <rng:attribute name="loext:color-type">
+        <rng:ref name="string"/>
+      </rng:attribute>
       <rng:optional>
         <rng:attribute name="loext:theme-type">
           <rng:ref name="theme-color"/>
diff --git a/xmloff/qa/unit/data/theme.fodp b/xmloff/qa/unit/data/theme.fodp
index b1e719d77959..dd6460281897 100644
--- a/xmloff/qa/unit/data/theme.fodp
+++ b/xmloff/qa/unit/data/theme.fodp
@@ -351,28 +351,28 @@
    </style:graphic-properties>
    <style:paragraph-properties fo:margin-top="0.5cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" 
fo:font-family="Calibri" fo:font-size="28pt" fo:letter-spacing="normal" 
fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" 
style:text-underline-style="none" fo:font-weight="normal" 
style:letter-kerning="true" fo:background-color="transparent" 
style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto 
Sans CJK SC&apos;" style:font-family-generic-asian="system" 
style:font-pitch-asian="variable" style:font-size-asian="28pt" 
style:font-style-asian="normal" style:font-weight-asian="normal" 
style:font-name-complex="Lohit Devanagari" 
style:font-family-complex="&apos;Lohit Devanagari&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" 
style:font
 -size-complex="28pt" style:font-style-complex="normal" 
style:font-weight-complex="normal" style:text-emphasize="none" 
style:font-relief="none" style:text-overline-style="none" 
style:text-overline-color="font-color" fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline2" style:display-name="Title 
Slide-outline2" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline1">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.4cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" 
fo:font-family="Calibri" fo:font-size="20pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="20pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="20pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline3" style:display-name="Title 
Slide-outline3" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline2">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.3cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline4" style:display-name="Title 
Slide-outline4" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline3">
    <style:graphic-properties style:writing-mode="lr-tb"/>
    <style:paragraph-properties fo:margin-top="0.2cm" fo:margin-bottom="0cm" 
fo:line-height="90%" fo:text-align="start" style:punctuation-wrap="hanging" 
style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal" 
fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="Title_20_Slide-outline5" style:display-name="Title 
Slide-outline5" style:family="presentation" 
style:parent-style-name="Title_20_Slide-outline4">
@@ -490,7 +490,7 @@
    </style:graphic-properties>
    <style:paragraph-properties fo:line-height="100%" fo:text-align="start" 
style:punctuation-wrap="hanging" style:writing-mode="lr-tb"/>
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" 
fo:font-family="Calibri" fo:font-size="18pt" fo:letter-spacing="normal" 
fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" 
style:text-underline-style="none" fo:font-weight="normal" 
style:letter-kerning="true" fo:background-color="transparent" 
style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto 
Sans CJK SC&apos;" style:font-family-generic-asian="system" 
style:font-pitch-asian="variable" style:font-size-asian="18pt" 
style:font-style-asian="normal" style:font-weight-asian="normal" 
style:font-name-complex="Lohit Devanagari" 
style:font-family-complex="&apos;Lohit Devanagari&apos;" 
style:font-family-generic-complex="system" style:font-pitch-complex="variable" 
style:font
 -size-complex="18pt" style:font-style-complex="normal" 
style:font-weight-complex="normal" style:text-emphasize="none" 
style:font-relief="none" style:text-overline-style="none" 
style:text-overline-color="font-color" fo:hyphenate="false">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:presentation-page-layout style:name="AL0T26">
@@ -532,7 +532,7 @@
   </style:style>
   <style:style style:name="gr3" style:family="graphic" 
style:parent-style-name="standard" style:list-style-name="L5">
    <style:graphic-properties draw:stroke="solid" svg:stroke-width="0.035cm" 
svg:stroke-color="#325490" draw:stroke-linejoin="miter" 
svg:stroke-linecap="butt" draw:fill="solid" draw:fill-color="#ffffff" 
draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" 
draw:auto-grow-height="false" draw:fit-to-size="false" 
style:shrink-to-fit="false" fo:min-height="0cm" fo:min-width="0cm" 
fo:padding-top="0.125cm" fo:padding-bottom="0.125cm" fo:padding-left="0.25cm" 
fo:padding-right="0.25cm" fo:wrap-option="wrap">
-    <loext:fill-complex-color loext:theme-type="light1"/>
+    <loext:fill-complex-color loext:color-type="theme" 
loext:theme-type="light1"/>
    </style:graphic-properties>
    <style:paragraph-properties style:writing-mode="lr-tb"/>
   </style:style>
@@ -625,19 +625,19 @@
   </style:style>
   <style:style style:name="T1" style:family="text">
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#000000" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri Light" 
fo:font-size="60pt" fo:letter-spacing="normal" fo:language="en" fo:country="US" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="60pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="60pt" 
style:font-style-complex="normal" style:font-weight-complex="normal">
-    <loext:char-complex-color loext:theme-type="dark1"/>
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1"/>
    </style:text-properties>
   </style:style>
   <style:style style:name="T2" style:family="text">
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#8b8b8b" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" fo:font-size="12pt" 
fo:letter-spacing="normal" fo:language="en" fo:country="US" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="12pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="12pt" 
style:font-style-complex="normal" style:font-weight-complex="normal">
-    <loext:char-complex-color loext:theme-type="dark1">
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="dark1">
      <loext:transformation loext:type="tint" loext:value="7500"/>
     </loext:char-complex-color>
    </style:text-properties>
   </style:style>
   <style:style style:name="T3" style:family="text">
    <style:text-properties fo:font-variant="normal" fo:text-transform="none" 
fo:color="#8faadc" loext:opacity="100%" style:text-outline="false" 
style:text-line-through-style="none" style:text-line-through-type="none" 
style:text-position="0% 100%" style:font-name="Calibri1" fo:font-size="18pt" 
fo:letter-spacing="normal" fo:language="en" fo:country="US" 
fo:font-style="normal" style:text-underline-style="none" 
fo:font-weight="normal" fo:background-color="transparent" 
style:font-size-asian="18pt" style:font-style-asian="normal" 
style:font-weight-asian="normal" style:font-size-complex="18pt" 
style:font-style-complex="normal" style:font-weight-complex="normal">
-    <loext:char-complex-color loext:theme-type="accent1">
+    <loext:char-complex-color loext:color-type="theme" 
loext:theme-type="accent1">
      <loext:transformation loext:type="lummod" loext:value="6000"/>
      <loext:transformation loext:type="lumoff" loext:value="4000"/>
     </loext:char-complex-color>
@@ -994,4 +994,4 @@
    <presentation:settings presentation:mouse-visible="false"/>
   </office:presentation>
  </office:body>
-</office:document>
\ No newline at end of file
+</office:document>
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index 5f6b46af1044..c46f70db3806 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -250,6 +250,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
     // Text color
     OString aStyle1(
         
"//style:style[@style:name='T2']/style:text-properties/loext:char-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aStyle1, "theme-type", "accent3");
     assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aStyle1 + "/loext:transformation[1]", "value", 
"2000");
@@ -258,6 +259,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
 
     OString aStyle2(
         
"//style:style[@style:name='T3']/style:text-properties/loext:char-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aStyle2, "theme-type", "accent3");
     assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aStyle2 + "/loext:transformation[1]", "value", 
"6000");
@@ -266,6 +268,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
 
     OString aStyle3(
         
"//style:style[@style:name='T4']/style:text-properties/loext:char-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aStyle3, "theme-type", "accent3");
     assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aStyle3 + "/loext:transformation[1]", "value", 
"5000");
@@ -273,6 +276,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
     // Shapes fill color
     OString 
aShape1("//style:style[@style:name='gr1']/style:graphic-properties/"
                     "loext:fill-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aShape1, "theme-type", "accent2");
     assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aShape1 + "/loext:transformation[1]", "value", 
"2000");
@@ -281,6 +285,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
 
     OString 
aShape2("//style:style[@style:name='gr2']/style:graphic-properties/"
                     "loext:fill-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aShape2, "theme-type", "accent2");
     assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aShape2 + "/loext:transformation[1]", "value", 
"6000");
@@ -289,6 +294,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, 
testThemeColorExportImport)
 
     OString 
aShape3("//style:style[@style:name='gr3']/style:graphic-properties/"
                     "loext:fill-complex-color");
+    assertXPath(pXmlDoc, aStyle1, "color-type", "theme");
     assertXPath(pXmlDoc, aShape3, "theme-type", "accent2");
     assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "type", 
"lummod");
     assertXPath(pXmlDoc, aShape3 + "/loext:transformation[1]", "value", 
"5000");
diff --git a/xmloff/source/text/XMLComplexColorContext.cxx 
b/xmloff/source/text/XMLComplexColorContext.cxx
index a01d6ae195af..3b0a8167ee6e 100644
--- a/xmloff/source/text/XMLComplexColorContext.cxx
+++ b/xmloff/source/text/XMLComplexColorContext.cxx
@@ -58,6 +58,14 @@ XMLComplexColorContext::XMLComplexColorContext(
                 }
                 break;
             }
+            case XML_ELEMENT(LO_EXT, XML_COLOR_TYPE):
+            {
+                const OUString aValue = aIter.toString();
+                if (aValue == u"theme")
+                    maComplexColor.setType(model::ColorType::Scheme);
+                // TODO - handle other color types
+                break;
+            }
             default:
                 XMLOFF_WARN_UNKNOWN("xmloff", aIter);
                 break;
diff --git a/xmloff/source/text/XMLComplexColorExport.cxx 
b/xmloff/source/text/XMLComplexColorExport.cxx
index 57457e19c656..c4554ad5ec3b 100644
--- a/xmloff/source/text/XMLComplexColorExport.cxx
+++ b/xmloff/source/text/XMLComplexColorExport.cxx
@@ -48,6 +48,7 @@ void XMLComplexColorExport::exportXML(const uno::Any& rAny, 
sal_uInt16 nPrefix,
 
     XMLTokenEnum nToken = 
constThemeColorTypeToToken[sal_Int16(aComplexColor.getSchemeType())];
     mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_THEME_TYPE, nToken);
+    mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_COLOR_TYPE, "theme");
     SvXMLElementExport aComplexColorElement(mrExport, nPrefix, rLocalName, 
true, true);
 
     for (auto const& rTransform : aComplexColor.getTransformations())

Reply via email to