summaryrefslogtreecommitdiff
path: root/svx/source/styles
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 /svx/source/styles
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 'svx/source/styles')
-rw-r--r--svx/source/styles/ColorSets.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx
index 5511253f3d03..00ffdae3b031 100644
--- a/svx/source/styles/ColorSets.cxx
+++ b/svx/source/styles/ColorSets.cxx
@@ -39,9 +39,9 @@ void UpdateTextPortionColorSet(const uno::Reference<beans::XPropertySet>& xPorti
{
sal_Int16 nCharColorTheme = -1;
xPortion->getPropertyValue(UNO_NAME_EDIT_CHAR_COLOR_THEME) >>= nCharColorTheme;
- svx::ThemeColorType eColorThemeType = svx::convertToThemeColorType(nCharColorTheme);
+ model::ThemeColorType eColorThemeType = model::convertToThemeColorType(nCharColorTheme);
- if (eColorThemeType == svx::ThemeColorType::Unknown)
+ if (eColorThemeType == model::ThemeColorType::Unknown)
return;
Color aColor = rColorSet.getColor(eColorThemeType);
@@ -74,8 +74,8 @@ void UpdateFillColorSet(const uno::Reference<beans::XPropertySet>& xShape, const
sal_Int16 nFillColorTheme = -1;
xShape->getPropertyValue(UNO_NAME_FILLCOLOR_THEME) >>= nFillColorTheme;
- svx::ThemeColorType eColorThemeType = svx::convertToThemeColorType(nFillColorTheme);
- if (eColorThemeType == svx::ThemeColorType::Unknown)
+ model::ThemeColorType eColorThemeType = model::convertToThemeColorType(nFillColorTheme);
+ if (eColorThemeType == model::ThemeColorType::Unknown)
return;
Color aColor = rColorSet.getColor(eColorThemeType);
@@ -281,7 +281,7 @@ void Theme::ToAny(css::uno::Any& rVal) const
if (mpColorSet)
{
std::vector<util::Color> aColorScheme;
- for (auto eThemeColorType : o3tl::enumrange<svx::ThemeColorType>())
+ for (auto eThemeColorType : o3tl::enumrange<model::ThemeColorType>())
{
Color aColor = mpColorSet->getColor(eThemeColorType);
aColorScheme.push_back(sal_Int32(aColor));
@@ -362,14 +362,14 @@ std::vector<Color> Theme::GetColors() const
return {};
std::vector<Color> aColors;
- for (auto eThemeColorType : o3tl::enumrange<svx::ThemeColorType>())
+ for (auto eThemeColorType : o3tl::enumrange<model::ThemeColorType>())
{
aColors.push_back(mpColorSet->getColor(eThemeColorType));
}
return aColors;
}
-Color Theme::GetColor(ThemeColorType eType) const
+Color Theme::GetColor(model::ThemeColorType eType) const
{
if (!mpColorSet)
return {};