summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-30 17:00:28 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-31 06:39:32 +0000
commit5ca16c7b3153395d9107f84d366c796a22930756 (patch)
tree42ff6418be7810fcdf4ce4476f67eb52de5f02c9
parent3d7325898547c94826cfddc6852d400e84e2dda1 (diff)
Convert ToolBoxLayoutMode to scoped enum
Change-Id: I95b2432fc9f4df8d055227331a44151af4d773ab Reviewed-on: https://gerrit.libreoffice.org/25672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/vcl/toolbox.hxx6
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx8
3 files changed, 9 insertions, 9 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 95cc60bb447d..f87e8efccb27 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -62,11 +62,11 @@ namespace o3tl
// dontcare will let the toolbox decide about its size
enum ToolBoxButtonSize { TOOLBOX_BUTTONSIZE_DONTCARE, TOOLBOX_BUTTONSIZE_SMALL, TOOLBOX_BUTTONSIZE_LARGE };
-// TBX_LAYOUT_NORMAL - traditional layout, items are centered in the toolbar
-// TBX_LAYOUT_LOCKVERT - special mode (currently used for calc input/formula
+// ToolBoxLayoutMode::Normal - traditional layout, items are centered in the toolbar
+// ToolBoxLayoutMode::LockVert - special mode (currently used for calc input/formula
// bar) where item's vertical position is locked, e.g.
// toolbox is prevented from centering the items
-enum ToolBoxLayoutMode { TBX_LAYOUT_NORMAL, TBX_LAYOUT_LOCKVERT };
+enum class ToolBoxLayoutMode { Normal, LockVert };
struct ImplToolSize
{
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 882dfdd367ae..dc46535a8ee9 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1086,9 +1086,9 @@ void ScInputBarGroup::TriggerToolboxLayout()
if ( xLayoutManager.is() )
{
if ( maTextWnd->GetNumLines() > 1)
- rParent.SetToolbarLayoutMode( TBX_LAYOUT_LOCKVERT );
+ rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::LockVert );
else
- rParent.SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
+ rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::Normal );
xLayoutManager->lock();
DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, nullptr, AllSettingsFlags::STYLE );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7327a5eee2b9..f75a03a43852 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1382,7 +1382,7 @@ void ToolBox::ImplInitToolBoxData()
meDockAlign = WindowAlign::Top;
meLastStyle = PointerStyle::Arrow;
mnWinStyle = 0;
- meLayoutMode = TBX_LAYOUT_NORMAL;
+ meLayoutMode = ToolBoxLayoutMode::Normal;
mnLastFocusItemId = 0;
mnKeyModifier = 0;
mnActivateCount = 0;
@@ -2545,13 +2545,13 @@ void ToolBox::ImplFormat( bool bResize )
if ( mbHorz )
{
it->maCalcRect.Left() = nX;
- // if special TBX_LAYOUT_LOCKVERT lock vertical position
+ // if special ToolBoxLayoutMode::LockVert lock vertical position
// don't recalculate the vertical position of the item
- if ( meLayoutMode == TBX_LAYOUT_LOCKVERT && mnLines == 1 )
+ if ( meLayoutMode == ToolBoxLayoutMode::LockVert && mnLines == 1 )
{
// Somewhat of a hack here, calc deletes and re-adds
// the sum/assign & ok/cancel items dynamically.
- // Because TBX_LAYOUT_LOCKVERT effectively prevents
+ // Because ToolBoxLayoutMode::LockVert effectively prevents
// recalculation of the vertical pos of an item the
// it->maRect.Top() for those newly added items is
// 0. The hack here is that we want to effectively