diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-23 13:12:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:38 +0200 |
commit | aa82339bb6bbf38b2e56083115f9f485713c545e (patch) | |
tree | e44f1efd7e5d2288a2cb8129c779ba8b1beac661 /include/svx/ruler.hxx | |
parent | 88254f057c7d543512e35213d2c19a77846a74e6 (diff) |
convert DRAG_ constants to scoped enum
Change-Id: I7946a1406bfbbc894a0a2aca32ead43e4cc89508
Diffstat (limited to 'include/svx/ruler.hxx')
-rw-r--r-- | include/svx/ruler.hxx | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx index e82af688ef47..e36339558696 100644 --- a/include/svx/ruler.hxx +++ b/include/svx/ruler.hxx @@ -23,6 +23,7 @@ #include <svtools/ruler.hxx> #include <svl/lstner.hxx> #include <svx/svxdllapi.h> +#include <o3tl/typed_flags_set.hxx> #include <boost/scoped_array.hpp> #include <memory> @@ -41,6 +42,23 @@ class SvxObjectItem; class SfxBoolItem; struct SvxRuler_Impl; +enum class SvxRulerDragFlags +{ + NONE = 0x00, + OBJECT = 0x01, + // reduce size of the last column, shift + OBJECT_SIZE_LINEAR = 0x02, + OBJECT_SIZE_PROPORTIONAL = 0x04, // proportional, Ctrl + // only current line (table; Shift-Ctrl) + OBJECT_ACTLINE_ONLY = 0x08, + // currently same key assignment + OBJECT_LEFT_INDENT_ONLY = OBJECT_SIZE_PROPORTIONAL, +}; +namespace o3tl +{ + template<> struct typed_flags<SvxRulerDragFlags> : is_typed_flags<SvxRulerDragFlags, 0x0f> {}; +} + class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener { friend class SvxRulerItem; @@ -68,20 +86,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener long lMinFrame; // minimal frame width in pixels long lInitialDragPos; sal_uInt16 nFlags; - - enum - { - NONE = 0x0000, - DRAG_OBJECT = 0x0001, - // reduce size of the last column, shift - DRAG_OBJECT_SIZE_LINEAR = 0x0002, - DRAG_OBJECT_SIZE_PROPORTIONAL = 0x0004, // proportional, Ctrl - // only current line (table; Shift-Ctrl) - DRAG_OBJECT_ACTLINE_ONLY = 0x0008, - // currently same key assignment - DRAG_OBJECT_LEFT_INDENT_ONLY = DRAG_OBJECT_SIZE_PROPORTIONAL - } nDragType; - + SvxRulerDragFlags nDragType; sal_uInt16 nDefTabType; sal_uInt16 nTabCount; sal_uInt16 nTabBufSize; |