From 662700703bebad38ca7ad74ca4eb040fe8b5b676 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 19 May 2015 08:05:39 +0200 Subject: convert GRID constants to scoped enum Change-Id: I73ae63bc5f41f38d1a4e396152808b22e88681d8 --- include/vcl/outdev.hxx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'include') 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 : is_typed_flags {}; } -// 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 : is_typed_flags {}; +} // 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 ); ///@} -- cgit