cui/source/tabpages/tpcolor.cxx                   |    8 -
 docmodel/Library_docmodel.mk                      |    3 
 docmodel/source/color/ComplexColorJSON.cxx        |   20 +--
 docmodel/source/theme/ColorSet.cxx                |   12 --
 docmodel/source/uno/UnoComplexColor.cxx           |   12 +-
 docmodel/source/uno/UnoThemeColor.cxx             |   40 -------
 editeng/source/items/textitem.cxx                 |   53 +++------
 editeng/source/uno/unotext.cxx                    |    2 
 include/docmodel/color/ComplexColor.hxx           |    7 +
 include/docmodel/color/ComplexColorJSON.hxx       |    9 -
 include/docmodel/theme/ColorSet.hxx               |    2 
 include/docmodel/uno/UnoComplexColor.hxx          |    5 
 include/docmodel/uno/UnoThemeColor.hxx            |   55 ----------
 include/editeng/memberids.h                       |    4 
 include/editeng/unoprnms.hxx                      |    8 -
 include/editeng/unotext.hxx                       |    4 
 include/svx/svxids.hrc                            |    2 
 include/svx/unoshprp.hxx                          |    4 
 include/svx/xcolit.hxx                            |    9 -
 include/xmloff/txtprmap.hxx                       |    2 
 include/xmloff/xmltoken.hxx                       |    4 
 include/xmloff/xmltypes.hxx                       |    2 
 offapi/UnoApi_offapi.mk                           |    1 
 offapi/com/sun/star/util/XComplexColor.idl        |    9 +
 offapi/com/sun/star/util/XThemeColor.idl          |   26 ----
 oox/inc/drawingml/fontworkhelpers.hxx             |   16 +-
 oox/qa/unit/drawingml.cxx                         |   99 ++++++++----------
 oox/qa/unit/shape.cxx                             |   15 +-
 oox/source/drawingml/fillproperties.cxx           |   20 +--
 oox/source/drawingml/fontworkhelpers.cxx          |   94 ++++++++---------
 oox/source/drawingml/lineproperties.cxx           |   21 +--
 oox/source/drawingml/textcharacterproperties.cxx  |   16 +-
 oox/source/export/drawingml.cxx                   |   38 +++----
 oox/source/token/properties.txt                   |    6 -
 sc/source/core/data/document.cxx                  |   13 +-
 sd/qa/unit/uiimpress.cxx                          |   40 +++----
 sd/source/core/stlsheet.cxx                       |   16 +-
 sd/source/ui/func/fuconstr.cxx                    |    2 
 sd/source/ui/view/drviews2.cxx                    |   10 +
 svx/qa/unit/styles.cxx                            |   32 ++---
 svx/qa/unit/xoutdev.cxx                           |   33 ++----
 svx/sdi/svxitems.sdi                              |    4 
 svx/source/dialog/ThemeColorValueSet.cxx          |    2 
 svx/source/dialog/ThemeDialog.cxx                 |    1 
 svx/source/table/cell.cxx                         |   23 ++--
 svx/source/tbxctrls/PaletteManager.cxx            |   16 +-
 svx/source/theme/ThemeColorChanger.cxx            |   52 ++++-----
 svx/source/unodraw/unoprov.cxx                    |    2 
 svx/source/unodraw/unoshap2.cxx                   |    2 
 svx/source/unodraw/unoshape.cxx                   |   17 +--
 svx/source/xoutdev/xattr.cxx                      |   63 +++++------
 sw/qa/core/theme/ThemeTest.cxx                    |   11 --
 sw/source/core/model/ThemeColorChanger.cxx        |    2 
 sw/source/core/unocore/unomap.cxx                 |    4 
 sw/source/core/unocore/unomap1.cxx                |    6 -
 sw/source/core/unocore/unomapproperties.hxx       |    6 -
 sw/source/filter/xml/xmlfmte.cxx                  |    2 
 writerfilter/source/dmapper/DomainMapper.cxx      |   14 +-
 writerfilter/source/dmapper/PropertyIds.cxx       |    2 
 writerfilter/source/dmapper/PropertyIds.hxx       |    2 
 writerfilter/source/dmapper/ThemeColorHandler.hxx |    2 
 xmloff/inc/XMLThemeColorContext.hxx               |    4 
 xmloff/inc/XMLThemeColorHandler.hxx               |   21 +--
 xmloff/inc/xmlprop.hxx                            |    4 
 xmloff/qa/unit/draw.cxx                           |  119 ++++++++++------------
 xmloff/source/core/xmltoken.cxx                   |    4 
 xmloff/source/draw/XMLShapePropertySetContext.cxx |    2 
 xmloff/source/draw/sdpropls.cxx                   |    6 -
 xmloff/source/text/XMLTextPropertySetContext.cxx  |    2 
 xmloff/source/text/XMLTextShapeStyleContext.cxx   |    2 
 xmloff/source/text/XMLThemeColorContext.cxx       |    8 -
 xmloff/source/text/XMLThemeColorExport.cxx        |   19 +--
 xmloff/source/text/txtexppr.cxx                   |    2 
 xmloff/source/text/txtprhdl.cxx                   |    4 
 xmloff/source/text/txtprmap.cxx                   |    6 -
 75 files changed, 529 insertions(+), 681 deletions(-)

New commits:
commit ca3bfa9bded6103d4d172ace486b697beeb191be
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu May 11 23:01:10 2023 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri May 12 05:00:39 2023 +0200

    change ComplexColor to show more useful properties
    
    Change-Id: Ie19f080f2faf388f9b8ba3e9a4b3c0926d5ebdd4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151674
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/docmodel/source/uno/UnoComplexColor.cxx 
b/docmodel/source/uno/UnoComplexColor.cxx
index bffa81329f70..673627bc98a4 100644
--- a/docmodel/source/uno/UnoComplexColor.cxx
+++ b/docmodel/source/uno/UnoComplexColor.cxx
@@ -13,7 +13,14 @@
 
 using namespace css;
 
-css::util::Color UnoComplexColor::getColor() { return 
css::util::Color(maColor.getRGBColor()); }
+sal_Int32 UnoComplexColor::getType() { return sal_Int32(maColor.getType()); }
+
+sal_Int32 UnoComplexColor::getSchemeColorType() { return 
sal_Int32(maColor.getSchemeType()); }
+
+util::Color UnoComplexColor::resolveColor(uno::Reference<util::XTheme> const& 
/*xTheme*/)
+{
+    return util::Color(maColor.getRGBColor());
+}
 
 namespace model::color
 {
@@ -22,8 +29,7 @@ uno::Reference<util::XComplexColor> 
createXComplexColor(model::ComplexColor cons
     return new UnoComplexColor(rColor);
 }
 
-model::ComplexColor
-getFromXComplexColor(css::uno::Reference<css::util::XComplexColor> const& 
rxColor)
+model::ComplexColor getFromXComplexColor(uno::Reference<util::XComplexColor> 
const& rxColor)
 {
     model::ComplexColor aComplexColor;
     UnoComplexColor const* pUnoComplexColor = static_cast<UnoComplexColor 
const*>(rxColor.get());
diff --git a/include/docmodel/uno/UnoComplexColor.hxx 
b/include/docmodel/uno/UnoComplexColor.hxx
index 69a0fe4e35b9..c15e53404a3b 100644
--- a/include/docmodel/uno/UnoComplexColor.hxx
+++ b/include/docmodel/uno/UnoComplexColor.hxx
@@ -36,7 +36,10 @@ public:
     model::ComplexColor const& getComplexColor() const { return maColor; }
 
     // XComplexColor
-    css::util::Color SAL_CALL getColor() override;
+    sal_Int32 SAL_CALL getType() override;
+    sal_Int32 SAL_CALL getSchemeColorType() override;
+    css::util::Color SAL_CALL
+    resolveColor(css::uno::Reference<css::util::XTheme> const& xTheme) 
override;
 };
 
 namespace model::color
diff --git a/offapi/com/sun/star/util/XComplexColor.idl 
b/offapi/com/sun/star/util/XComplexColor.idl
index 864e4b1516de..668b7b310eb2 100644
--- a/offapi/com/sun/star/util/XComplexColor.idl
+++ b/offapi/com/sun/star/util/XComplexColor.idl
@@ -17,8 +17,13 @@ module com {  module sun {  module star {  module util {
 */
 interface XComplexColor
 {
-    /** */
-    Color getColor();
+    long getType();
+
+    long getSchemeColorType();
+
+    /** resolve the color */
+    Color resolveColor([in] com::sun::star::util::XTheme xTheme);
+
 };
 
 }; }; }; };
commit 1df0565fb92972bd410e7db85eef1e4bec3fcc31
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon May 8 14:09:00 2023 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri May 12 05:00:28 2023 +0200

    use ComplexColor instead of ThemeColor for better OOXML compat.
    
    In OOXML a color definition includes more represenations, one of
    which is scheme color (which is what is implemented in ThemeColor
    currently), but it supports other representations too (RGB, HSL,
    System,..). ComplexColor includes all the representations, so to
    have a better compatibility with OOXML, this changes all uses of
    ThemeColor to ComplexColor.
    In many cases the usage of ComplexColor isn't the same as the
    usage of ThemeColors, but this cases will need to be changed in a
    later commit.
    
    Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 694fce496f96..799f53957678 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -247,16 +247,16 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
     model::ThemeColorType eType = 
model::convertToThemeColorType(aCurrentColor.m_nThemeIndex);
     if (eType != model::ThemeColorType::Unknown)
     {
-        aColorItem.GetThemeColor().setType(eType);
+        aColorItem.getComplexColor().setSchemeColor(eType);
     }
-    aColorItem.GetThemeColor().clearTransformations();
+    aColorItem.getComplexColor().clearTransformations();
     if (aCurrentColor.m_nLumMod != 10000)
     {
-        
aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumMod,
 aCurrentColor.m_nLumMod});
+        
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumMod,
 aCurrentColor.m_nLumMod});
     }
     if (aCurrentColor.m_nLumOff != 0)
     {
-        
aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumOff,
 aCurrentColor.m_nLumOff});
+        
aColorItem.getComplexColor().addTransformation({model::TransformationType::LumOff,
 aCurrentColor.m_nLumOff});
     }
     rSet->Put( aColorItem );
     rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
diff --git a/docmodel/Library_docmodel.mk b/docmodel/Library_docmodel.mk
index 7f0623bcbeda..2e474eb4f0b8 100644
--- a/docmodel/Library_docmodel.mk
+++ b/docmodel/Library_docmodel.mk
@@ -11,11 +11,10 @@ $(eval $(call gb_Library_Library,docmodel))
 
 $(eval $(call gb_Library_add_exception_objects,docmodel,\
     docmodel/source/uno/UnoComplexColor \
-    docmodel/source/uno/UnoThemeColor \
     docmodel/source/uno/UnoTheme \
     docmodel/source/theme/ColorSet \
     docmodel/source/theme/Theme \
-    docmodel/source/theme/ThemeColorJSON \
+    docmodel/source/color/ComplexColorJSON \
 ))
 
 $(eval $(call gb_Library_set_include,docmodel,\
diff --git a/docmodel/source/theme/ThemeColorJSON.cxx 
b/docmodel/source/color/ComplexColorJSON.cxx
similarity index 83%
rename from docmodel/source/theme/ThemeColorJSON.cxx
rename to docmodel/source/color/ComplexColorJSON.cxx
index 24b39fc190da..d04e2c1e339b 100644
--- a/docmodel/source/theme/ThemeColorJSON.cxx
+++ b/docmodel/source/color/ComplexColorJSON.cxx
@@ -8,17 +8,17 @@
  *
  */
 
-#include <docmodel/theme/ThemeColorJSON.hxx>
+#include <docmodel/color/ComplexColorJSON.hxx>
 #include <sstream>
 #include <utility>
 #include <sal/log.hxx>
 #include <boost/property_tree/json_parser.hpp>
 
-namespace model::theme
+namespace model::color
 {
-bool convertFromJSON(OString const& rJsonString, model::ThemeColor& 
rThemeColor)
+bool convertFromJSON(OString const& rJsonString, model::ComplexColor& 
rComplexColor)
 {
-    model::ThemeColor aThemeColor;
+    model::ComplexColor aComplexColor;
     std::stringstream aStream((std::string(rJsonString)));
     boost::property_tree::ptree aRootTree;
     try
@@ -31,7 +31,7 @@ bool convertFromJSON(OString const& rJsonString, 
model::ThemeColor& rThemeColor)
     }
 
     sal_Int32 nThemeType = aRootTree.get<sal_Int32>("ThemeIndex", -1);
-    aThemeColor.setType(model::convertToThemeColorType(nThemeType));
+    aComplexColor.setSchemeColor(model::convertToThemeColorType(nThemeType));
     boost::property_tree::ptree aTransformTree = 
aRootTree.get_child("Transformations");
     for (const auto& rEachTransformationNode :
          boost::make_iterator_range(aTransformTree.equal_range("")))
@@ -51,19 +51,19 @@ bool convertFromJSON(OString const& rJsonString, 
model::ThemeColor& rThemeColor)
             eType = model::TransformationType::Shade;
 
         if (eType != model::TransformationType::Undefined)
-            aThemeColor.addTransformation({ eType, nValue });
+            aComplexColor.addTransformation({ eType, nValue });
     }
-    rThemeColor = aThemeColor;
+    rComplexColor = aComplexColor;
     return true;
 }
 
-OString convertToJSON(model::ThemeColor const& rThemeColor)
+OString convertToJSON(model::ComplexColor const& rComplexColor)
 {
     boost::property_tree::ptree aTree;
-    aTree.put("ThemeIndex", sal_Int16(rThemeColor.getType()));
+    aTree.put("ThemeIndex", sal_Int16(rComplexColor.getSchemeType()));
 
     boost::property_tree::ptree aTransformationsList;
-    for (auto const& rTransformation : rThemeColor.getTransformations())
+    for (auto const& rTransformation : rComplexColor.getTransformations())
     {
         std::string aType;
         switch (rTransformation.meType)
diff --git a/docmodel/source/theme/ColorSet.cxx 
b/docmodel/source/theme/ColorSet.cxx
index 44cd5bdc6c4f..71b928b9f2a7 100644
--- a/docmodel/source/theme/ColorSet.cxx
+++ b/docmodel/source/theme/ColorSet.cxx
@@ -38,18 +38,6 @@ Color ColorSet::getColor(model::ThemeColorType eType) const
     return maColors[size_t(eType)];
 }
 
-Color ColorSet::resolveColor(model::ThemeColor const& rThemeColor) const
-{
-    auto eType = rThemeColor.getType();
-    if (eType == model::ThemeColorType::Unknown)
-    {
-        SAL_WARN("svx", "ColorSet::resolveColor with ThemeColorType::Unknown");
-        return COL_AUTO;
-    }
-    Color aColor = getColor(eType);
-    return rThemeColor.applyTransformations(aColor);
-}
-
 Color ColorSet::resolveColor(model::ComplexColor const& rComplexColor) const
 {
     auto eSchemeType = rComplexColor.meSchemeType;
diff --git a/docmodel/source/uno/UnoThemeColor.cxx 
b/docmodel/source/uno/UnoThemeColor.cxx
deleted file mode 100644
index f6374b54933b..000000000000
--- a/docmodel/source/uno/UnoThemeColor.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <docmodel/uno/UnoThemeColor.hxx>
-#include <cppuhelper/queryinterface.hxx>
-
-using namespace css;
-
-// css::lang::XUnoTunnel
-UNO3_GETIMPLEMENTATION_IMPL(UnoThemeColor);
-
-sal_Int16 UnoThemeColor::getType() { return 
sal_uInt16(maThemeColor.getType()); }
-
-namespace model::theme
-{
-uno::Reference<util::XThemeColor> createXThemeColor(model::ThemeColor const& 
rThemeColor)
-{
-    return new UnoThemeColor(rThemeColor);
-}
-
-void setFromXThemeColor(model::ThemeColor& rThemeColor,
-                        uno::Reference<util::XThemeColor> const& rxColorTheme)
-{
-    UnoThemeColor* pUnoThemeColor = 
comphelper::getFromUnoTunnel<UnoThemeColor>(rxColorTheme);
-    if (pUnoThemeColor)
-    {
-        rThemeColor = pUnoThemeColor->getThemeColor();
-    }
-}
-
-} // end model::theme
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 153319ae8e75..1112bcf1a548 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -77,8 +77,9 @@
 #include <editeng/charreliefitem.hxx>
 #include <editeng/itemtype.hxx>
 #include <editeng/eerdll.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
-#include <docmodel/theme/ThemeColorJSON.hxx>
+#include <docmodel/color/ComplexColorJSON.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
+#include <docmodel/color/ComplexColor.hxx>
 #include <libxml/xmlwriter.h>
 
 using namespace ::com::sun::star;
@@ -1444,17 +1445,15 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
             rVal <<= nValue;
             break;
         }
-        case MID_COLOR_THEME_REFERENCE:
+        case MID_COMPLEX_COLOR_JSON:
         {
-            model::ThemeColor aThemeColor = maComplexColor.createThemeColor();
-            auto xThemeColor = model::theme::createXThemeColor(aThemeColor);
-            rVal <<= xThemeColor;
+            rVal <<= 
OStringToOUString(model::color::convertToJSON(maComplexColor), 
RTL_TEXTENCODING_UTF8);
             break;
         }
-        case MID_COLOR_THEME_REFERENCE_JSON:
+        case MID_COMPLEX_COLOR:
         {
-            model::ThemeColor aThemeColor = maComplexColor.createThemeColor();
-            rVal <<= 
OStringToOUString(model::theme::convertToJSON(aThemeColor), 
RTL_TEXTENCODING_UTF8);
+            auto xComplexColor = 
model::color::createXComplexColor(maComplexColor);
+            rVal <<= xComplexColor;
             break;
         }
         case MID_COLOR_RGB:
@@ -1532,42 +1531,30 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
             
maComplexColor.addTransformation({model::TransformationType::LumOff, nLumOff});
         }
         break;
-        case MID_COLOR_THEME_REFERENCE:
+        case MID_COMPLEX_COLOR_JSON:
         {
-            css::uno::Reference<css::util::XThemeColor> xThemeColor;
-            if (!(rVal >>= xThemeColor))
+            OUString sComplexColorJson;
+            if (!(rVal >>= sComplexColorJson))
                 return false;
 
-            if (xThemeColor.is())
+            if (sComplexColorJson.isEmpty())
             {
-                model::ThemeColor aThemeColor;
-                model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-                maComplexColor = model::ComplexColor();
-                maComplexColor.setSchemeColor(aThemeColor.getType());
-                
maComplexColor.setTransformations(aThemeColor.getTransformations());
+                return false;
             }
+            OString aJSON = OUStringToOString(sComplexColorJson, 
RTL_TEXTENCODING_ASCII_US);
+            model::color::convertFromJSON(aJSON, maComplexColor);
         }
         break;
-
-        case MID_COLOR_THEME_REFERENCE_JSON:
+        case MID_COMPLEX_COLOR:
         {
-            OUString sThemeJson;
-            if (!(rVal >>= sThemeJson))
+            css::uno::Reference<css::util::XComplexColor> xComplexColor;
+            if (!(rVal >>= xComplexColor))
                 return false;
 
-            if (sThemeJson.isEmpty())
-            {
-                return false;
-            }
-            OString aJSON = OUStringToOString(sThemeJson, 
RTL_TEXTENCODING_ASCII_US);
-            model::ThemeColor aThemeColor;
-            model::theme::convertFromJSON(aJSON, aThemeColor);
-            maComplexColor = model::ComplexColor();
-            maComplexColor.setSchemeColor(aThemeColor.getType());
-            
maComplexColor.setTransformations(aThemeColor.getTransformations());
+            if (xComplexColor.is())
+                maComplexColor = 
model::color::getFromXComplexColor(xComplexColor);
         }
         break;
-
         case MID_COLOR_RGB:
         default:
         {
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index c6a6732ba414..6f78a4a66878 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1176,7 +1176,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const 
SfxItemSet* pSet, const Sf
                     }
                     break;
                 }
-                case MID_COLOR_THEME_REFERENCE:
+                case MID_COMPLEX_COLOR:
                     if (pColor->getComplexColor().meType == 
model::ColorType::Unused)
                     {
                         eItemState = SfxItemState::DEFAULT;
diff --git a/include/docmodel/color/ComplexColor.hxx 
b/include/docmodel/color/ComplexColor.hxx
index f5dd37c2e901..471c6b30e4d1 100644
--- a/include/docmodel/color/ComplexColor.hxx
+++ b/include/docmodel/color/ComplexColor.hxx
@@ -89,6 +89,11 @@ public:
     ThemeColorType meSchemeType = ThemeColorType::Unknown;
     std::vector<Transformation> maTransformations;
 
+public:
+    ColorType getType() const { return meType; }
+
+    ThemeColorType getSchemeType() const { return meSchemeType; }
+
     Color getRGBColor() const { return Color(mnComponent1, mnComponent2, 
mnComponent3); }
 
     std::vector<Transformation> const& getTransformations() const { return 
maTransformations; }
@@ -112,6 +117,8 @@ public:
                                 maTransformations.end());
     }
 
+    void clearTransformations() { maTransformations.clear(); }
+
     void setCRGB(sal_Int32 nR, sal_Int32 nG, sal_Int32 nB)
     {
         mnComponent1 = nR;
diff --git a/include/docmodel/theme/ThemeColorJSON.hxx 
b/include/docmodel/color/ComplexColorJSON.hxx
similarity index 69%
rename from include/docmodel/theme/ThemeColorJSON.hxx
rename to include/docmodel/color/ComplexColorJSON.hxx
index 008850730e99..bf23e4f0565a 100644
--- a/include/docmodel/theme/ThemeColorJSON.hxx
+++ b/include/docmodel/color/ComplexColorJSON.hxx
@@ -11,12 +11,13 @@
 #pragma once
 
 #include <docmodel/dllapi.h>
-#include <docmodel/theme/ThemeColor.hxx>
+#include <docmodel/color/ComplexColor.hxx>
 
-namespace model::theme
+namespace model::color
 {
-DOCMODEL_DLLPUBLIC OString convertToJSON(model::ThemeColor const& rThemeColor);
-DOCMODEL_DLLPUBLIC bool convertFromJSON(OString const& rJsonString, 
model::ThemeColor& rThemeColor);
+DOCMODEL_DLLPUBLIC OString convertToJSON(model::ComplexColor const& 
rComplexColor);
+DOCMODEL_DLLPUBLIC bool convertFromJSON(OString const& rJsonString,
+                                        model::ComplexColor& rComplexColor);
 
 } // end of namespace model
 
diff --git a/include/docmodel/theme/ColorSet.hxx 
b/include/docmodel/theme/ColorSet.hxx
index 0b7a8a6efdd6..4309c4719a64 100644
--- a/include/docmodel/theme/ColorSet.hxx
+++ b/include/docmodel/theme/ColorSet.hxx
@@ -36,8 +36,6 @@ public:
 
     const OUString& getName() const { return maName; }
 
-    Color resolveColor(model::ThemeColor const& rThemeColor) const;
-
     Color resolveColor(model::ComplexColor const& rComplexColor) const;
 
     Color getColor(model::ThemeColorType eType) const;
diff --git a/include/docmodel/uno/UnoThemeColor.hxx 
b/include/docmodel/uno/UnoThemeColor.hxx
deleted file mode 100644
index 50063ab981dd..000000000000
--- a/include/docmodel/uno/UnoThemeColor.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#pragma once
-
-#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <comphelper/servicehelper.hxx>
-
-#include <com/sun/star/util/Color.hpp>
-#include <com/sun/star/util/XThemeColor.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <utility>
-#include <docmodel/dllapi.h>
-#include <docmodel/theme/ThemeColor.hxx>
-
-class DOCMODEL_DLLPUBLIC UnoThemeColor final
-    : public cppu::WeakImplHelper<css::util::XThemeColor, 
css::lang::XUnoTunnel>
-{
-private:
-    model::ThemeColor maThemeColor;
-
-public:
-    UnoThemeColor(model::ThemeColor const& rThemeColor)
-        : maThemeColor(rThemeColor)
-    {
-    }
-
-    model::ThemeColor const& getThemeColor() const { return maThemeColor; }
-
-    // XThemeColor
-    sal_Int16 SAL_CALL getType() override;
-
-    UNO3_GETIMPLEMENTATION_DECL(UnoThemeColor)
-};
-
-namespace model::theme
-{
-DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XThemeColor>
-createXThemeColor(model::ThemeColor const& rThemeColor);
-
-DOCMODEL_DLLPUBLIC void
-setFromXThemeColor(model::ThemeColor& rThemeColor,
-                   css::uno::Reference<css::util::XThemeColor> const& 
rxThemeColor);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index 0db3c27d0128..e5f1f075290a 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -189,8 +189,8 @@
 #define MID_COLOR_TINT_OR_SHADE 5
 #define MID_COLOR_LUM_MOD       6
 #define MID_COLOR_LUM_OFF       7
-#define MID_COLOR_THEME_REFERENCE 8
-#define MID_COLOR_THEME_REFERENCE_JSON 9
+#define MID_COMPLEX_COLOR_JSON  8
+#define MID_COMPLEX_COLOR       9
 
 
 #endif
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 9c96b29e8681..8859dfe5a4a5 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -23,7 +23,7 @@
 inline constexpr OUStringLiteral UNO_NAME_CHAR_COLOR = u"CharColor";
 inline constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_THEME = u"CharColorTheme";
 inline constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_TINT_OR_SHADE = 
u"CharColorTintOrShade";
-inline constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_THEME_REFERENCE = 
u"CharColorThemeReference";
+inline constexpr OUStringLiteral UNO_NAME_CHAR_COMPLEX_COLOR = 
u"CharComplexColor";
 inline constexpr OUStringLiteral UNO_NAME_CHAR_HEIGHT = u"CharHeight";
 inline constexpr OUStringLiteral UNO_NAME_CHAR_POSTURE = u"CharPosture";
 inline constexpr OUStringLiteral UNO_NAME_CHAR_SHADOWED = u"CharShadowed";
@@ -35,7 +35,7 @@ inline constexpr OUStringLiteral UNO_NAME_FILLCOLOR = 
u"FillColor";
 inline constexpr OUStringLiteral UNO_NAME_FILLCOLOR_THEME = u"FillColorTheme";
 inline constexpr OUStringLiteral UNO_NAME_FILLCOLOR_LUM_MOD = 
u"FillColorLumMod";
 inline constexpr OUStringLiteral UNO_NAME_FILLCOLOR_LUM_OFF = 
u"FillColorLumOff";
-inline constexpr OUStringLiteral UNO_NAME_FILLCOLOR_THEME_REFERENCE = 
u"FillColorThemeReference";
+inline constexpr OUStringLiteral UNO_NAME_FILL_COMPLEX_COLOR = 
u"FillComplexColor";
 inline constexpr OUStringLiteral UNO_NAME_FILLGRADIENT = u"FillGradient";
 inline constexpr OUStringLiteral UNO_NAME_FILLGRADIENTNAME = 
u"FillGradientName";
 inline constexpr OUStringLiteral UNO_NAME_FILLHATCH = u"FillHatch";
@@ -77,7 +77,7 @@ inline constexpr OUStringLiteral UNO_NAME_LINESTYLE = 
u"LineStyle";
 inline constexpr OUStringLiteral UNO_NAME_LINEDASH = u"LineDash";
 inline constexpr OUStringLiteral UNO_NAME_LINEWIDTH = u"LineWidth";
 inline constexpr OUStringLiteral UNO_NAME_LINECOLOR = u"LineColor";
-inline constexpr OUStringLiteral UNO_NAME_LINECOLOR_THEME_REFERENCE = 
u"LineColorThemeReference";
+inline constexpr OUStringLiteral UNO_NAME_LINE_COMPLEX_COLOR = 
u"LineComplexColor";
 inline constexpr OUStringLiteral UNO_NAME_LINEJOINT = u"LineJoint";
 inline constexpr OUStringLiteral UNO_NAME_LINESTART = u"LineStart";
 inline constexpr OUStringLiteral UNO_NAME_LINEEND = u"LineEnd";
@@ -340,7 +340,7 @@ inline constexpr OUStringLiteral 
UNO_NAME_EDIT_CHAR_COLOR_THEME = u"CharColorThe
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COLOR_TINT_OR_SHADE = 
u"CharColorTintOrShade";
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COLOR_LUM_MOD = 
u"CharColorLumMod";
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COLOR_LUM_OFF = 
u"CharColorLumOff";
-inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COLOR_THEME_REFERENCE = 
u"CharColorThemeReference";
+inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COMPLEX_COLOR = 
u"CharComplexColor";
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_TRANSPARENCE = 
u"CharTransparence";
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_CROSSEDOUT = 
u"CharCrossedOut";
 inline constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_STRIKEOUT = 
u"CharStrikeout";
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 935f6ce1b66b..84dc7d9fdb6f 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -41,7 +41,7 @@
 #include <com/sun/star/style/LineSpacing.hpp>
 #include <com/sun/star/style/TabStop.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/util/XThemeColor.hpp>
+#include <com/sun/star/util/XComplexColor.hpp>
 #include <comphelper/interfacecontainer4.hxx>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/weakagg.hxx>
@@ -92,7 +92,7 @@ struct SfxItemPropertyMapEntry;
     { UNO_NAME_EDIT_CHAR_COLOR_TINT_OR_SHADE, EE_CHAR_COLOR, 
::cppu::UnoType<sal_Int16>::get(),     0, MID_COLOR_TINT_OR_SHADE }, \
     { UNO_NAME_EDIT_CHAR_COLOR_LUM_MOD,       EE_CHAR_COLOR, 
::cppu::UnoType<sal_Int16>::get(),     0, MID_COLOR_LUM_MOD }, \
     { UNO_NAME_EDIT_CHAR_COLOR_LUM_OFF,       EE_CHAR_COLOR, 
::cppu::UnoType<sal_Int16>::get(),     0, MID_COLOR_LUM_OFF }, \
-    { UNO_NAME_EDIT_CHAR_COLOR_THEME_REFERENCE, EE_CHAR_COLOR,    
::cppu::UnoType<css::util::XThemeColor>::get(), 0, MID_COLOR_THEME_REFERENCE }, 
\
+    { UNO_NAME_EDIT_CHAR_COMPLEX_COLOR, EE_CHAR_COLOR,    
::cppu::UnoType<css::util::XComplexColor>::get(), 0, MID_COMPLEX_COLOR }, \
     { u"CharBackColor",                EE_CHAR_BKGCOLOR,   
::cppu::UnoType<sal_Int32>::get(),        0, 0 }, \
     { u"CharBackTransparent",          EE_CHAR_BKGCOLOR,   
::cppu::UnoType<bool>::get(),             0, MID_GRAPHIC_TRANSPARENT }, \
     { UNO_NAME_EDIT_CHAR_ESCAPEMENT,  EE_CHAR_ESCAPEMENT, 
::cppu::UnoType<sal_Int16>::get(),        0, MID_ESC }, \
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index d3da901a09ce..90aae09d2c69 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -449,7 +449,7 @@ class XFillGradientItem;
 #define SID_ATTR_TEXTCOLUMNS_NUMBER                     ( SID_SVX_START + 340 )
 #define SID_ATTR_TEXTCOLUMNS_SPACING                    ( SID_SVX_START + 341 )
 
-#define SID_ATTR_COLOR_THEME_REFERENCE                  
TypedWhichId<SvxColorItem>( SID_SVX_START + 342 )
+// FREE                                                 ( SID_SVX_START + 342 )
 #define SID_ATTR_COLOR_THEME_INDEX                      
TypedWhichId<SfxInt16Item>( SID_SVX_START + 343 )
 #define SID_ATTR_COLOR_LUM_MOD                          
TypedWhichId<SfxInt16Item>( SID_SVX_START + 344 )
 #define SID_ATTR_COLOR_LUM_OFF                          
TypedWhichId<SfxInt16Item>( SID_SVX_START + 345 )
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 828e02771e4b..6c60eac60933 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -237,7 +237,7 @@
 #define LINE_PROPERTIES_DEFAULTS\
     { UNO_NAME_LINECAP,           XATTR_LINECAP,          
::cppu::UnoType<css::drawing::LineCap>::get(),     0,     0}, \
     { UNO_NAME_LINECOLOR,         XATTR_LINECOLOR,        
::cppu::UnoType<sal_Int32>::get() ,           0,     0}, \
-    { UNO_NAME_LINECOLOR_THEME_REFERENCE, XATTR_LINECOLOR, 
::cppu::UnoType<css::util::XThemeColor>::get() ,           0, 
MID_COLOR_THEME_REFERENCE}, \
+    { UNO_NAME_LINE_COMPLEX_COLOR, XATTR_LINECOLOR, 
::cppu::UnoType<css::util::XComplexColor>::get() ,           0, 
MID_COMPLEX_COLOR}, \
     { UNO_NAME_LINEENDCENTER,     XATTR_LINEENDCENTER,    
cppu::UnoType<bool>::get() ,           0,     0}, \
     { UNO_NAME_LINEENDWIDTH,      XATTR_LINEENDWIDTH,     
::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { UNO_NAME_LINEJOINT,         XATTR_LINEJOINT,        
::cppu::UnoType<css::drawing::LineJoint>::get(),     0,     0}, \
@@ -294,7 +294,7 @@
     { UNO_NAME_FILLCOLOR_THEME,   XATTR_FILLCOLOR, 
::cppu::UnoType<sal_Int16>::get(),          0,     MID_COLOR_THEME_INDEX}, \
     { UNO_NAME_FILLCOLOR_LUM_MOD, XATTR_FILLCOLOR, 
::cppu::UnoType<sal_Int16>::get(),          0,     MID_COLOR_LUM_MOD}, \
     { UNO_NAME_FILLCOLOR_LUM_OFF, XATTR_FILLCOLOR, 
::cppu::UnoType<sal_Int16>::get(),          0,     MID_COLOR_LUM_OFF}, \
-    { UNO_NAME_FILLCOLOR_THEME_REFERENCE,   XATTR_FILLCOLOR, 
::cppu::UnoType<css::util::XThemeColor>::get(),          0,     
MID_COLOR_THEME_REFERENCE}, \
+    { UNO_NAME_FILL_COMPLEX_COLOR,   XATTR_FILLCOLOR, 
::cppu::UnoType<css::util::XComplexColor>::get(), 0, MID_COMPLEX_COLOR}, \
     { UNO_NAME_GRAPHIC_GRAPHICCROP, SDRATTR_GRAFCROP      , 
::cppu::UnoType<css::text::GraphicCrop>::get(), 0, 0 }, \
     { UNO_NAME_FILLUSESLIDEBACKGROUND, XATTR_FILLUSESLIDEBACKGROUND, 
cppu::UnoType<bool>::get(), 0,   0},
 
diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx
index 3ece0ef3b52b..965d10195146 100644
--- a/include/svx/xcolit.hxx
+++ b/include/svx/xcolit.hxx
@@ -22,7 +22,7 @@
 
 #include <tools/color.hxx>
 #include <editeng/colritem.hxx>
-#include <docmodel/theme/ThemeColor.hxx>
+#include <docmodel/color/ComplexColor.hxx>
 
 #include <svx/svxdllapi.h>
 #include <svx/xit.hxx>
@@ -32,7 +32,7 @@ class XColorList;
 class SVXCORE_DLLPUBLIC XColorItem : public NameOrIndex
 {
     Color   aColor;
-    model::ThemeColor maThemeColor;
+    model::ComplexColor maComplexColor;
 
 public:
             static SfxPoolItem* CreateDefault();
@@ -50,8 +50,9 @@ public:
     const Color&    GetColorValue() const;
     void            SetColorValue(const Color& rNew) { aColor = rNew; 
Detach(); }
 
-    model::ThemeColor& GetThemeColor() { return maThemeColor; }
-    const model::ThemeColor& GetThemeColor() const { return maThemeColor; }
+    void setComplexColor(model::ComplexColor const& rComplexColor) { 
maComplexColor = rComplexColor; }
+    const model::ComplexColor& getComplexColor() const { return 
maComplexColor; }
+    model::ComplexColor& getComplexColor() { return maComplexColor; }
 
     virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx
index 986bbd007d8a..53b2a36edfa0 100644
--- a/include/xmloff/txtprmap.hxx
+++ b/include/xmloff/txtprmap.hxx
@@ -202,7 +202,7 @@
 #define CTF_FILLSTYLE                       (XML_TEXT_CTF_START + 173)
 #define CTF_FILLCOLOR                       (XML_TEXT_CTF_START + 174)
 #define CTF_PAGENUMBEROFFSET                (XML_TEXT_CTF_START + 175)
-#define CTF_THEME_COLOR                     (XML_TEXT_CTF_START + 176)
+#define CTF_COMPLEX_COLOR                   (XML_TEXT_CTF_START + 176)
 
 enum class TextPropMap {
     TEXT = 0,
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 7f4f21c15dfc..ad512edb86dc 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3489,8 +3489,8 @@ namespace xmloff::token {
         XML_LINKED_STYLE_NAME,
 
         XML_THEME,
-        XML_CHAR_COLOR_THEME_REFERENCE,
-        XML_FILL_COLOR_THEME_REFERENCE,
+        XML_CHAR_COMPLEX_COLOR,
+        XML_FILL_COMPLEX_COLOR,
         XML_DK1,
         XML_LT1,
         XML_DK2,
diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 4dbf2081db1b..8c9b001b061d 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -295,7 +295,7 @@
 #define XML_TYPE_GRAPHIC                (XML_TEXT_TYPES_START + 127)
 #define XML_SW_TYPE_PRESPAGE_BACKSIZE   (XML_TEXT_TYPES_START + 128)
 #define XML_SW_TYPE_RTLGUTTER           (XML_TEXT_TYPES_START + 129)
-#define XML_TYPE_THEME_COLOR            (XML_TEXT_TYPES_START + 130)
+#define XML_TYPE_COMPLEX_COLOR          (XML_TEXT_TYPES_START + 130)
 
 #endif // INCLUDED_XMLOFF_XMLTYPES_HXX
 
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 51eed6e3e4cd..7ee71bb984c1 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4176,7 +4176,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/util,\
        XCloseable \
        XComplexColor \
        XTheme \
-       XThemeColor \
        XDataEditor \
        XDataEditorListener \
        XFlushListener \
diff --git a/offapi/com/sun/star/util/XThemeColor.idl 
b/offapi/com/sun/star/util/XThemeColor.idl
deleted file mode 100644
index 7da38c4850a2..000000000000
--- a/offapi/com/sun/star/util/XThemeColor.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-
-module com {  module sun {  module star {  module util {
-
-
-/** Theme Color interface
-
-    @since LibreOffice 7.6
-*/
-interface XThemeColor
-{
-    /** Type of the theme color */
-    short getType();
-};
-
-}; }; }; };
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/fontworkhelpers.hxx 
b/oox/inc/drawingml/fontworkhelpers.hxx
index b7d4c5594854..9a550b00904c 100644
--- a/oox/inc/drawingml/fontworkhelpers.hxx
+++ b/oox/inc/drawingml/fontworkhelpers.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#include <docmodel/theme/ThemeColor.hxx>
+#include <docmodel/color/ComplexColor.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
 #include <svx/msdffdef.hxx>
@@ -53,7 +53,7 @@ void putCustomShapeIntoTextPathMode(
 OString GetVMLFontworkShapetypeMarkup(const MSO_SPT eShapeType);
 
 /** Collects the properties "CharColor", "CharLumMod", "CharLumOff", 
"CharColorTheme",
-    "CharColorThemeReference" and "CharTransparence" from the first non-empty 
run in rXText and puts
+    "CharComplexColor" and "CharTransparence" from the first non-empty run in 
rXText and puts
     them into rCharPropVec.*/
 void collectCharColorProps(const css::uno::Reference<css::text::XText>& rXText,
                            std::vector<css::beans::PropertyValue>& 
rCharPropVec);
@@ -64,8 +64,8 @@ void applyPropsToRuns(const 
std::vector<css::beans::PropertyValue>& rTextPropVec
                       css::uno::Reference<css::text::XText>& rXText);
 
 /** Generates the properties "CharColor", "CharLumMod", "CharLumOff", 
"CharColorTheme",
-    "CharColorThemeReference" and "CharTransparence" from the shape properties 
"FillColor",
-    "FillColorLumMod, "FillColorLumOff", "FillColorTheme", 
"FillColorThemeReference" and
+    "CharComplexColor" and "CharTransparence" from the shape properties 
"FillColor",
+    "FillColorLumMod, "FillColorLumOff", "FillColorTheme", "FillComplexColor" 
and
     "FillTransparence" and puts them into rCharPropVec.*/
 void createCharFillPropsFromShape(const 
css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
                                   std::vector<css::beans::PropertyValue>& 
rCharPropVec);
@@ -92,11 +92,11 @@ bool createPrstDashFromLineDash(const 
css::drawing::LineDash& rLineDash,
                                 const css::drawing::LineCap& rLineCap, 
OUString& rsPrstDash);
 
 /** Returns true if a theme color with other type than 
model::ThemeColorType::Unknown was found.
-    The theme color is then in aThemeColor.
-    Returns false otherwise. aThemeColor is then unchanged or its type is
+    The theme color is then in rComplexColor.
+    Returns false otherwise. rComplexColor is then unchanged or its type is
     model::ThemeColorType::Unknown */
 bool getThemeColorFromShape(const OUString& rPropertyName,
                             const 
css::uno::Reference<css::beans::XPropertySet>& xPropertySet,
-                            model::ThemeColor& aThemeColor);
+                            model::ComplexColor& rComplexColor);
 }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 14e9321562ee..10dc88e4954d 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -30,7 +30,7 @@
 #include <com/sun/star/table/XCellRange.hpp>
 #include <com/sun/star/util/XTheme.hpp>
 
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <docmodel/uno/UnoTheme.hxx>
 #include <docmodel/theme/Theme.hxx>
 
@@ -416,18 +416,17 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
 
     // Check the theme colors are as expected
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xPortion->getPropertyValue("CharColorThemeReference") 
>>= xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xPortion->getPropertyValue("CharComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod,
-                             aThemeColor.getTransformations()[0].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aThemeColor.getTransformations()[0].mnValue);
+                             aComplexColor.getTransformations()[0].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aComplexColor.getTransformations()[0].mnValue);
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff,
-                             aThemeColor.getTransformations()[1].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aThemeColor.getTransformations()[1].mnValue);
+                             aComplexColor.getTransformations()[1].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aComplexColor.getTransformations()[1].mnValue);
     }
 }
 
@@ -472,28 +471,26 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testThemeColorTint_Table)
 
     // check theme color
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xA1->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xA1->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(0), rTrans.size());
         }
     }
 
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
         uno::Reference<beans::XPropertySet> xA2(xTable->getCellByPosition(0, 
1), uno::UNO_QUERY);
-        CPPUNIT_ASSERT(xA2->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xA2->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(1), rTrans.size());
             CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, 
rTrans[0].meType);
             CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTrans[0].mnValue);
@@ -514,16 +511,15 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testThemeColor_Shape)
 
     // check line and fill theme color of shape1
     {
-        model::ThemeColor aThemeColor;
-        uno::Reference<util::XThemeColor> xThemeColor;
         uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
-
-        CPPUNIT_ASSERT(xShape->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto aComplexColor = 
model::color::getFromXComplexColor(xComplexColor);
+            CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, 
aComplexColor.getSchemeType());
+
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(2), rTrans.size());
             CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTrans[0].meType);
             CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), rTrans[0].mnValue);
@@ -531,12 +527,13 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testThemeColor_Shape)
             CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), rTrans[1].mnValue);
         }
 
-        CPPUNIT_ASSERT(xShape->getPropertyValue("LineColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, 
aThemeColor.getType());
+        CPPUNIT_ASSERT(xShape->getPropertyValue("LineComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto aComplexColor = 
model::color::getFromXComplexColor(xComplexColor);
+            CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent6, 
aComplexColor.getSchemeType());
+
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(1), rTrans.size());
             CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTrans[0].meType);
             CPPUNIT_ASSERT_EQUAL(sal_Int16(5000), rTrans[0].mnValue);
@@ -544,25 +541,25 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testThemeColor_Shape)
     }
     // check line and fill theme color of shape2
     {
-        model::ThemeColor aThemeColor;
-        uno::Reference<util::XThemeColor> xThemeColor;
+        uno::Reference<util::XComplexColor> xComplexColor;
         uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
-
-        CPPUNIT_ASSERT(xShape->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto aComplexColor = 
model::color::getFromXComplexColor(xComplexColor);
+            CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
+
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(0), rTrans.size());
         }
 
-        CPPUNIT_ASSERT(xShape->getPropertyValue("LineColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        CPPUNIT_ASSERT(xShape->getPropertyValue("LineComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
         {
-            auto const& rTrans = aThemeColor.getTransformations();
+            auto aComplexColor = 
model::color::getFromXComplexColor(xComplexColor);
+            CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
+
+            auto const& rTrans = aComplexColor.getTransformations();
             CPPUNIT_ASSERT_EQUAL(size_t(1), rTrans.size());
             CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, 
rTrans[0].meType);
             CPPUNIT_ASSERT_EQUAL(sal_Int16(7500), rTrans[0].mnValue);
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index e8d4f188b8d3..ad43fb52b4a1 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -36,7 +36,7 @@
 #include <rtl/math.hxx>
 #include <svx/svdoashp.hxx>
 #include <tools/color.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <basegfx/utils/gradienttools.hxx>
 
 using namespace ::com::sun::star;
@@ -313,15 +313,14 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testTdf54095_SmartArtThemeTextColor)
     // - Actual  : 16777215 (0xFFFFFF), that is text was white
     CPPUNIT_ASSERT_EQUAL(sal_Int32(0x1F497D), nActualColor);
 
-    // clrScheme. For map between name in docx and index from 
CharColorThemeReference see
+    // clrScheme. For map between name in docx and index from CharComplexColor 
see
     // oox::drawingml::Color::getSchemeColorIndex()
     // Without fix the color scheme was "lt1" (1) but should be "dk2" (2).
-    uno::Reference<util::XThemeColor> xThemeColor;
-    CPPUNIT_ASSERT(xPortion->getPropertyValue("CharColorThemeReference") >>= 
xThemeColor);
-    CPPUNIT_ASSERT(xThemeColor.is());
-    model::ThemeColor aThemeColor;
-    model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-    CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Dark2, aThemeColor.getType());
+    uno::Reference<util::XComplexColor> xComplexColor;
+    xPortion->getPropertyValue("CharComplexColor") >>= xComplexColor;
+    CPPUNIT_ASSERT(xComplexColor.is());
+    auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+    CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Dark2, 
aComplexColor.getSchemeType());
 
     if (!bUseGroup)
     {
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 2896ae14fe18..e6cded7e64c7 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -26,7 +26,7 @@
 #include <vcl/graph.hxx>
 #include <vcl/BitmapFilter.hxx>
 #include <vcl/BitmapMonochromeFilter.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <basegfx/utils/gradienttools.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -427,27 +427,27 @@ void FillProperties::pushToPropMap(ShapePropertyMap& 
rPropMap, const GraphicHelp
                 if( maFillColor.hasTransparency() )
                     rPropMap.setProperty( ShapeProperty::FillTransparency, 
maFillColor.getTransparency() );
 
-                model::ThemeColor aThemeColor;
+                model::ComplexColor aComplexColor;
                 if (aFillColor == nPhClr)
                 {
-                    
aThemeColor.setType(model::convertToThemeColorType(nPhClrTheme));
-                    rPropMap.setProperty(PROP_FillColorThemeReference, 
model::theme::createXThemeColor(aThemeColor));
+                    
aComplexColor.setSchemeColor(model::convertToThemeColorType(nPhClrTheme));
+                    rPropMap.setProperty(PROP_FillComplexColor, 
model::color::createXComplexColor(aComplexColor));
                 }
                 else
                 {
-                    
aThemeColor.setType(model::convertToThemeColorType(maFillColor.getSchemeColorIndex()));
+                    
aComplexColor.setSchemeColor(model::convertToThemeColorType(maFillColor.getSchemeColorIndex()));
                     if (maFillColor.getLumMod() != 10000)
-                        
aThemeColor.addTransformation({model::TransformationType::LumMod, 
maFillColor.getLumMod()});
+                        
aComplexColor.addTransformation({model::TransformationType::LumMod, 
maFillColor.getLumMod()});
                     if (maFillColor.getLumOff() != 0)
-                        
aThemeColor.addTransformation({model::TransformationType::LumOff, 
maFillColor.getLumOff()});
+                        
aComplexColor.addTransformation({model::TransformationType::LumOff, 
maFillColor.getLumOff()});
                     if (maFillColor.getTintOrShade() > 0)
-                        
aThemeColor.addTransformation({model::TransformationType::Tint, 
maFillColor.getTintOrShade()});
+                        
aComplexColor.addTransformation({model::TransformationType::Tint, 
maFillColor.getTintOrShade()});
                     if (maFillColor.getTintOrShade() < 0)
                     {
                         sal_Int16 nShade = 
o3tl::narrowing<sal_Int16>(-maFillColor.getTintOrShade());
-                        
aThemeColor.addTransformation({model::TransformationType::Shade, nShade});
+                        
aComplexColor.addTransformation({model::TransformationType::Shade, nShade});
                     }
-                    rPropMap.setProperty(PROP_FillColorThemeReference, 
model::theme::createXThemeColor(aThemeColor));
+                    rPropMap.setProperty(PROP_FillComplexColor, 
model::color::createXComplexColor(aComplexColor));
                 }
 
                 eFillStyle = FillStyle_SOLID;
diff --git a/oox/source/drawingml/fontworkhelpers.cxx 
b/oox/source/drawingml/fontworkhelpers.cxx
index 547c9382d0a9..3c8d28d634c6 100644
--- a/oox/source/drawingml/fontworkhelpers.cxx
+++ b/oox/source/drawingml/fontworkhelpers.cxx
@@ -23,7 +23,7 @@
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/sequence.hxx>
 #include <comphelper/sequenceashashmap.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <drawingml/customshapeproperties.hxx>
 #include <drawingml/presetgeometrynames.hxx>
 #include <oox/drawingml/drawingmltypes.hxx>
@@ -51,7 +51,7 @@
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/text/XText.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/util/XThemeColor.hpp>
+#include <com/sun/star/util/XComplexColor.hpp>
 
 #include <array>
 #include <map>
@@ -849,12 +849,9 @@ void FontworkHelpers::collectCharColorProps(const 
uno::Reference<text::XText>& r
                 continue;
 
             // We have found a non-empty run. Collect its simple color 
properties.
-            const std::array<OUString, 6> aNamesArray = { u"CharColor",
-                                                          u"CharLumMod",
-                                                          u"CharLumOff",
-                                                          u"CharColorTheme",
-                                                          
u"CharColorThemeReference",
-                                                          u"CharTransparence" 
};
+            const std::array<OUString, 6> aNamesArray
+                = { u"CharColor",      u"CharLumMod",       u"CharLumOff",
+                    u"CharColorTheme", u"CharComplexColor", 
u"CharTransparence" };
             for (const auto& propName : aNamesArray)
             {
                 if (xRunPropSetInfo->hasPropertyByName(propName))
@@ -934,10 +931,10 @@ void FontworkHelpers::createCharFillPropsFromShape(
     }
 
     const std::array<OUString, 5> aCharPropNames
-        = { u"CharColorLumMod", u"CharColorLumOff", u"CharColorTheme", 
u"CharColorThemeReference",
+        = { u"CharColorLumMod", u"CharColorLumOff", u"CharColorTheme", 
u"CharComplexColor",
             u"CharTransparence" };
     const std::array<OUString, 5> aShapePropNames
-        = { u"FillColorLumMod", u"FillColorLumOff", u"FillColorTheme", 
u"FillColorThemeReference",
+        = { u"FillColorLumMod", u"FillColorLumOff", u"FillColorTheme", 
u"FillComplexColor",
             u"FillTransparence" };
     for (size_t i = 0; i < 5; i++)
     {
@@ -1004,17 +1001,17 @@ bool FontworkHelpers::createPrstDashFromLineDash(const 
drawing::LineDash& rLineD
 
 bool FontworkHelpers::getThemeColorFromShape(
     OUString const& rPropertyName, const uno::Reference<beans::XPropertySet>& 
xPropertySet,
-    model::ThemeColor& aThemeColor)
+    model::ComplexColor& rComplexColor)
 {
     auto xPropSetInfo = xPropertySet->getPropertySetInfo();
     if (!xPropSetInfo.is())
         return false;
-    uno::Reference<util::XThemeColor> xThemeColor;
+    uno::Reference<util::XComplexColor> xComplexColor;
     if (xPropSetInfo->hasPropertyByName(rPropertyName)
-        && (xPropertySet->getPropertyValue(rPropertyName) >>= xThemeColor) && 
xThemeColor.is())
+        && (xPropertySet->getPropertyValue(rPropertyName) >>= xComplexColor) 
&& xComplexColor.is())
     {
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        if (aThemeColor.getType() == model::ThemeColorType::Unknown)
+        rComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        if (rComplexColor.getSchemeType() == model::ThemeColorType::Unknown)
             return false;
         else
             return true;
@@ -1030,7 +1027,7 @@ struct GradientStopColor
     // RGBColor contains no transformations. In case TTColor has other type 
than
     // ThemeColorType::Unknown, it has precedence. The color transformations 
in TTColor are used
     // for RGBColor as well.
-    model::ThemeColor TTColor; // ThemeColorType and color transformations
+    model::ComplexColor TTColor; // ThemeColorType and color transformations
     ::Color RGBColor;
 };
 }
@@ -1043,36 +1040,36 @@ typedef std::multimap<sal_Int32, GradientStopColor> 
ColorMapType;
 namespace
 {
 // Returns the string to be used in w14:schemeClr in case of w14:textOutline 
or w14:textFill
-OUString lcl_getW14MarkupStringForThemeColor(const model::ThemeColor& 
rThemeColor)
+OUString lcl_getW14MarkupStringForThemeColor(const model::ComplexColor& 
rComplexColor)
 {
     const std::array<OUString, 12> W14ColorNames
         = { u"tx1",     u"bg1",     u"tx2",     u"bg2",     u"accent1", 
u"accent2",
             u"accent3", u"accent4", u"accent5", u"accent6", u"hlink",   
u"folHlink" };
     const sal_uInt8 nClrNameIndex = std::clamp<sal_uInt8>(
-        sal_Int32(rThemeColor.getType()), 
sal_Int32(model::ThemeColorType::Dark1),
+        sal_Int32(rComplexColor.getSchemeType()), 
sal_Int32(model::ThemeColorType::Dark1),
         sal_Int32(model::ThemeColorType::FollowedHyperlink));
     return W14ColorNames[nClrNameIndex];
 }
 
 // Returns the string to be used in w:themeColor. It is exported via 
CharThemeColor.
-OUString lcl_getWMarkupStringForThemeColor(const model::ThemeColor& 
rThemeColor)
+OUString lcl_getWMarkupStringForThemeColor(const model::ComplexColor& 
rComplexColor)
 {
     const std::array<OUString, 12> WColorNames
         = { u"text1",   u"background1", u"text2",     u"background2",
             u"accent1", u"accent2",     u"accent3",   u"accent4",
             u"accent5", u"accent6",     u"hyperlink", u"followedHyperlink" };
     const sal_uInt8 nClrNameIndex = std::clamp<sal_uInt8>(
-        sal_Int32(rThemeColor.getType()), 
sal_Int32(model::ThemeColorType::Dark1),
+        sal_Int32(rComplexColor.getSchemeType()), 
sal_Int32(model::ThemeColorType::Dark1),
         sal_Int32(model::ThemeColorType::FollowedHyperlink));
     return WColorNames[nClrNameIndex];
 }
 
-// Puts the value of the first occurrence of rType in rThemeColor into rValue 
and returns true.
+// Puts the value of the first occurrence of rType in rComplexColor into 
rValue and returns true.
 // If such does not exist, rValue is unchanged and the method returns false.
-bool lcl_getThemeColorTransformationValue(const model::ThemeColor& rThemeColor,
+bool lcl_getThemeColorTransformationValue(const model::ComplexColor& 
rComplexColor,
                                           const model::TransformationType& 
rType, sal_Int16& rValue)
 {
-    const std::vector<model::Transformation> 
aTransVec(rThemeColor.getTransformations());
+    const std::vector<model::Transformation> 
aTransVec(rComplexColor.getTransformations());
     auto bItemFound
         = [rType](const model::Transformation& rTrans) { return rType == 
rTrans.meType; };
     auto pIt = std::find_if(aTransVec.begin(), aTransVec.end(), bItemFound);
@@ -1083,14 +1080,14 @@ bool lcl_getThemeColorTransformationValue(const 
model::ThemeColor& rThemeColor,
 }
 
 // Adds the child elements 'lumMod' and 'lumOff' to 'schemeClr' 
maCurrentElement of pGrabStack,
-// if such exist in rThemeColor. 'alpha' is contained in the maTransformations 
of rThemeColor
+// if such exist in rComplexColor. 'alpha' is contained in the 
maTransformations of rComplexColor
 // in case of gradient fill.
-void lcl_addColorTransformationToGrabBagStack(const model::ThemeColor& 
rThemeColor,
+void lcl_addColorTransformationToGrabBagStack(const model::ComplexColor& 
rComplexColor,
                                               
std::unique_ptr<oox::GrabBagStack>& pGrabBagStack)
 {
     if (pGrabBagStack == nullptr)
         return;
-    for (auto const& rColorTransform : rThemeColor.getTransformations())
+    for (auto const& rColorTransform : rComplexColor.getTransformations())
     {
         switch (rColorTransform.meType)
         {
@@ -1215,7 +1212,6 @@ sal_Int16 lcl_getAlphaFromTransparenceGradient(const 
awt::Gradient& rTransparenc
         / (100.0 - nBorder) * 100 / 255.0);
 }
 
-// GradientStopColor has components ::Color RGBColor and model::ThemeColor 
TTColor
 GradientStopColor
 lcl_createGradientStopColor(const uno::Reference<beans::XPropertySet>& 
rXPropSet,
                             const uno::Reference<beans::XPropertySetInfo>& 
rXPropSetInfo,
@@ -1235,7 +1231,6 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
         {
             // a color gradient is yet not enabled to use theme colors
             aStopColor.RGBColor = 
lcl_getColorFromColorGradient(rColorGradient, rnPos);
-            aStopColor.TTColor.setType(model::ThemeColorType::Unknown);
             sal_Int16 nIntensity = 
lcl_getIntensityFromColorGradient(rColorGradient, rnPos);
             if (nIntensity != 100)
                 aStopColor.TTColor.addTransformation(
@@ -1246,7 +1241,7 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
         else // solid color
         {
             // fill color might be a theme color
-            if 
(!(FontworkHelpers::getThemeColorFromShape("FillColorThemeReference", rXPropSet,
+            if (!(FontworkHelpers::getThemeColorFromShape("FillComplexColor", 
rXPropSet,
                                                           aStopColor.TTColor)))
             {
                 // no theme color, use FillColor
@@ -1254,7 +1249,7 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
                 if (rXPropSetInfo->hasPropertyByName("FillColor"))
                     rXPropSet->getPropertyValue(u"FillColor") >>= nFillColor;
                 aStopColor.RGBColor = ::Color(ColorTransparency, nFillColor);
-                aStopColor.TTColor.setType(model::ThemeColorType::Unknown);
+                aStopColor.TTColor = model::ComplexColor();
             }
         }
 
@@ -1280,7 +1275,7 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
     {
         // a color gradient is yet not enabled to use theme colors
         aStopColor.RGBColor = lcl_getColorFromColorGradient(rColorGradient, 
rnPos);
-        aStopColor.TTColor.setType(model::ThemeColorType::Unknown);
+        aStopColor.TTColor = model::ComplexColor();
         sal_Int16 nIntensity = 
lcl_getIntensityFromColorGradient(rColorGradient, rnPos);
         if (nIntensity != 100)
             aStopColor.TTColor.addTransformation(
@@ -1292,7 +1287,7 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
     {
         // solid color and solid transparency
         SAL_WARN("oox.drawingml", "method should not be called in this case");
-        if 
(!(FontworkHelpers::getThemeColorFromShape("FillColorThemeReference", rXPropSet,
+        if (!(FontworkHelpers::getThemeColorFromShape("FillComplexColor", 
rXPropSet,
                                                       aStopColor.TTColor)))
         {
             // no theme color, use FillColor
@@ -1300,7 +1295,7 @@ lcl_createGradientStopColor(const 
uno::Reference<beans::XPropertySet>& rXPropSet
             if (rXPropSetInfo->hasPropertyByName(u"FillColor"))
                 rXPropSet->getPropertyValue(u"FillColor") >>= nFillColor;
             aStopColor.RGBColor = ::Color(ColorTransparency, nFillColor);
-            aStopColor.TTColor.setType(model::ThemeColorType::Unknown);
+            aStopColor.TTColor = model::ComplexColor();
         }
     }
 
@@ -1462,7 +1457,7 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
                 pGrabBagStack->push("attributes");
                 pGrabBagStack->addInt32("pos", (*it).first);
                 pGrabBagStack->pop();
-                if ((*it).second.TTColor.getType() == 
model::ThemeColorType::Unknown)
+                if ((*it).second.TTColor.getSchemeType() == 
model::ThemeColorType::Unknown)
                 {
                     pGrabBagStack->push("srgbClr");
                     pGrabBagStack->push("attributes");
@@ -1542,16 +1537,16 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
         case drawing::FillStyle_SOLID:
         {
             pGrabBagStack->push("solidFill");
-            model::ThemeColor aThemeColor;
+            model::ComplexColor aComplexColor;
             // It is either "schemeClr" or "srgbClr".
-            if 
(FontworkHelpers::getThemeColorFromShape("FillColorThemeReference", rXPropSet,
-                                                        aThemeColor))
+            if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", 
rXPropSet,
+                                                        aComplexColor))
             {
                 pGrabBagStack->push("schemeClr");
                 pGrabBagStack->push("attributes");
-                pGrabBagStack->addString("val", 
lcl_getW14MarkupStringForThemeColor(aThemeColor));
+                pGrabBagStack->addString("val", 
lcl_getW14MarkupStringForThemeColor(aComplexColor));
                 pGrabBagStack->pop(); // maCurrentElement:'schemeClr', 
maPropertyList:'attributes'
-                lcl_addColorTransformationToGrabBagStack(aThemeColor, 
pGrabBagStack);
+                lcl_addColorTransformationToGrabBagStack(aComplexColor, 
pGrabBagStack);
                 // maCurrentElement:'schemeClr', maPropertyList:'attributes', 
maybe 'lumMod' and
                 // maybe 'lumOff'
             }
@@ -1630,15 +1625,14 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
     {
         pGrabBagStack->push("solidFill");
         // It is either "schemeClr" or "srgbClr".
-        model::ThemeColor aThemeColor;
-        if (FontworkHelpers::getThemeColorFromShape("LineColorThemeReference", 
rXPropSet,
-                                                    aThemeColor))
+        model::ComplexColor aComplexColor;
+        if (FontworkHelpers::getThemeColorFromShape("LineComplexColor", 
rXPropSet, aComplexColor))
         {
             pGrabBagStack->push("schemeClr");
             pGrabBagStack->push("attributes");
-            pGrabBagStack->addString("val", 
lcl_getW14MarkupStringForThemeColor(aThemeColor));
+            pGrabBagStack->addString("val", 
lcl_getW14MarkupStringForThemeColor(aComplexColor));
             pGrabBagStack->pop();
-            lcl_addColorTransformationToGrabBagStack(aThemeColor, 
pGrabBagStack);
+            lcl_addColorTransformationToGrabBagStack(aComplexColor, 
pGrabBagStack);
             // maCurrentElement:'schemeClr', maPropertylist:'attributes'
         }
         else // not a theme color
@@ -1725,13 +1719,13 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
     // CharThemeOriginalColor, CharThemeColor, and CharThemeColorShade or 
CharThemeColorTint will be
     // used for <w:color> element. That is evaluated by applications, which do 
not understand w14
     // namespace, or if w14:textFill is omitted.
-    model::ThemeColor aThemeColor;
-    if (FontworkHelpers::getThemeColorFromShape("FillColorThemeReference", 
rXPropSet, aThemeColor))
+    model::ComplexColor aComplexColor;
+    if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet, 
aComplexColor))
     {
         // CharThemeColor
         beans::PropertyValue aCharThemeColor;
         aCharThemeColor.Name = u"CharThemeColor";
-        aCharThemeColor.Value <<= 
lcl_getWMarkupStringForThemeColor(aThemeColor);
+        aCharThemeColor.Value <<= 
lcl_getWMarkupStringForThemeColor(aComplexColor);
         rUpdatePropVec.push_back(aCharThemeColor);
 
         // CharThemeColorShade or CharThemeColorTint
@@ -1740,12 +1734,12 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
         // We made two assumption here: (1) If LumOff exists and is not zero, 
it is a 'tint'.
         // (2) LumMod + LumOff == 10000;
         sal_Int16 nLumMod;
-        if (lcl_getThemeColorTransformationValue(aThemeColor, 
model::TransformationType::LumMod,
+        if (lcl_getThemeColorTransformationValue(aComplexColor, 
model::TransformationType::LumMod,
                                                  nLumMod))
         {
             sal_Int16 nLumOff;
             bool bIsTint = lcl_getThemeColorTransformationValue(
-                               aThemeColor, model::TransformationType::LumOff, 
nLumOff)
+                               aComplexColor, 
model::TransformationType::LumOff, nLumOff)
                            && nLumOff != 0;
             sal_uInt8 nValue
                 = std::clamp<sal_uInt8>(lround(double(nLumMod) * 255.0 / 
10000.0), 0, 255);
@@ -1758,7 +1752,7 @@ void 
FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps(
         }
     }
     // ToDo: Are FillColorLumMod, FillColorLumOff and FillColorTheme possible 
without
-    // FillColorThemeReference? If yes, we need an 'else' part here.
+    // FillComplexColor? If yes, we need an 'else' part here.
 
     // CharThemeOriginalColor.
     beans::PropertyValue aCharThemeOriginalColor;
diff --git a/oox/source/drawingml/lineproperties.cxx 
b/oox/source/drawingml/lineproperties.cxx
index 898b5b702161..1372a6b96016 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -34,8 +34,7 @@
 #include <oox/helper/graphichelper.hxx>
 #include <oox/token/tokens.hxx>
 #include <oox/token/properties.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
-
+#include <docmodel/uno/UnoComplexColor.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
@@ -501,28 +500,28 @@ void LineProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
         if( aLineColor.hasTransparency() )
             rPropMap.setProperty( ShapeProperty::LineTransparency, 
aLineColor.getTransparency() );
 
-        model::ThemeColor aThemeColor;
+        model::ComplexColor aComplexColor;
 
         if (aColor == nPhClr)
         {
-            aThemeColor.setType(model::convertToThemeColorType(nPhClrTheme));
-            rPropMap.setProperty(PROP_LineColorThemeReference, 
model::theme::createXThemeColor(aThemeColor));
+            
aComplexColor.setSchemeColor(model::convertToThemeColorType(nPhClrTheme));
+            rPropMap.setProperty(PROP_LineComplexColor, 
model::color::createXComplexColor(aComplexColor));
         }
         else
         {
-            
aThemeColor.setType(model::convertToThemeColorType(aLineColor.getSchemeColorIndex()));
+            
aComplexColor.setSchemeColor(model::convertToThemeColorType(aLineColor.getSchemeColorIndex()));
             if (aLineColor.getLumMod() != 10000)
-                
aThemeColor.addTransformation({model::TransformationType::LumMod, 
aLineColor.getLumMod()});
+                
aComplexColor.addTransformation({model::TransformationType::LumMod, 
aLineColor.getLumMod()});
             if (aLineColor.getLumOff() != 0)
-                
aThemeColor.addTransformation({model::TransformationType::LumOff, 
aLineColor.getLumOff()});
+                
aComplexColor.addTransformation({model::TransformationType::LumOff, 
aLineColor.getLumOff()});
             if (aLineColor.getTintOrShade() > 0)
-                
aThemeColor.addTransformation({model::TransformationType::Tint, 
aLineColor.getTintOrShade()});
+                
aComplexColor.addTransformation({model::TransformationType::Tint, 
aLineColor.getTintOrShade()});
             if (aLineColor.getTintOrShade() < 0)
             {
                 sal_Int16 nShade = 
o3tl::narrowing<sal_Int16>(-aLineColor.getTintOrShade());
-                
aThemeColor.addTransformation({model::TransformationType::Shade, nShade});
+                
aComplexColor.addTransformation({model::TransformationType::Shade, nShade});
             }
-            rPropMap.setProperty(PROP_LineColorThemeReference, 
model::theme::createXThemeColor(aThemeColor));
+            rPropMap.setProperty(PROP_LineComplexColor, 
model::color::createXComplexColor(aComplexColor));
         }
     }
 
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index a22606ef106c..7d3dda284680 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -26,7 +26,7 @@
 #include <i18nlangtag/languagetag.hxx>
 #include <i18nlangtag/mslangid.hxx>
 #include <editeng/escapementitem.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <oox/helper/helper.hxx>
 #include <oox/helper/propertyset.hxx>
 #include <oox/core/xmlfilterbase.hxx>
@@ -136,21 +136,21 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& 
rPropMap, const XmlFil
         rPropMap.setProperty(PROP_CharColor, 
aColor.getColor(rFilter.getGraphicHelper()));
 
         // set theme color
-        model::ThemeColor aThemeColor;
-        
aThemeColor.setType(model::convertToThemeColorType(aColor.getSchemeColorIndex()));
+        model::ComplexColor aComplexColor;
+        
aComplexColor.setSchemeColor(model::convertToThemeColorType(aColor.getSchemeColorIndex()));
         if (aColor.getTintOrShade() > 0)
-            aThemeColor.addTransformation({model::TransformationType::Tint, 
aColor.getTintOrShade()});
+            aComplexColor.addTransformation({model::TransformationType::Tint, 
aColor.getTintOrShade()});
         if (aColor.getTintOrShade() < 0)
         {
             sal_Int16 nShade = 
o3tl::narrowing<sal_Int16>(-aColor.getTintOrShade());
-            aThemeColor.addTransformation({model::TransformationType::Shade, 
nShade});
+            aComplexColor.addTransformation({model::TransformationType::Shade, 
nShade});
         }
         if (aColor.getLumMod() != 10000)
-            aThemeColor.addTransformation({model::TransformationType::LumMod, 
aColor.getLumMod()});
+            
aComplexColor.addTransformation({model::TransformationType::LumMod, 
aColor.getLumMod()});
         if (aColor.getLumOff() != 0)
-            aThemeColor.addTransformation({model::TransformationType::LumOff, 
aColor.getLumOff()});
+            
aComplexColor.addTransformation({model::TransformationType::LumOff, 
aColor.getLumOff()});
 
-        rPropMap.setProperty(PROP_CharColorThemeReference, 
model::theme::createXThemeColor(aThemeColor));
+        rPropMap.setProperty(PROP_CharComplexColor, 
model::color::createXComplexColor(aComplexColor));
         rPropMap.setProperty(PROP_CharContoured, bContoured);
 
         if (aColor.hasTransparency())
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 9f705a20cf9e..fa587d6190bf 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -128,7 +128,7 @@
 #include <editeng/flditem.hxx>
 #include <editeng/escapementitem.hxx>
 #include <editeng/unonrule.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <svx/svdoashp.hxx>
 #include <svx/svdomedia.hxx>
 #include <svx/svdtrans.hxx>
@@ -516,7 +516,7 @@ void DrawingML::WriteSolidFill( const Reference< 
XPropertySet >& rXPropSet )
     else if ( nFillColor != nOriginalColor )
     {
         // the user has set a different color for the shape
-        if (!WriteSchemeColor(u"FillColorThemeReference", rXPropSet))
+        if (!WriteSchemeColor(u"FillComplexColor", rXPropSet))
         {
             WriteSolidFill(::Color(ColorTransparency, nFillColor & 0xffffff), 
nAlpha);
         }
@@ -540,19 +540,18 @@ bool DrawingML::WriteSchemeColor(OUString const& 
rPropertyName, const uno::Refer
     if (!xPropertySet->getPropertySetInfo()->hasPropertyByName(rPropertyName))
         return false;
 
-    uno::Reference<util::XThemeColor> xThemeColor;
-    xPropertySet->getPropertyValue(rPropertyName) >>= xThemeColor;
-    if (!xThemeColor.is())
+    uno::Reference<util::XComplexColor> xComplexColor;
+    xPropertySet->getPropertyValue(rPropertyName) >>= xComplexColor;
+    if (!xComplexColor.is())
         return false;
 
-    model::ThemeColor aThemeColor;
-    model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-    if (aThemeColor.getType() == model::ThemeColorType::Unknown)
+    auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+    if (aComplexColor.getSchemeType() == model::ThemeColorType::Unknown)
         return false;
-    const char* pColorName = 
g_aPredefinedClrNames[sal_Int16(aThemeColor.getType())];
+    const char* pColorName = 
g_aPredefinedClrNames[sal_Int16(aComplexColor.getSchemeType())];
     mpFS->startElementNS(XML_a, XML_solidFill);
     mpFS->startElementNS(XML_a, XML_schemeClr, XML_val, pColorName);
-    for (auto const& rTransform : aThemeColor.getTransformations())
+    for (auto const& rTransform : aComplexColor.getTransformations())
     {
         switch (rTransform.meType)
         {
@@ -574,13 +573,12 @@ bool DrawingML::WriteSchemeColor(OUString const& 
rPropertyName, const uno::Refer
     }
     // Alpha is actually not contained in maTransformations although possible 
(as of Mar 2023).
     sal_Int16 nAPITransparency(0);
-    if ((rPropertyName == u"FillColorThemeReference"
-         && GetProperty(xPropertySet, "FillTransparence"))
-        || (rPropertyName == u"LineColorThemeReference"
-            && GetProperty(xPropertySet, "LineTransparence"))
-        || (rPropertyName == u"CharColorThemeReference"
-            && GetProperty(xPropertySet, "CharTransparence")))
+    if ((rPropertyName == u"FillComplexColor" && GetProperty(xPropertySet, 
"FillTransparence"))
+        || (rPropertyName == u"LineComplexColor" && GetProperty(xPropertySet, 
"LineTransparence"))
+        || (rPropertyName == u"CharComplexColor" && GetProperty(xPropertySet, 
"CharTransparence")))
+    {
         mAny >>= nAPITransparency;
+    }
     if (nAPITransparency != 0)
         mpFS->singleElementNS(XML_a, XML_alpha, XML_val,
                               OString::number(MAX_PERCENT - (PER_PERCENT * 
nAPITransparency)));
@@ -1145,8 +1143,8 @@ void DrawingML::WriteOutline( const 
Reference<XPropertySet>& rXPropSet, Referenc
         if( nColor != nOriginalColor )
         {
             // the user has set a different color for the line
-            if (!WriteSchemeColor(u"LineColorThemeReference", rXPropSet))
-                    WriteSolidFill(nColor, nColorAlpha);
+            if (!WriteSchemeColor(u"LineComplexColor", rXPropSet))
+                WriteSolidFill(nColor, nColorAlpha);
         }
         else if( !sColorFillScheme.isEmpty() )
         {
@@ -2673,7 +2671,7 @@ void DrawingML::WriteRunProperties( const Reference< 
XPropertySet >& rRun, bool
                 else
                 {
                     color.SetAlpha(255);
-                    if (!WriteSchemeColor(u"CharColorThemeReference", 
rXPropSet))
+                    if (!WriteSchemeColor(u"CharComplexColor", rXPropSet))
                         WriteSolidFill(color, nTransparency);
                 }
                 mpFS->endElementNS(XML_a, XML_ln);
@@ -2686,7 +2684,7 @@ void DrawingML::WriteRunProperties( const Reference< 
XPropertySet >& rRun, bool
             {
                 color.SetAlpha(255);
                 // TODO: special handle embossed/engraved
-                if (!WriteSchemeColor(u"CharColorThemeReference", rXPropSet))
+                if (!WriteSchemeColor(u"CharComplexColor", rXPropSet))
                 {
                     WriteSolidFill(color, nTransparency);
                 }
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 0b6e5437b883..cf8b8781af23 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -53,12 +53,12 @@ Change
 CharBackColor
 CharCaseMap
 CharColor
-CharColorThemeReference
 CharContoured
 CharColorTheme
 CharColorTintOrShade
 CharColorLumMod
 CharColorLumOff
+CharComplexColor
 CharEscapement
 CharEscapementHeight
 CharFontCharSet
@@ -177,7 +177,7 @@ FillColor
 FillColorTheme
 FillColorLumMod
 FillColorLumOff
-FillColorThemeReference
+FillComplexColor
 FillGradient
 FillGradientName
 FillHatch
@@ -316,7 +316,7 @@ LeftPageHeaderContent
 LegacyFragment
 LineCap
 LineColor
-LineColorThemeReference
+LineComplexColor
 LineCount
 LineDash
 LineDashName
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b39dcc8756cb..25d0363c35f4 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5049,11 +5049,12 @@ void ScDocument::StyleSheetChanged( const 
SfxStyleSheetBase* pStyleSheet, bool b
                                     double nPPTX, double nPPTY,
                                     const Fraction& rZoomX, const Fraction& 
rZoomY )
 {
-    for (const auto& a : maTabs)
+    for (const auto& rTab : maTabs)
     {
-        if (a)
-            a->StyleSheetChanged
-                ( pStyleSheet, bRemoved, pDev, nPPTX, nPPTY, rZoomX, rZoomY );
+        if (rTab)
+        {
+            rTab->StyleSheetChanged(pStyleSheet, bRemoved, pDev, nPPTX, nPPTY, 
rZoomX, rZoomY);
+        }
     }
 }
 
@@ -5075,9 +5076,9 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& 
rStyle ) const
 
         bool bIsUsed = false;
 
-        for (const auto& a : maTabs)
+        for (const auto& rTab : maTabs)
         {
-            if (a && a->IsStyleSheetUsed( rStyle ) )
+            if (rTab && rTab->IsStyleSheetUsed( rStyle ) )
                 bIsUsed = true;
         }
 
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 00bbd65ef69e..b1614d6eb8ca 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -42,7 +42,7 @@
 #include <svl/stritem.hxx>
 #include <undo/undomanager.hxx>
 #include <vcl/scheduler.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <comphelper/sequenceashashmap.hxx>
 #include <docmodel/uno/UnoTheme.hxx>
@@ -986,18 +986,17 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme)
     uno::Reference<beans::XPropertySet> 
xPortion(xPara->createEnumeration()->nextElement(),
                                                  uno::UNO_QUERY);
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xPortion->getPropertyValue("CharColorThemeReference") 
>>= xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xPortion->getPropertyValue("CharComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod,
-                             aThemeColor.getTransformations()[0].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), 
aThemeColor.getTransformations()[0].mnValue);
+                             aComplexColor.getTransformations()[0].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), 
aComplexColor.getTransformations()[0].mnValue);
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff,
-                             aThemeColor.getTransformations()[1].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), 
aThemeColor.getTransformations()[1].mnValue);
+                             aComplexColor.getTransformations()[1].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), 
aComplexColor.getTransformations()[1].mnValue);
     }
 }
 
@@ -1025,18 +1024,17 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testFillColorTheme)
 
     // Then make sure the theme index is not lost when the sidebar sets it:
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xShape->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod,
-                             aThemeColor.getTransformations()[0].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aThemeColor.getTransformations()[0].mnValue);
+                             aComplexColor.getTransformations()[0].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aComplexColor.getTransformations()[0].mnValue);
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff,
-                             aThemeColor.getTransformations()[1].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aThemeColor.getTransformations()[1].mnValue);
+                             aComplexColor.getTransformations()[1].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aComplexColor.getTransformations()[1].mnValue);
     }
 }
 
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 218ec3c3b28f..a544e7f198d3 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1351,7 +1351,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( 
const OUString& PropertyN
                 if (pEntry->nMemberId == MID_COLOR_THEME_INDEX)
                 {
                     const XFillColorItem* pColor = 
rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
-                    if (pColor->GetThemeColor().getType() == 
model::ThemeColorType::Unknown)
+                    if (pColor->getComplexColor().getSchemeType() == 
model::ThemeColorType::Unknown)
                     {
                         eState = PropertyState_DEFAULT_VALUE;
                     }
@@ -1360,7 +1360,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( 
const OUString& PropertyN
                 {
                     const XFillColorItem* pColor = 
rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
                     sal_Int16 nLumMod = 10000;
-                    for (auto const& rTransform : 
pColor->GetThemeColor().getTransformations())
+                    for (auto const& rTransform : 
pColor->getComplexColor().getTransformations())
                     {
                         if (rTransform.meType == 
model::TransformationType::LumMod)
                             nLumMod = rTransform.mnValue;
@@ -1374,7 +1374,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( 
const OUString& PropertyN
                 {
                     const XFillColorItem* pColor = 
rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
                     sal_Int16 nLumOff = 0;
-                    for (auto const& rTransform : 
pColor->GetThemeColor().getTransformations())
+                    for (auto const& rTransform : 
pColor->getComplexColor().getTransformations())
                     {
                         if (rTransform.meType == 
model::TransformationType::LumOff)
                             nLumOff = rTransform.mnValue;
@@ -1384,20 +1384,20 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( 
const OUString& PropertyN
                         eState = PropertyState_DEFAULT_VALUE;
                     }
                 }
-                else if (pEntry->nMemberId == MID_COLOR_THEME_REFERENCE)
+                else if (pEntry->nMemberId == MID_COMPLEX_COLOR)
                 {
-                    const XFillColorItem* pColor = 
rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
-                    if (pColor->GetThemeColor().getType() == 
model::ThemeColorType::Unknown)
+                    auto const* pColor = 
rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
+                    if (pColor->getComplexColor().getType() == 
model::ColorType::Unused)
                     {
                         eState = PropertyState_DEFAULT_VALUE;
                     }
                 }
                 break;
             case XATTR_LINECOLOR:
-                if (pEntry->nMemberId == MID_COLOR_THEME_REFERENCE)
+                if (pEntry->nMemberId == MID_COMPLEX_COLOR)
                 {
                     auto const* pColor = 
rStyleSet.GetItem<XLineColorItem>(pEntry->nWID);
-                    if (pColor->GetThemeColor().getType() == 
model::ThemeColorType::Unknown)
+                    if (pColor->getComplexColor().getType() == 
model::ColorType::Unused)
                     {
                         eState = PropertyState_DEFAULT_VALUE;
                     }
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 3f3085b60d20..4db1f4042dc9 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -393,7 +393,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, 
SdrObject* pObj,
                 model::ThemeColorType eColorType = 
model::ThemeColorType::Accent1;
                 Color aColor = pTheme->GetColor(eColorType);
                 XFillColorItem aFillColorItem("", aColor);
-                aFillColorItem.GetThemeColor().setType(eColorType);
+                aFillColorItem.getComplexColor().setSchemeColor(eColorType);
                 aAttr.Put(aFillColorItem);
 
                 aAttr.Put(XLineStyleItem(css::drawing::LineStyle_SOLID));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 84a70eefff7b..7f1b762d6e48 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -575,22 +575,24 @@ public:
             if (pColorItem)
             {
                 XFillColorItem aColorItem(*pColorItem);
-                aColorItem.GetThemeColor().clearTransformations();
+                model::ComplexColor aComplexColor = 
aColorItem.getComplexColor();
+
                 if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, 
&pItem) == SfxItemState::SET)
                 {
                     auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
-                    
aColorItem.GetThemeColor().setType(model::convertToThemeColorType(pIntItem->GetValue()));
+                    
aComplexColor.setSchemeColor(model::convertToThemeColorType(pIntItem->GetValue()));
                 }
                 if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) 
== SfxItemState::SET)
                 {
                     auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
-                    
aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumMod,
 pIntItem->GetValue()});
+                    
aComplexColor.addTransformation({model::TransformationType::LumMod, 
pIntItem->GetValue()});
                 }
                 if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) 
== SfxItemState::SET)
                 {
                     auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
-                    
aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumOff,
 pIntItem->GetValue()});
+                    
aComplexColor.addTransformation({model::TransformationType::LumOff, 
pIntItem->GetValue()});
                 }
+                aColorItem.setComplexColor(aComplexColor);
                 pArgs->Put(aColorItem);
             }
         }
diff --git a/svx/qa/unit/styles.cxx b/svx/qa/unit/styles.cxx
index d44bf9ac4dc8..05eeb451ba1b 100644
--- a/svx/qa/unit/styles.cxx
+++ b/svx/qa/unit/styles.cxx
@@ -13,7 +13,7 @@
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 #include <com/sun/star/drawing/XMasterPageTarget.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 
 using namespace ::com::sun::star;
 
@@ -75,30 +75,28 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeChange)
 
     // The theme color of this filled shape is set by the PPTX import:
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xShape4->getPropertyValue("FillColorThemeReference") 
>>= xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xShape4->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
     }
     uno::Reference<beans::XPropertySet> 
xShape5(xDrawPageShapes->getByIndex(5), uno::UNO_QUERY);
     // Blue, lighter.
     CPPUNIT_ASSERT_EQUAL(Color(0xb4c7e7), GetShapeFillColor(xShape5));
     // The theme index, and effects (lum mod, lum off) are set by the PPTX 
import:
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xShape5->getPropertyValue("FillColorThemeReference") 
>>= xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xShape5->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod,
-                             aThemeColor.getTransformations()[0].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aThemeColor.getTransformations()[0].mnValue);
+                             aComplexColor.getTransformations()[0].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(4000), 
aComplexColor.getTransformations()[0].mnValue);
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff,
-                             aThemeColor.getTransformations()[1].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aThemeColor.getTransformations()[1].mnValue);
+                             aComplexColor.getTransformations()[1].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(6000), 
aComplexColor.getTransformations()[1].mnValue);
     }
     // When changing the master slide of slide 1 to use the theme of the 
second master slide:
     uno::Reference<drawing::XMasterPageTarget> xDrawPage2(
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index 6cd68a0c8172..800c709770de 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -19,7 +19,7 @@
 #include <vcl/graphicfilter.hxx>
 #include <svx/xoutbmp.hxx>
 #include <vcl/filter/PDFiumLibrary.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 
 using namespace com::sun::star;
 
@@ -103,28 +103,27 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, 
testFillColorThemeUnoApi)
     uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), 
uno::UNO_QUERY);
     // Set theme color
     {
-        model::ThemeColor aThemeColor;
-        aThemeColor.setType(model::ThemeColorType::Accent1);
-        aThemeColor.addTransformation({ model::TransformationType::LumMod, 
2000 });
-        aThemeColor.addTransformation({ model::TransformationType::LumOff, 
8000 });
-        xShape->setPropertyValue("FillColorThemeReference",
-                                 
uno::Any(model::theme::createXThemeColor(aThemeColor)));
+        model::ComplexColor aComplexColor;
+        aComplexColor.setSchemeColor(model::ThemeColorType::Accent1);
+        aComplexColor.addTransformation({ model::TransformationType::LumMod, 
2000 });
+        aComplexColor.addTransformation({ model::TransformationType::LumOff, 
8000 });
+        xShape->setPropertyValue("FillComplexColor",
+                                 
uno::Any(model::color::createXComplexColor(aComplexColor)));
     }
 
     // Then make sure the value we read back is the expected one:
     {
-        uno::Reference<util::XThemeColor> xThemeColor;
-        CPPUNIT_ASSERT(xShape->getPropertyValue("FillColorThemeReference") >>= 
xThemeColor);
-        CPPUNIT_ASSERT(xThemeColor.is());
-        model::ThemeColor aThemeColor;
-        model::theme::setFromXThemeColor(aThemeColor, xThemeColor);
-        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aThemeColor.getType());
+        uno::Reference<util::XComplexColor> xComplexColor;
+        CPPUNIT_ASSERT(xShape->getPropertyValue("FillComplexColor") >>= 
xComplexColor);
+        CPPUNIT_ASSERT(xComplexColor.is());
+        auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+        CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, 
aComplexColor.getSchemeType());
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod,
-                             aThemeColor.getTransformations()[0].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), 
aThemeColor.getTransformations()[0].mnValue);
+                             aComplexColor.getTransformations()[0].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(2000), 
aComplexColor.getTransformations()[0].mnValue);
         CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumOff,
-                             aThemeColor.getTransformations()[1].meType);
-        CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), 
aThemeColor.getTransformations()[1].mnValue);
+                             aComplexColor.getTransformations()[1].meType);
+        CPPUNIT_ASSERT_EQUAL(sal_Int16(8000), 
aComplexColor.getTransformations()[1].mnValue);
     }
 }
 
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index f21f977384c7..eabb753f647a 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -172,8 +172,8 @@ item BOOL                   SvxAutoKernItem;
 
 struct SvxColor
 {
-    INT32  Color              MID_COLOR_RGB;
-    String ThemeReferenceJSON MID_COLOR_THEME_REFERENCE_JSON;
+    INT32  Color            MID_COLOR_RGB;
+    String ComplexColorJSON MID_COMPLEX_COLOR_JSON;
 };
 item SvxColor SvxColorItem;
 
diff --git a/svx/source/dialog/ThemeColorValueSet.cxx 
b/svx/source/dialog/ThemeColorValueSet.cxx
index aa0abe0bad66..d33e2fbc85e1 100644
--- a/svx/source/dialog/ThemeColorValueSet.cxx
+++ b/svx/source/dialog/ThemeColorValueSet.cxx
@@ -8,7 +8,7 @@
  */
 
 #include <svx/dialog/ThemeColorValueSet.hxx>
-#include <docmodel/uno/UnoThemeColor.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
 #include <vcl/event.hxx>
 
 namespace svx
diff --git a/svx/source/dialog/ThemeDialog.cxx 
b/svx/source/dialog/ThemeDialog.cxx
index 68e2eceeee1c..ce88b2ef4b79 100644
--- a/svx/source/dialog/ThemeDialog.cxx
+++ b/svx/source/dialog/ThemeDialog.cxx
@@ -9,7 +9,6 @@
 
 #include <svx/dialog/ThemeDialog.hxx>
 #include <svx/dialog/ThemeColorEditDialog.hxx>
-#include <docmodel/theme/ThemeColor.hxx>
 #include <docmodel/theme/ColorSet.hxx>
 #include <docmodel/theme/Theme.hxx>
 #include <svx/ColorSets.hxx>
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 88381056e572..bbef530c3dd1 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1423,17 +1423,18 @@ PropertyState SAL_CALL Cell::getPropertyState( const 
OUString& PropertyName )
                 case XATTR_FILLCOLOR:
                     if (pMap->nMemberId == MID_COLOR_THEME_INDEX)
                     {
-                        const XFillColorItem* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
-                        if (pColor->GetThemeColor().getType() == 
model::ThemeColorType::Unknown)
+                        auto const* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
+                        if (pColor->getComplexColor().getType() == 
model::ColorType::Unused ||
+                            pColor->getComplexColor().getSchemeType() == 
model::ThemeColorType::Unknown)
                         {
                             eState = PropertyState_DEFAULT_VALUE;
                         }
                     }
                     else if (pMap->nMemberId == MID_COLOR_LUM_MOD)
                     {
-                        const XFillColorItem* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
+                        auto const* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
                         sal_Int16 nLumMod = 10000;
-                        for (auto const& rTransform : 
pColor->GetThemeColor().getTransformations())
+                        for (auto const& rTransform : 
pColor->getComplexColor().getTransformations())
                         {
                             if (rTransform.meType == 
model::TransformationType::LumMod)
                                 nLumMod = rTransform.mnValue;
@@ -1445,9 +1446,9 @@ PropertyState SAL_CALL Cell::getPropertyState( const 
OUString& PropertyName )
                     }
                     else if (pMap->nMemberId == MID_COLOR_LUM_OFF)
                     {
-                        const XFillColorItem* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
+                        auto const* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
                         sal_Int16 nLumOff = 0;
-                        for (auto const& rTransform : 
pColor->GetThemeColor().getTransformations())
+                        for (auto const& rTransform : 
pColor->getComplexColor().getTransformations())
                         {
                             if (rTransform.meType == 
model::TransformationType::LumOff)
                                 nLumOff = rTransform.mnValue;
@@ -1457,20 +1458,20 @@ PropertyState SAL_CALL Cell::getPropertyState( const 
OUString& PropertyName )
                             eState = PropertyState_DEFAULT_VALUE;
                         }
                     }
-                    else if (pMap->nMemberId == MID_COLOR_THEME_REFERENCE)
+                    else if (pMap->nMemberId == MID_COMPLEX_COLOR)
                     {
-                        const XFillColorItem* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
-                        if (pColor->GetThemeColor().getType() == 
model::ThemeColorType::Unknown)
+                        auto const* pColor = 
rSet.GetItem<XFillColorItem>(pMap->nWID);
+                        if (pColor->getComplexColor().getType() == 
model::ColorType::Unused)
                         {
                             eState = PropertyState_DEFAULT_VALUE;
                         }

... etc. - the rest is truncated

Reply via email to