convert CUBE constants to typed_flags_set
Change-Id: I5f0b0e73ab3b4c10fdc9ea2dc817ea2fda8149a7
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -40,7 +40,7 @@ void E3dDefaultAttributes::Reset()
|
||||
// Cube object
|
||||
aDefaultCubePos = basegfx::B3DPoint(-500.0, -500.0, -500.0);
|
||||
aDefaultCubeSize = basegfx::B3DVector(1000.0, 1000.0, 1000.0);
|
||||
nDefaultCubeSideFlags = CUBE_FULL;
|
||||
nDefaultCubeSideFlags = CubeFaces::Full;
|
||||
bDefaultCubePosIsCenter = false;
|
||||
|
||||
// Sphere object
|
||||
|
Reference in New Issue
Block a user