summaryrefslogtreecommitdiff
path: root/include/svtools/scrwin.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-20 14:26:46 +0200
committerNoel Grandin <noel@peralex.com>2015-04-22 10:28:41 +0200
commit2c9ee17c3b18d82680f4949d029a7caff4029c03 (patch)
tree97021cb75854fb82b18eaf99c190306022ac7570 /include/svtools/scrwin.hxx
parent865535acc3fb2bb8c8ce50649f70628f923a5f54 (diff)
convert SCRWIN_ constants to scoped enum
Change-Id: I345b2d6779b1d2595e949da0030f7acb299256f9
Diffstat (limited to 'include/svtools/scrwin.hxx')
-rw-r--r--include/svtools/scrwin.hxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/include/svtools/scrwin.hxx b/include/svtools/scrwin.hxx
index bde616ac321e..4e034e69f82d 100644
--- a/include/svtools/scrwin.hxx
+++ b/include/svtools/scrwin.hxx
@@ -21,8 +21,8 @@
#define INCLUDED_SVTOOLS_SCRWIN_HXX
#include <svtools/svtdllapi.h>
-
#include <vcl/scrbar.hxx>
+#include <o3tl/typed_flags_set.hxx>
class DataChangedEvent;
@@ -30,12 +30,17 @@ class DataChangedEvent;
// - ScrollableWindow-Type -
-typedef sal_uInt16 ScrollableWindowFlags;
-
-#define SCRWIN_THUMBDRAGGING 1
-#define SCRWIN_VCENTER 2
-#define SCRWIN_HCENTER 4
-#define SCRWIN_DEFAULT (SCRWIN_THUMBDRAGGING | SCRWIN_VCENTER | SCRWIN_HCENTER)
+enum class ScrollableWindowFlags
+{
+ THUMBDRAGGING = 1,
+ VCENTER = 2,
+ HCENTER = 4,
+ DEFAULT = THUMBDRAGGING | VCENTER | HCENTER,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ScrollableWindowFlags> : is_typed_flags<ScrollableWindowFlags, 0x07> {};
+}
// - ScrollableWindow -
@@ -63,7 +68,7 @@ private:
public:
ScrollableWindow( vcl::Window* pParent, WinBits nBits = 0,
- ScrollableWindowFlags = SCRWIN_DEFAULT );
+ ScrollableWindowFlags = ScrollableWindowFlags::DEFAULT );
virtual void Resize() SAL_OVERRIDE;
virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;