summaryrefslogtreecommitdiff
path: root/include/svtools/ruler.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-10 15:38:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-11 06:58:44 +0000
commit2d21ec205d1eca652fd501790d9d86a3336d6074 (patch)
tree9532a54032825ce6c836a62a2cca59a3c26247a7 /include/svtools/ruler.hxx
parentdc29492cd77a10163f004836afffdf8bd3c381d1 (diff)
Convert RULER_BORDER to scoped enum
Change-Id: Ia8dcffe817e6f7a5f8470ce08c25103c527d221d Reviewed-on: https://gerrit.libreoffice.org/24854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/svtools/ruler.hxx')
-rw-r--r--include/svtools/ruler.hxx41
1 files changed, 23 insertions, 18 deletions
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index ee6340c1e37d..0db49dc6561e 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -139,25 +139,25 @@ has to be passed. In the array, the following values have to be initialized:
long nWidth - column spacing in pixels (can also be 0, for example,
for table columns)
sal_uInt16 nStyle - bit style:
- RULER_BORDER_SIZEABLE
+ RulerBorderStyle::Sizeable
Column spacing can be changed. This flag should
only be set if the size of the spacing is changed,
not that of a cell.
- RULER_BORDER_MOVEABLE
+ RulerBorderStyle::Moveable
Column spacing/border can be moved. Whenever
table borders are to be moved, this flag should
be set instead of SIZEABLE (SIZEABLE indicates
that the size of a spacing, not that of a single
cell can be changed).
- RULER_BORDER_VARIABLE
+ RulerBorderStyle::Variable
Not all of the column spacings are equal
- RULER_BORDER_TABLE
+ RulerBorderStyle::Table
Table border. Whenever this style is set, the column
width must be 0.
- RULER_BORDER_SNAP
+ RulerBorderStyle::Snap
Auxiliary line. Whenever this style is set, the
column width must be 0.
- RULER_BORDER_MARGIN
+ RulerBorderStyle::Margin
Margin. Whenever this style is set, the column
width must be 0.
@@ -487,23 +487,28 @@ enum class RulerDragSize {
#define RULER_MARGIN_SIZEABLE ((sal_uInt16)0x0001)
-#define RULER_BORDER_SIZEABLE ((sal_uInt16)0x0001)
-#define RULER_BORDER_MOVEABLE ((sal_uInt16)0x0002)
-#define RULER_BORDER_VARIABLE ((sal_uInt16)0x0004)
-#define RULER_BORDER_TABLE ((sal_uInt16)0x0008)
-#define RULER_BORDER_SNAP ((sal_uInt16)0x0010)
-#define RULER_BORDER_MARGIN ((sal_uInt16)0x0020)
+enum class RulerBorderStyle {
+ Sizeable = 0x0001,
+ Moveable = 0x0002,
+ Variable = 0x0004,
+ Table = 0x0008,
+ Snap = 0x0010,
+ Margin = 0x0020,
+ Invisible = 0x0040
+};
+namespace o3tl {
+ template<> struct typed_flags<RulerBorderStyle> : is_typed_flags<RulerBorderStyle, 0x007f> {};
+}
struct RulerBorder
{
- long nPos;
- long nWidth;
- sal_uInt16 nStyle;
- long nMinPos; //minimum/maximum position, supported for table borders/rows
- long nMaxPos;
+ long nPos;
+ long nWidth;
+ RulerBorderStyle nStyle;
+ long nMinPos; //minimum/maximum position, supported for table borders/rows
+ long nMaxPos;
};
-
enum class RulerIndentStyle {
Top, Bottom, Border
};