From c8734eddf4cce6c2c54556fee383f2764dbb981d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Sep 2024 13:33:33 +0200 Subject: [PATCH] loplugin:singlevalfields Change-Id: I8f844c40dcb48737d95a3004cd7e8c730656d955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174299 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/vcl/toolkit/ivctrl.hxx | 8 -------- vcl/source/control/imivctl1.cxx | 5 +---- vcl/source/control/ivctrl.cxx | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index 0340eacf164e..95b29933349e 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -45,12 +45,6 @@ namespace o3tl template<> struct typed_flags : is_typed_flags {}; } -enum class SvxIconChoiceCtrlTextMode -{ - Full = 1, // Enlarge BoundRect southwards - Short // Shorten with "..." -}; - class SvxIconChoiceCtrlEntry { Image aImage; @@ -65,7 +59,6 @@ class SvxIconChoiceCtrlEntry tools::Rectangle aRect; // Bounding-Rectangle of the entry - SvxIconChoiceCtrlTextMode eTextMode; sal_uInt16 nX,nY; // for keyboard control SvxIconViewFlags nFlags; @@ -83,7 +76,6 @@ public: void SetQuickHelpText( const OUString& rText ) { aQuickHelpText = rText; } const OUString& GetQuickHelpText() const { return aQuickHelpText; } - SvxIconChoiceCtrlTextMode GetTextMode() const { return eTextMode; } SvxIconViewFlags GetFlags() const { return nFlags; } bool IsSelected() const { return bool(nFlags & SvxIconViewFlags::SELECTED); } bool IsFocused() const { return bool(nFlags & SvxIconViewFlags::FOCUSED); } diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index c264f1481306..2fb00f963a40 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -1560,8 +1560,7 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize ) } // Calculates the maximum size that the text rectangle may use within its -// bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to -// LONG_MAX. +// bounding rectangle. tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const { @@ -1582,8 +1581,6 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr aBoundRect.AdjustRight( -1 ); if( aBoundRect.Left() > aBoundRect.Right()) aBoundRect.SetLeft( aBoundRect.Right() ); - if( pEntry->GetTextMode() == SvxIconChoiceCtrlTextMode::Full ) - aBoundRect.SetBottom( LONG_MAX ); } else if (nWinBits & WB_SMALLICON) { diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 4566ad1310b9..05fdf8d41864 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -58,7 +58,6 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( OUString _aText, Image _aImage ) : aImage(std::move(_aImage)) , aText(std::move(_aText)) - , eTextMode(SvxIconChoiceCtrlTextMode::Short) , nX(0) , nY(0) , nFlags(SvxIconViewFlags::NONE)