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 <quikee@gmail.com>
(cherry picked from commit 614dfb98cd4705b63bf1e525d3d34df9ce950ebb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155157
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index eb7d2f0..596b8b5 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 b995c7f..617aa43 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 4858b47..a701ae9 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -63,6 +63,10 @@ struct SVXCORE_DLLPUBLIC NamedColor
            if (m_nLumMod != 0)
                aComplexColor.addTransformation({model::TransformationType::LumOff, m_nLumOff});
        }
        else
        {
            aComplexColor.setColor(m_aColor);
        }

        aComplexColor.setFinalColor(m_aColor);