cui/source/tabpages/chardlg.cxx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
New commits: commit 3f7e9b2ea67a8de9ad9dd819ec2eb91e8180af95 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Aug 18 22:28:33 2023 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Fri Aug 25 20:48:34 2023 +0200 cui: use common menthod to get the complex color from a NamedColor NamedColor implements a getComplexColor method, which creates the ComplexColor from the NamedColor attributes. We don't need to do this ourselves. Change-Id: If2629d49b7b2e561b85b93314f56a95492cafd93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155863 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 0bd14b7b38cb..3245f516338c 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1593,18 +1593,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) if (bChanged) { - SvxColorItem aItem( aSelectedColor.m_aColor, nWhich ); - - // The color was picked from the theme palette, remember its index. - model::ThemeColorType eType = model::convertToThemeColorType(aSelectedColor.m_nThemeIndex); - if (eType != model::ThemeColorType::Unknown) - { - auto aComplexColor = model::ComplexColor::Theme(eType); - aComplexColor.addTransformation({model::TransformationType::LumMod, aSelectedColor.m_nLumMod}); - aComplexColor.addTransformation({model::TransformationType::LumOff, aSelectedColor.m_nLumOff}); - aItem.setComplexColor(aComplexColor); - } - + SvxColorItem aItem(aSelectedColor.m_aColor, aSelectedColor.getComplexColor(), nWhich); rSet.Put(aItem); } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )