summaryrefslogtreecommitdiff
path: root/include/svtools/ruler.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 09:52:15 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-11 10:02:21 +0000
commit8e4a113229298b4fa5bddd6cf71715d1fb87c3ef (patch)
treee4287eee9ad21ff504e324b30cb003349beebe0b /include/svtools/ruler.hxx
parenta4f9fce47bffdda69c81ef64805e441610fca5b1 (diff)
Convert RULER_MARGIN to scoped enum
Change-Id: Ia8711614fdb9090faeebfe294cbb064ded20b5fb Reviewed-on: https://gerrit.libreoffice.org/24874 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.hxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 0db49dc6561e..f7708ba76b36 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -484,7 +484,14 @@ enum class RulerDragSize {
#define RULER_MOUSE_MARGINWIDTH 3
-#define RULER_MARGIN_SIZEABLE ((sal_uInt16)0x0001)
+enum class RulerMarginStyle {
+ NONE = 0x0000,
+ Sizeable = 0x0001,
+ Invisible = 0x0002
+};
+namespace o3tl {
+ template<> struct typed_flags<RulerMarginStyle> : is_typed_flags<RulerMarginStyle, 0x0003> {};
+}
enum class RulerBorderStyle {
@@ -764,11 +771,11 @@ public:
void SetNullOffset( long nPos );
long GetNullOffset() const;
- void SetMargin1() { SetMargin1( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin1( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin1() { SetMargin1( 0, RulerMarginStyle::Invisible ); }
+ void SetMargin1( long nPos, RulerMarginStyle nMarginStyle = RulerMarginStyle::Sizeable );
long GetMargin1() const;
- void SetMargin2() { SetMargin2( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin2( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin2() { SetMargin2( 0, RulerMarginStyle::Invisible ); }
+ void SetMargin2( long nPos, RulerMarginStyle nMarginStyle = RulerMarginStyle::Sizeable );
long GetMargin2() const;
void SetLeftFrameMargin( long nPos );