summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index d9f65585bcd6..04faf6e7728c 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -818,20 +818,21 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (nSlot == SID_ATTR_CHAR_COLOR)
{
pColorItem = std::make_unique<SvxColorItem>(pNewArgs->Get(EE_CHAR_COLOR));
- pColorItem->GetThemeColor().clearTransformations();
+ model::ComplexColor aComplexColor;
if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_THEME_INDEX, false))
{
- pColorItem->GetThemeColor().setType(model::convertToThemeColorType(pIntItem->GetValue()));
+ aComplexColor.setSchemeColor(model::convertToThemeColorType(pIntItem->GetValue()));
}
if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_MOD, false))
{
- pColorItem->GetThemeColor().addTransformation({model::TransformationType::LumMod, pIntItem->GetValue()});
+ aComplexColor.addTransformation({model::TransformationType::LumMod, pIntItem->GetValue()});
}
if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_OFF, false))
{
- pColorItem->GetThemeColor().addTransformation({model::TransformationType::LumOff, pIntItem->GetValue()});
+ aComplexColor.addTransformation({model::TransformationType::LumOff, pIntItem->GetValue()});
}
+ pColorItem->setComplexColor(aComplexColor);
pNewArgs->Put(std::move(pColorItem));
}