[Libreoffice-commits] core.git: include/vcl sc/source vcl/source
Noel Grandin
noel at peralex.com
Tue May 31 06:40:01 UTC 2016
include/vcl/toolbox.hxx | 6 +++---
sc/source/ui/app/inputwin.cxx | 4 ++--
vcl/source/window/toolbox.cxx | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 5ca16c7b3153395d9107f84d366c796a22930756
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 30 17:00:28 2016 +0200
Convert ToolBoxLayoutMode to scoped enum
Change-Id: I95b2432fc9f4df8d055227331a44151af4d773ab
Reviewed-on: https://gerrit.libreoffice.org/25672
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 95cc60b..f87e8ef 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 882dfdd..dc46535 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 7327a5e..f75a03a 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
More information about the Libreoffice-commits
mailing list