diff options
author | Matteo Casalin <matteo.casalin@gmx.com> | 2012-02-15 23:12:03 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@gmx.com> | 2012-02-17 18:57:47 +0100 |
commit | 2d5c5177144dc2b9f7b12e84558f6d92af48cbb8 (patch) | |
tree | 6c870d4ef341091c8e145b00b18d4c1435f2ccdc /svtools | |
parent | b3b7a6088b932dc3f6716b24b9382fc049aaf4ff (diff) |
ValueSet: from #defines to enum, with reduced scope
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueimp.hxx | 8 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 20 |
2 files changed, 18 insertions, 10 deletions
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index fbe8b7de3951..f7cd13ff050a 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -47,15 +47,7 @@ // - Defines - // ----------- -#define ITEM_OFFSET 4 -#define ITEM_OFFSET_DOUBLE 6 -#define NAME_LINE_OFF_X 2 -#define NAME_LINE_OFF_Y 2 -#define NAME_LINE_HEIGHT 2 -#define NAME_OFFSET 2 -#define SCRBAR_OFFSET 1 #define VALUESET_ITEM_NONEITEM 0xFFFE -#define VALUESET_SCROLL_OFFSET 4 // -------------------- // - ValueSetItemType - diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 28caab6d34a2..e22ec21cc605 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -42,6 +42,22 @@ #define _SV_VALUESET_CXX #include <svtools/valueset.hxx> +namespace +{ + +enum { + ITEM_OFFSET = 4, + ITEM_OFFSET_DOUBLE = 6, + NAME_LINE_OFF_X = 2, + NAME_LINE_OFF_Y = 2, + NAME_LINE_HEIGHT = 2, + NAME_OFFSET = 2, + SCRBAR_OFFSET = 1, + SCROLL_OFFSET = 4 +}; + +} + // ------------ // - ValueSet - // ------------ @@ -975,9 +991,9 @@ bool ValueSet::ImplScroll( const Point& rPos ) sal_uInt16 nOldLine = mnFirstLine; const Rectangle& rTopRect = mItemList[ mnFirstLine*mnCols ]->maRect; if ( rTopRect.GetHeight() <= 16 ) - nScrollOffset = VALUESET_SCROLL_OFFSET/2; + nScrollOffset = SCROLL_OFFSET/2; else - nScrollOffset = VALUESET_SCROLL_OFFSET; + nScrollOffset = SCROLL_OFFSET; if ( (mnFirstLine > 0) && (rPos.Y() >= 0) ) { long nTopPos = rTopRect.Top(); |