summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-01 15:41:55 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-02 10:01:39 +0200
commitf9f0bf9b47a627e13477ac893bcb9436c72a49d5 (patch)
tree424dbc53d5b7220f215949cc8e4d0c7c375b56d7 /vcl/source/control
parent212196344c99982aa42ec1eecb36006c9a12655f (diff)
tdf#161853 vcl: Drop SvtIconChoiceCtrl::GetEntryText
Just call `SvxIconChoiceCtrlEntry::GetText` directly instead of having an extra level of indirection to get the same result. Change-Id: I6a299f5de4e7979044ade11e5441260383ce0b87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169834 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/imivctl1.cxx8
-rw-r--r--vcl/source/control/ivctrl.cxx5
2 files changed, 3 insertions, 10 deletions
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 9d0cedf2b022..97d38a3c50df 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -1362,9 +1362,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect,
{
if (eItem == IcnViewFieldType::Text)
{
- OUString aText = SvtIconChoiceCtrl::GetEntryText(pEntry);
-
- rRenderContext.DrawText(rRect, aText, nCurTextDrawFlags);
+ rRenderContext.DrawText(rRect, pEntry->GetText(), nCurTextDrawFlags);
if (pEntry->IsFocused())
DrawFocusRect(rRenderContext, pEntry);
@@ -1582,7 +1580,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* p
if( pEntryPos )
aBound.SetPos( *pEntryPos );
- const OUString aEntryText = SvtIconChoiceCtrl::GetEntryText(pEntry);
+ const OUString aEntryText = pEntry->GetText();
tools::Rectangle aTextRect = pView->GetTextRect( aMaxTextRect, aEntryText, nCurTextDrawFlags );
Size aTextSize( aTextRect.GetSize() );
@@ -2758,7 +2756,7 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
OUString sQuickHelpText = pEntry->GetQuickHelpText();
tools::Rectangle aTextRect(CalcTextRect(pEntry, nullptr));
- OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry ) );
+ const OUString aEntryText = pEntry->GetText();
if ( ( !aTextRect.Contains( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() )
return false;
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index bf3cb1c89725..f8e09856c92c 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);
}
-OUString SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry const * pEntry )
-{
- return pEntry->GetText();
-}
-
void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
_pImpl->Paint(rRenderContext, rRect);