summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/ivctrl.hxx7
-rw-r--r--svtools/source/contnr/imivctl.hxx1
-rw-r--r--svtools/source/contnr/imivctl1.cxx22
-rw-r--r--svtools/source/contnr/ivctrl.cxx2
4 files changed, 9 insertions, 23 deletions
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index ec1d0cfdfcb7..ea7116e64b0b 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -49,11 +49,10 @@ namespace o3tl
template<> struct typed_flags<SvxIconViewFlags> : is_typed_flags<SvxIconViewFlags, 0x04f7> {};
}
-enum SvxIconChoiceCtrlTextMode
+enum class SvxIconChoiceCtrlTextMode
{
- IcnShowTextFull = 1, // Enlarge BoundRect southwards
- IcnShowTextShort, // Shorten with "..."
- IcnShowTextDontKnow // Settings of the View
+ Full = 1, // Enlarge BoundRect southwards
+ Short // Shorten with "..."
};
enum class SvxIconChoiceCtrlPositionMode
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 444a37a2f937..59316b045d51 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -461,7 +461,6 @@ public:
return aEntries[ nPos ];
}
SvxIconChoiceCtrlEntry* GetFirstSelectedEntry() const;
- SvxIconChoiceCtrlTextMode GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const;
void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
void InitSettings();
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 9069a1fd56de..ddbf61aa3f9e 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -129,7 +129,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
pDDDev = nullptr;
pDDBufDev = nullptr;
pDDTempDev = nullptr;
- eTextMode = IcnShowTextShort;
+ eTextMode = SvxIconChoiceCtrlTextMode::Short;
pImpCursor = new IcnCursor_Impl( this );
pGridMap = new IcnGridMap_Impl( this );
@@ -1149,12 +1149,12 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( rKEvt.GetKeyCode().IsShift() )
{
if( pCursor )
- pView->SetEntryTextMode( IcnShowTextFull, pCursor );
+ pView->SetEntryTextMode( SvxIconChoiceCtrlTextMode::Full, pCursor );
}
if( rKEvt.GetKeyCode().IsMod1() )
{
if( pCursor )
- pView->SetEntryTextMode( IcnShowTextShort, pCursor );
+ pView->SetEntryTextMode( SvxIconChoiceCtrlTextMode::Short, pCursor );
}
break;
#endif
@@ -2331,7 +2331,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 IcnShowTextFull, Bottom is set to
+// bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to
// LONG_MAX.
Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const
@@ -2357,7 +2357,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry*
aBoundRect.Right()--;
if( aBoundRect.Left() > aBoundRect.Right())
aBoundRect.Left() = aBoundRect.Right();
- if( GetEntryTextModeSmart( pEntry ) == IcnShowTextFull )
+ if( pEntry->GetTextMode() == SvxIconChoiceCtrlTextMode::Full )
aBoundRect.Bottom() = LONG_MAX;
}
else
@@ -2777,8 +2777,6 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode,
{
if( eTextMode != eMode )
{
- if( eTextMode == IcnShowTextDontKnow )
- eTextMode = IcnShowTextShort;
eTextMode = eMode;
Arrange( true, 0, 0 );
}
@@ -2796,16 +2794,6 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode,
}
#endif
-SvxIconChoiceCtrlTextMode SvxIconChoiceCtrl_Impl::GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const
-{
- DBG_ASSERT(pEntry,"GetEntryTextModeSmart: Entry not set");
- SvxIconChoiceCtrlTextMode eMode = pEntry->GetTextMode();
- if( eMode == IcnShowTextDontKnow )
- return eTextMode;
- return eMode;
-}
-
-
// Draw my own focusrect, because the focusrect of the outputdevice has got the inverted color
// of the background. But what will we see, if the backgroundcolor is gray ? - We will see
// a gray focusrect on a gray background !!!
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index b93f1cf105d1..4d41497c8cd2 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -41,7 +41,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const OUString& rText,
, nPos(0)
, pblink(nullptr)
, pflink(nullptr)
- , eTextMode(IcnShowTextShort)
+ , eTextMode(SvxIconChoiceCtrlTextMode::Short)
, nX(0)
, nY(0)
, nFlags(SvxIconViewFlags::NONE)