summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-19 08:05:39 +0200
committerNoel Grandin <noel@peralex.com>2015-05-20 09:52:08 +0200
commit662700703bebad38ca7ad74ca4eb040fe8b5b676 (patch)
tree8e693319a485837c4b621244ced161b19c193302 /include
parentdcefc97c8bd5be9ba229098c32d2a5c73d084163 (diff)
convert GRID constants to scoped enum
Change-Id: I73ae63bc5f41f38d1a4e396152808b22e88681d8
Diffstat (limited to 'include')
-rw-r--r--include/vcl/outdev.hxx26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e72631c5fd82..21f36153b4ed 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -201,11 +201,19 @@ namespace o3tl
template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {};
}
-// Grid
-#define GRID_DOTS ((sal_uLong)0x00000001)
-#define GRID_HORZLINES ((sal_uLong)0x00000002)
-#define GRID_VERTLINES ((sal_uLong)0x00000004)
-#define GRID_LINES (GRID_HORZLINES | GRID_VERTLINES)
+// Flags for DrawGrid()
+enum class DrawGridFlags
+{
+ NONE = 0x0000,
+ Dots = 0x0001,
+ HorzLines = 0x0002,
+ VertLines = 0x0004,
+ Lines = HorzLines | VertLines,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DrawGridFlags> : is_typed_flags<DrawGridFlags, 0x0007> {};
+}
// DrawModes
#define DRAWMODE_DEFAULT ((sal_uLong)0x00000000)
@@ -405,12 +413,12 @@ public:
protected:
/// release all references to other objects.
- virtual void dispose();
+ virtual void dispose();
public:
/// call the dispose() method if we have not already been disposed.
- void disposeOnce();
- bool isDisposed() const { return mbDisposed; }
+ void disposeOnce();
+ bool isDisposed() const { return mbDisposed; }
public:
@@ -719,7 +727,7 @@ public:
Color aStart = Color(COL_WHITE),
Color aEnd = Color(COL_BLACK));
- void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
+ void DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
///@}