loplugin:singlevalfields

Change-Id: I8f844c40dcb48737d95a3004cd7e8c730656d955
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174299
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-09-30 13:33:33 +02:00
parent a6f1841aed
commit c8734eddf4
3 changed files with 1 additions and 13 deletions

View File

@ -45,12 +45,6 @@ namespace o3tl
template<> struct typed_flags<SvxIconViewFlags> : is_typed_flags<SvxIconViewFlags, 0x000f> {};
}
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); }

View File

@ -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)
{

View File

@ -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)