summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-14 14:50:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-15 08:33:37 +0200
commite1c4dbdbe12fb6c87605547fbc0ee6dc7c357d98 (patch)
tree7a831d1796fb8179b5b31f8fa7d44698155415d5 /svtools
parent89c24a380a8fb5dd94ba595ce421abafa9004b9a (diff)
convert SvxIconChoiceCtrlTextMode to scoped enum
and drop unused DontKnow enumerator Change-Id: Ida06ae702e45d489765f970bbbdab6d762293c6c
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl.hxx1
-rw-r--r--svtools/source/contnr/imivctl1.cxx22
-rw-r--r--svtools/source/contnr/ivctrl.cxx2
3 files changed, 6 insertions, 19 deletions
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)