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-25 02:18:16 +0200
commite21f2c8710b6116b9b17f065b1482d057e7842ff (patch)
treea2e85cf82acc1e64172114b09d2a8b5ce3dd6fed /cui
parentc2bcd7b5bbb91fcd9375361ca6ab9e1c486a5dea (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> (cherry picked from commit 900c3a2a854436fdbacd488ef1da12ea99fbceb0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152231 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@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 194dfd65f830..438a9ac37cbf 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);