cui/source/tabpages/chardlg.cxx |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit 431f9322863d0002b67469741a967b408d301905
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Aug 18 22:28:33 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 28 12:44:46 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>
    (cherry picked from commit 3f7e9b2ea67a8de9ad9dd819ec2eb91e8180af95)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156166
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 325b7925fb66..716e193af45e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1594,18 +1594,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 ) )

Reply via email to