diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-24 13:09:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-25 08:40:00 +0200 |
commit | 8387ca6817f2fafcbb9c3bd9df76c91e93d4f772 (patch) | |
tree | 099bfe382b0ec091000ad3f7d938d93f722aaaff /include/svx | |
parent | 271bd3522e1148c0260688a42fd78959225db8cb (diff) |
convert CUBE constants to typed_flags_set
Change-Id: I5f0b0e73ab3b4c10fdc9ea2dc817ea2fda8149a7
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/cube3d.hxx | 24 | ||||
-rw-r--r-- | include/svx/deflt3d.hxx | 6 |
2 files changed, 23 insertions, 7 deletions
diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx index 34fad4320bb6..d1d2a06a4f15 100644 --- a/include/svx/cube3d.hxx +++ b/include/svx/cube3d.hxx @@ -22,6 +22,7 @@ #include <svx/obj3d.hxx> #include <svx/svxdllapi.h> +#include <o3tl/typed_flags_set.hxx> /************************************************************************* |* @@ -36,10 +37,23 @@ |* \************************************************************************/ -enum { CUBE_BOTTOM = 0x0001, CUBE_BACK = 0x0002, CUBE_LEFT = 0x0004, - CUBE_TOP = 0x0008, CUBE_RIGHT = 0x0010, CUBE_FRONT = 0x0020, - CUBE_FULL = 0x003F, CUBE_OPEN_TB = 0x0036, CUBE_OPEN_LR = 0x002B, - CUBE_OPEN_FB = 0x001D }; +enum class CubeFaces +{ + Bottom = 0x0001, + Back = 0x0002, + Left = 0x0004, + Top = 0x0008, + Right = 0x0010, + Front = 0x0020, + Full = Bottom | Back | Left | Top | Right | Front, + OpenTopBottom = Back | Left | Right | Front, + OpenLeftRight = Bottom | Back | Top | Front, + OpenFrontBack = Bottom | Left | Top | Right +}; +namespace o3tl +{ + template<> struct typed_flags<CubeFaces> : is_typed_flags<CubeFaces, 0x003f> {}; +} class SAL_WARN_UNUSED SVX_DLLPUBLIC E3dCubeObj : public E3dCompoundObject { @@ -47,7 +61,7 @@ private: // Parameter basegfx::B3DPoint aCubePos; basegfx::B3DVector aCubeSize; - sal_uInt16 nSideFlags; + CubeFaces nSideFlags; // BOOLeans bool bPosIsCenter : 1; diff --git a/include/svx/deflt3d.hxx b/include/svx/deflt3d.hxx index da8e3162e384..8a062931f905 100644 --- a/include/svx/deflt3d.hxx +++ b/include/svx/deflt3d.hxx @@ -25,6 +25,8 @@ #include <svx/svxdllapi.h> #include <tools/color.hxx> +enum class CubeFaces; + /************************************************************************* |* |* Class for managing the 3D default attributes @@ -42,7 +44,7 @@ private: // Cube object basegfx::B3DPoint aDefaultCubePos; basegfx::B3DVector aDefaultCubeSize; - sal_uInt16 nDefaultCubeSideFlags; + CubeFaces nDefaultCubeSideFlags; bool bDefaultCubePosIsCenter; // Sphere object @@ -81,7 +83,7 @@ public: // Cube object const basegfx::B3DPoint& GetDefaultCubePos() { return aDefaultCubePos; } const basegfx::B3DVector& GetDefaultCubeSize() { return aDefaultCubeSize; } - sal_uInt16 GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; } + CubeFaces GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; } bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; } // Sphere object |