summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-22 13:33:08 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:37 +0200
commita38b2720a4be63f1093c66a13ec40aa894af23a2 (patch)
tree8ce61ef60d784c6670d40baf7a68b5eb23e7b2d5 /include
parente8199849a0d205bc2b815306ba6ed27b672881e6 (diff)
convert MSDFF_HANDLE_FLAGS_ constants to scoped enum
Change-Id: Ica0fe759db5ac9afca524f46ecfdb85368066403
Diffstat (limited to 'include')
-rw-r--r--include/svx/EnhancedCustomShapeGeometry.hxx37
1 files changed, 23 insertions, 14 deletions
diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx b/include/svx/EnhancedCustomShapeGeometry.hxx
index ca8e2b7cfb44..d67d6832a057 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -22,6 +22,7 @@
#include <sal/types.h>
#include <svx/msdffdef.hxx>
+#include <o3tl/typed_flags_set.hxx>
struct SvxMSDffVertPair
{
@@ -39,23 +40,31 @@ struct SvxMSDffTextRectangles
SvxMSDffVertPair nPairB;
};
-#define MSDFF_HANDLE_FLAGS_MIRRORED_X 0x0001
-#define MSDFF_HANDLE_FLAGS_MIRRORED_Y 0x0002
-#define MSDFF_HANDLE_FLAGS_SWITCHED 0x0004
-#define MSDFF_HANDLE_FLAGS_POLAR 0x0008
-#define MSDFF_HANDLE_FLAGS_MAP 0x0010
-#define MSDFF_HANDLE_FLAGS_RANGE 0x0020
-#define MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL 0x0080
-#define MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL 0x0100
-#define MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL 0x0200
-#define MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL 0x0400
-#define MSDFF_HANDLE_FLAGS_CENTER_X_IS_SPECIAL 0x0800
-#define MSDFF_HANDLE_FLAGS_CENTER_Y_IS_SPECIAL 0x1000
-#define MSDFF_HANDLE_FLAGS_RADIUS_RANGE 0x2000
+enum class SvxMSDffHandleFlags
+{
+ NONE = 0x0000,
+ MIRRORED_X = 0x0001,
+ MIRRORED_Y = 0x0002,
+ SWITCHED = 0x0004,
+ POLAR = 0x0008,
+ MAP = 0x0010,
+ RANGE = 0x0020,
+ RANGE_X_MIN_IS_SPECIAL = 0x0080,
+ RANGE_X_MAX_IS_SPECIAL = 0x0100,
+ RANGE_Y_MIN_IS_SPECIAL = 0x0200,
+ RANGE_Y_MAX_IS_SPECIAL = 0x0400,
+ CENTER_X_IS_SPECIAL = 0x0800,
+ CENTER_Y_IS_SPECIAL = 0x1000,
+ RADIUS_RANGE = 0x2000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SvxMSDffHandleFlags> : is_typed_flags<SvxMSDffHandleFlags, 0x3fff> {};
+}
struct SvxMSDffHandle
{
- sal_uInt32 nFlags;
+ SvxMSDffHandleFlags nFlags;
sal_Int32 nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax;
};
struct mso_CustomShape