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:
@@ -45,12 +45,6 @@ namespace o3tl
|
|||||||
template<> struct typed_flags<SvxIconViewFlags> : is_typed_flags<SvxIconViewFlags, 0x000f> {};
|
template<> struct typed_flags<SvxIconViewFlags> : is_typed_flags<SvxIconViewFlags, 0x000f> {};
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class SvxIconChoiceCtrlTextMode
|
|
||||||
{
|
|
||||||
Full = 1, // Enlarge BoundRect southwards
|
|
||||||
Short // Shorten with "..."
|
|
||||||
};
|
|
||||||
|
|
||||||
class SvxIconChoiceCtrlEntry
|
class SvxIconChoiceCtrlEntry
|
||||||
{
|
{
|
||||||
Image aImage;
|
Image aImage;
|
||||||
@@ -65,7 +59,6 @@ class SvxIconChoiceCtrlEntry
|
|||||||
|
|
||||||
tools::Rectangle aRect; // Bounding-Rectangle of the entry
|
tools::Rectangle aRect; // Bounding-Rectangle of the entry
|
||||||
|
|
||||||
SvxIconChoiceCtrlTextMode eTextMode;
|
|
||||||
sal_uInt16 nX,nY; // for keyboard control
|
sal_uInt16 nX,nY; // for keyboard control
|
||||||
SvxIconViewFlags nFlags;
|
SvxIconViewFlags nFlags;
|
||||||
|
|
||||||
@@ -83,7 +76,6 @@ public:
|
|||||||
void SetQuickHelpText( const OUString& rText ) { aQuickHelpText = rText; }
|
void SetQuickHelpText( const OUString& rText ) { aQuickHelpText = rText; }
|
||||||
const OUString& GetQuickHelpText() const { return aQuickHelpText; }
|
const OUString& GetQuickHelpText() const { return aQuickHelpText; }
|
||||||
|
|
||||||
SvxIconChoiceCtrlTextMode GetTextMode() const { return eTextMode; }
|
|
||||||
SvxIconViewFlags GetFlags() const { return nFlags; }
|
SvxIconViewFlags GetFlags() const { return nFlags; }
|
||||||
bool IsSelected() const { return bool(nFlags & SvxIconViewFlags::SELECTED); }
|
bool IsSelected() const { return bool(nFlags & SvxIconViewFlags::SELECTED); }
|
||||||
bool IsFocused() const { return bool(nFlags & SvxIconViewFlags::FOCUSED); }
|
bool IsFocused() const { return bool(nFlags & SvxIconViewFlags::FOCUSED); }
|
||||||
|
@@ -1560,8 +1560,7 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculates the maximum size that the text rectangle may use within its
|
// 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
|
// bounding rectangle.
|
||||||
// LONG_MAX.
|
|
||||||
|
|
||||||
tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const
|
tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const
|
||||||
{
|
{
|
||||||
@@ -1582,8 +1581,6 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr
|
|||||||
aBoundRect.AdjustRight( -1 );
|
aBoundRect.AdjustRight( -1 );
|
||||||
if( aBoundRect.Left() > aBoundRect.Right())
|
if( aBoundRect.Left() > aBoundRect.Right())
|
||||||
aBoundRect.SetLeft( aBoundRect.Right() );
|
aBoundRect.SetLeft( aBoundRect.Right() );
|
||||||
if( pEntry->GetTextMode() == SvxIconChoiceCtrlTextMode::Full )
|
|
||||||
aBoundRect.SetBottom( LONG_MAX );
|
|
||||||
}
|
}
|
||||||
else if (nWinBits & WB_SMALLICON)
|
else if (nWinBits & WB_SMALLICON)
|
||||||
{
|
{
|
||||||
|
@@ -58,7 +58,6 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( OUString _aText,
|
|||||||
Image _aImage )
|
Image _aImage )
|
||||||
: aImage(std::move(_aImage))
|
: aImage(std::move(_aImage))
|
||||||
, aText(std::move(_aText))
|
, aText(std::move(_aText))
|
||||||
, eTextMode(SvxIconChoiceCtrlTextMode::Short)
|
|
||||||
, nX(0)
|
, nX(0)
|
||||||
, nY(0)
|
, nY(0)
|
||||||
, nFlags(SvxIconViewFlags::NONE)
|
, nFlags(SvxIconViewFlags::NONE)
|
||||||
|
Reference in New Issue
Block a user