summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-12-28 09:43:46 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-01-12 23:15:58 +0000
commitbd0f526f2d3e1ffe43a74672485815768eee6e9e (patch)
treefcb675aa06dcc3251f2c23961520ee317483a225 /oox/source
parentc945eafc99856f0bcd0a99195e2c5164c2a6d24a (diff)
introduce docmodel comp., model::ThemeColor, use it in SvxColorItem
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/ThemeExport.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/oox/source/export/ThemeExport.cxx b/oox/source/export/ThemeExport.cxx
index f11b894f924a..b1684986f028 100644
--- a/oox/source/export/ThemeExport.cxx
+++ b/oox/source/export/ThemeExport.cxx
@@ -224,19 +224,19 @@ bool ThemeExport::writeFormatScheme(sax_fastparser::FSHelperPtr pFS)
bool ThemeExport::writeColorSet(sax_fastparser::FSHelperPtr pFS, svx::Theme const& rTheme)
{
- static std::unordered_map<sal_Int32, svx::ThemeColorType> constTokenMap
- = { { XML_dk1, svx::ThemeColorType::Dark1 },
- { XML_lt1, svx::ThemeColorType::Light1 },
- { XML_dk2, svx::ThemeColorType::Dark2 },
- { XML_lt2, svx::ThemeColorType::Light2 },
- { XML_accent1, svx::ThemeColorType::Accent1 },
- { XML_accent2, svx::ThemeColorType::Accent2 },
- { XML_accent3, svx::ThemeColorType::Accent3 },
- { XML_accent4, svx::ThemeColorType::Accent4 },
- { XML_accent5, svx::ThemeColorType::Accent5 },
- { XML_accent6, svx::ThemeColorType::Accent6 },
- { XML_hlink, svx::ThemeColorType::Hyperlink },
- { XML_folHlink, svx::ThemeColorType::FollowedHyperlink } };
+ static std::unordered_map<sal_Int32, model::ThemeColorType> constTokenMap
+ = { { XML_dk1, model::ThemeColorType::Dark1 },
+ { XML_lt1, model::ThemeColorType::Light1 },
+ { XML_dk2, model::ThemeColorType::Dark2 },
+ { XML_lt2, model::ThemeColorType::Light2 },
+ { XML_accent1, model::ThemeColorType::Accent1 },
+ { XML_accent2, model::ThemeColorType::Accent2 },
+ { XML_accent3, model::ThemeColorType::Accent3 },
+ { XML_accent4, model::ThemeColorType::Accent4 },
+ { XML_accent5, model::ThemeColorType::Accent5 },
+ { XML_accent6, model::ThemeColorType::Accent6 },
+ { XML_hlink, model::ThemeColorType::Hyperlink },
+ { XML_folHlink, model::ThemeColorType::FollowedHyperlink } };
static std::array<sal_Int32, 12> constTokenArray
= { XML_dk1, XML_lt1, XML_dk2, XML_lt2, XML_accent1, XML_accent2,
@@ -248,7 +248,7 @@ bool ThemeExport::writeColorSet(sax_fastparser::FSHelperPtr pFS, svx::Theme cons
for (auto nToken : constTokenArray)
{
- svx::ThemeColorType eColorType = constTokenMap[nToken];
+ model::ThemeColorType eColorType = constTokenMap[nToken];
Color aColor = pColorSet->getColor(eColorType);
pFS->startElementNS(XML_a, nToken);
pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(sal_Int32(aColor)));