Related: tdf#150273 maPaintCol is unused now

Change-Id: I823a2ec24aea47b4b3d005107c8a18fec223e6df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142398
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index f0427d2..d7751c1 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -250,7 +250,6 @@ private:
                                    Color nColor1, Color nColor2, Color nColorDist,
                                    SvxBorderLineStyle nStyle, BitmapEx& rBmp );

    void            UpdatePaintLineColor();       // returns sal_True if maPaintCol has changed
    DECL_DLLPRIVATE_LINK(ValueSelectHdl, ValueSet*, void);
    DECL_DLLPRIVATE_LINK(FocusHdl, weld::Widget&, void);
    DECL_DLLPRIVATE_LINK(ToggleHdl, weld::Toggleable&, void);
@@ -259,11 +258,6 @@ private:
    void            UpdateEntries();
    sal_Int32       GetStylePos(sal_Int32 nListPos) const;

    const Color&    GetPaintColor() const
    {
        return maPaintCol;
    }

    void UpdatePreview();

                    SvtLineListBox( const SvtLineListBox& ) = delete;
@@ -280,7 +274,6 @@ private:
    tools::Long            m_nWidth;
    ScopedVclPtr<VirtualDevice>   aVirDev;
    Color           aColor;
    Color           maPaintCol;
    FieldUnit       eSourceUnit;
    Link<SvtLineListBox&,void> maSelectHdl;
};
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 20fe74b..dbfcf84 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1406,7 +1406,6 @@ SvtLineListBox::SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl)
    , m_nWidth( 5 )
    , aVirDev(VclPtr<VirtualDevice>::Create())
    , aColor(COL_BLACK)
    , maPaintCol(COL_BLACK)
{
    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
    m_xLineSet->SetStyle(WinBits(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP));
@@ -1434,8 +1433,6 @@ SvtLineListBox::SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl)

    aVirDev->SetLineColor();
    aVirDev->SetMapMode(MapMode(MapUnit::MapTwip));

    UpdatePaintLineColor();
}

IMPL_LINK_NOARG(SvtLineListBox, FocusHdl, weld::Widget&, void)
@@ -1512,21 +1509,8 @@ void SvtLineListBox::InsertEntry(
        rWidthImpl, nStyle, nMinWidth, pColor1Fn, pColor2Fn, pColorDistFn));
}

void SvtLineListBox::UpdatePaintLineColor()
{
    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
    Color aNewCol(rSettings.GetWindowColor().IsDark() ? rSettings.GetLabelTextColor() : aColor);

    bool bRet = aNewCol != maPaintCol;

    if( bRet )
        maPaintCol = aNewCol;
}

void SvtLineListBox::UpdateEntries()
{
    UpdatePaintLineColor( );

    SvxBorderLineStyle eSelected = GetSelectEntryStyle();

    // Remove the old entries