diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-01 15:36:41 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-02 10:01:16 +0200 |
commit | 212196344c99982aa42ec1eecb36006c9a12655f (patch) | |
tree | 2439dce218a30dabfcba754e89d8ccd0a4cdc2f0 /vcl/source/control | |
parent | 9780e0843f5ee6165b8d8bc4c01071e7a2be9742 (diff) |
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
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/imivctl1.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/ivctrl.cxx | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index 71404180eb0d..9d0cedf2b022 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 c20ce459487a..bf3cb1c89725 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(); |