include/editeng/borderline.hxx |    4 +++-
 include/editeng/brushitem.hxx  |    2 ++
 include/svx/Palette.hxx        |   13 +++++++++----
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 8c472dcd2bd56cb5cb0e404eccd0b147590be243
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sun Jul 30 08:44:02 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 28 12:41:25 2023 +0200

    fix C/P typo that allowed setting LumMod color transform value 0
    
    should be m_nLumOff instead of m_nLumMod
    
    Change-Id: I14b04fb0fecad949a41abf752d2ac05ceed5ba83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155112
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 144d16443a74839f885dc9597bee1e48493b278f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156105
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 2778ff24c3fe..7ac8ece71eea 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -61,7 +61,7 @@ struct SVXCORE_DLLPUBLIC NamedColor
             if (m_nLumMod != 10000)
                 aComplexColor.addTransformation({ 
model::TransformationType::LumMod, m_nLumMod });
 
-            if (m_nLumMod != 0)
+            if (m_nLumOff != 0)
                 aComplexColor.addTransformation({ 
model::TransformationType::LumOff, m_nLumOff });
         }
         else
commit fce4cd66c7544ab1202ebf2b732c29e40272ef8a
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Jul 29 15:48:35 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Aug 28 12:41:14 2023 +0200

    set finalColor of the ComplexColor in BorderLine and BrushItem
    
    The final color is stored inside the ComplexColor and is used to
    represent the final computed color from theme color and/or
    transforms.
    
    Change-Id: I405615bba144bfe876b75c565746d9eebc88e973
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155111
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 614dfb98cd4705b63bf1e525d3d34df9ce950ebb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156104
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index eb7d2f0f4f8e..596b8b59f413 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -172,8 +172,11 @@ public:
 
     model::ComplexColor const& getComplexColor() const
     {
+        auto pUnConst = const_cast<SvxBorderLine*>(this);
+        pUnConst->m_aComplexColor.setFinalColor(GetColor());
         return m_aComplexColor;
     }
+
     void setComplexColor(model::ComplexColor const& rComplexColor)
     {
         m_aComplexColor = rComplexColor;
@@ -258,4 +261,3 @@ EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& 
rLeft, const SvxBorderLi
 } // namespace editeng
 
 #endif
-
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index b995c7fa0637..617aa43a4f24 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -93,6 +93,8 @@ public:
 
     model::ComplexColor getComplexColor() const
     {
+        auto pUnConst = const_cast<SvxBrushItem*>(this);
+        pUnConst->maComplexColor.setFinalColor(GetColor());
         return maComplexColor;
     }
 
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 4858b47140c4..2778ff24c3fe 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -45,7 +45,8 @@ struct SVXCORE_DLLPUBLIC NamedColor
     NamedColor(Color const& rColor, OUString const& rName)
         : m_aColor(rColor)
         , m_aName(rName)
-    {}
+    {
+    }
 
     model::ComplexColor getComplexColor()
     {
@@ -58,10 +59,14 @@ struct SVXCORE_DLLPUBLIC NamedColor
             aComplexColor.setSchemeColor(eThemeColorType);
 
             if (m_nLumMod != 10000)
-                
aComplexColor.addTransformation({model::TransformationType::LumMod, m_nLumMod});
+                aComplexColor.addTransformation({ 
model::TransformationType::LumMod, m_nLumMod });
 
             if (m_nLumMod != 0)
-                
aComplexColor.addTransformation({model::TransformationType::LumOff, m_nLumOff});
+                aComplexColor.addTransformation({ 
model::TransformationType::LumOff, m_nLumOff });
+        }
+        else
+        {
+            aComplexColor.setColor(m_aColor);
         }
 
         aComplexColor.setFinalColor(m_aColor);

Reply via email to