tdf#161853 vcl: Drop SvtIconChoiceCtrl::DrawEntryImage

Just draw the image using the render context right in
`SvxIconChoiceCtrl_Impl::PaintItem` instead of
having a very specialized static method that's only used
from there.

Change-Id: Idf8967f6df3823742445906e558fcd7f532271af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169833
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx
index 318be74..0f331a8 100644
--- a/include/vcl/toolkit/ivctrl.hxx
+++ b/include/vcl/toolkit/ivctrl.hxx
@@ -181,10 +181,6 @@ class UNLESS_MERGELIBS_MORE(VCL_DLLPUBLIC) SvtIconChoiceCtrl final : public Cont
    void                ClickIcon();
    virtual void        DataChanged( const DataChangedEvent& rDCEvt ) override;
    virtual void        RequestHelp( const HelpEvent& rHEvt ) override;
    static void         DrawEntryImage(
                            SvxIconChoiceCtrlEntry const * pEntry,
                            const Point& rPos,
                            OutputDevice& rDev );

    static OUString     GetEntryText( SvxIconChoiceCtrlEntry const * pEntry );

diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 7140418..9d0cedf 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -1376,7 +1376,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect,
            aPos.AdjustX((rRect.GetWidth() - aImageSize.Width()) / 2 );
        if (nPaintFlags & PAINTFLAG_VER_CENTERED)
            aPos.AdjustY((rRect.GetHeight() - aImageSize.Height()) / 2 );
        SvtIconChoiceCtrl::DrawEntryImage(pEntry, aPos, rRenderContext);
        rRenderContext.DrawImage(aPos, pEntry->GetImage());
    }
}

diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index c20ce45..bf3cb1c 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -125,11 +125,6 @@ void SvtIconChoiceCtrl::RemoveEntry(sal_Int32 nIndex)
    _pImpl->RemoveEntry(nIndex);
}

void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry const * pEntry, const Point& rPos, OutputDevice& rDev )
{
    rDev.DrawImage( rPos, pEntry->GetImage() );
}

OUString SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry const * pEntry )
{
    return pEntry->GetText();