summaryrefslogtreecommitdiff
path: root/include/svx/ruler.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-23 13:13:25 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:39 +0200
commitd478a1cd6426aba6a502963862ace5a9f6182450 (patch)
tree08fde85c22d342a6b6be17f431fe6fb8383391f7 /include/svx/ruler.hxx
parentaa82339bb6bbf38b2e56083115f9f485713c545e (diff)
convert SVXRULER_SUPPORT constants to scoped enum
Change-Id: Id6c2571b5a060530437509a8dc203dc1a346f773
Diffstat (limited to 'include/svx/ruler.hxx')
-rw-r--r--include/svx/ruler.hxx33
1 files changed, 20 insertions, 13 deletions
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index e36339558696..01eaa6c06b0e 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -59,6 +59,22 @@ namespace o3tl
template<> struct typed_flags<SvxRulerDragFlags> : is_typed_flags<SvxRulerDragFlags, 0x0f> {};
}
+enum class SvxRulerSupportFlags
+{
+ TABS = 0x0001,
+ PARAGRAPH_MARGINS = 0x0002,
+ BORDERS = 0x0004,
+ OBJECT = 0x0008,
+ SET_NULLOFFSET = 0x0010,
+ NEGATIVE_MARGINS = 0x0020,
+ PARAGRAPH_MARGINS_VERTICAL = 0x0040,
+ REDUCED_METRIC = 0x0080, //shorten the context menu to select metric
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxRulerSupportFlags> : is_typed_flags<SvxRulerSupportFlags, 0x00ff> {};
+}
+
class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
{
friend class SvxRulerItem;
@@ -85,8 +101,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
long lAppNullOffset; // in logic coordinates
long lMinFrame; // minimal frame width in pixels
long lInitialDragPos;
- sal_uInt16 nFlags;
- SvxRulerDragFlags nDragType;
+ SvxRulerSupportFlags nFlags;
+ SvxRulerDragFlags nDragType;
sal_uInt16 nDefTabType;
sal_uInt16 nTabCount;
sal_uInt16 nTabBufSize;
@@ -247,16 +263,7 @@ protected:
public:
-#define SVXRULER_SUPPORT_TABS 0x0001
-#define SVXRULER_SUPPORT_PARAGRAPH_MARGINS 0x0002
-#define SVXRULER_SUPPORT_BORDERS 0x0004
-#define SVXRULER_SUPPORT_OBJECT 0x0008
-#define SVXRULER_SUPPORT_SET_NULLOFFSET 0x0010
-#define SVXRULER_SUPPORT_NEGATIVE_MARGINS 0x0020
-#define SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL 0x0040
-#define SVXRULER_SUPPORT_REDUCED_METRIC 0x0080 //shorten the context menu to select metric
-
- SvxRuler(vcl::Window* pParent, vcl::Window *pEditWin, sal_uInt16 nRulerFlags,
+ SvxRuler(vcl::Window* pParent, vcl::Window *pEditWin, SvxRulerSupportFlags nRulerFlags,
SfxBindings &rBindings, WinBits nWinStyle = WB_STDRULER);
virtual ~SvxRuler();
virtual void dispose() SAL_OVERRIDE;
@@ -264,7 +271,7 @@ public:
void SetMinFrameSize(long lSize);
long GetMinFrameSize() const ;
- sal_uInt16 GetRulerFlags() const
+ SvxRulerSupportFlags GetRulerFlags() const
{
return nFlags;
}