summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-05-01 10:19:06 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-05-08 07:23:17 +0200
commit900c3a2a854436fdbacd488ef1da12ea99fbceb0 (patch)
tree6cc0be94d385b8ae64fb3a0275aa6810b1963505 /cui
parent7a10187042c1a2b402a9872f66108cfcd8080117 (diff)
svx: use ComplexColor in SvxColorItem instead of the ThemeColor
ComplexColor includes everything a ThemeColor has and in addition also can have various other representations that are supported by OOXML. This is important for compatibility reasons to preserve the color information. Change-Id: I677775a96511dc1742c75b1949e002eaa8c622e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151226 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/chardlg.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 0c600f83ab24..601dae8dce0e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1600,10 +1600,11 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet )
model::ThemeColorType eType = model::convertToThemeColorType(aSelectedColor.m_nThemeIndex);
if (eType != model::ThemeColorType::Unknown)
{
- aItem.GetThemeColor().setType(eType);
- aItem.GetThemeColor().clearTransformations();
- aItem.GetThemeColor().addTransformation({model::TransformationType::LumMod, aSelectedColor.m_nLumMod});
- aItem.GetThemeColor().addTransformation({model::TransformationType::LumOff, aSelectedColor.m_nLumOff});
+ model::ComplexColor aComplexColor;
+ aComplexColor.setSchemeColor(eType);
+ aComplexColor.addTransformation({model::TransformationType::LumMod, aSelectedColor.m_nLumMod});
+ aComplexColor.addTransformation({model::TransformationType::LumOff, aSelectedColor.m_nLumOff});
+ aItem.setComplexColor(aComplexColor);
}
rSet.Put(aItem);