summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-29 13:16:59 +0200
committerNoel Grandin <noel@peralex.com>2016-08-30 08:40:03 +0200
commite27fbbcdf5fc1723297b22464d8291843f1b83a5 (patch)
treea3d6626041cdc8f9ebb88350279722defc5fc146 /include
parent2c86c131f77cfb70033ea83700dae7064c5127dd (diff)
convert ExpressionFunct to scoped enum
and drop the trivial subset of it EnumFunc Change-Id: I9ee7de829121f04e97c167b133cdc78c5ffd0822
Diffstat (limited to 'include')
-rw-r--r--include/svx/EnhancedCustomShape2d.hxx18
-rw-r--r--include/svx/EnhancedCustomShapeFunctionParser.hxx72
2 files changed, 37 insertions, 53 deletions
diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx
index c1f5ea99eb63..8ed9417af553 100644
--- a/include/svx/EnhancedCustomShape2d.hxx
+++ b/include/svx/EnhancedCustomShape2d.hxx
@@ -194,23 +194,7 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet
EnhancedCustomShape2d( SdrObject* pSdrObjCustomShape );
virtual ~EnhancedCustomShape2d();
- enum SAL_DLLPRIVATE EnumFunc
- {
- ENUM_FUNC_PI,
- ENUM_FUNC_LEFT,
- ENUM_FUNC_TOP,
- ENUM_FUNC_RIGHT,
- ENUM_FUNC_BOTTOM,
- ENUM_FUNC_XSTRETCH,
- ENUM_FUNC_YSTRETCH,
- ENUM_FUNC_HASSTROKE,
- ENUM_FUNC_HASFILL,
- ENUM_FUNC_WIDTH,
- ENUM_FUNC_HEIGHT,
- ENUM_FUNC_LOGWIDTH,
- ENUM_FUNC_LOGHEIGHT
- };
- SAL_DLLPRIVATE double GetEnumFunc( const EnumFunc eVal ) const;
+ SAL_DLLPRIVATE double GetEnumFunc( const EnhancedCustomShape::ExpressionFunct eVal ) const;
SAL_DLLPRIVATE double GetAdjustValueAsDouble( const sal_Int32 nIndex ) const;
SAL_DLLPRIVATE double GetEquationValueAsDouble( const sal_Int32 nIndex ) const;
diff --git a/include/svx/EnhancedCustomShapeFunctionParser.hxx b/include/svx/EnhancedCustomShapeFunctionParser.hxx
index e63872b7df4e..1539a7fff16d 100644
--- a/include/svx/EnhancedCustomShapeFunctionParser.hxx
+++ b/include/svx/EnhancedCustomShapeFunctionParser.hxx
@@ -44,43 +44,43 @@ class EnhancedCustomShape2d;
namespace EnhancedCustomShape {
-enum ExpressionFunct
+enum class ExpressionFunct
{
- FUNC_CONST,
-
- ENUM_FUNC_PI,
- ENUM_FUNC_LEFT,
- ENUM_FUNC_TOP,
- ENUM_FUNC_RIGHT,
- ENUM_FUNC_BOTTOM,
- ENUM_FUNC_XSTRETCH,
- ENUM_FUNC_YSTRETCH,
- ENUM_FUNC_HASSTROKE,
- ENUM_FUNC_HASFILL,
- ENUM_FUNC_WIDTH,
- ENUM_FUNC_HEIGHT,
- ENUM_FUNC_LOGWIDTH,
- ENUM_FUNC_LOGHEIGHT,
- ENUM_FUNC_ADJUSTMENT,
- ENUM_FUNC_EQUATION,
-
- UNARY_FUNC_ABS,
- UNARY_FUNC_SQRT,
- UNARY_FUNC_SIN,
- UNARY_FUNC_COS,
- UNARY_FUNC_TAN,
- UNARY_FUNC_ATAN,
- UNARY_FUNC_NEG,
-
- BINARY_FUNC_PLUS,
- BINARY_FUNC_MINUS,
- BINARY_FUNC_MUL,
- BINARY_FUNC_DIV,
- BINARY_FUNC_MIN,
- BINARY_FUNC_MAX,
- BINARY_FUNC_ATAN2,
-
- TERNARY_FUNC_IF
+ Const,
+
+ EnumPi,
+ EnumLeft,
+ EnumTop,
+ EnumRight,
+ EnumBottom,
+ EnumXStretch,
+ EnumYStretch,
+ EnumHasStroke,
+ EnumHasFill,
+ EnumWidth,
+ EnumHeight,
+ EnumLogWidth,
+ EnumLogHeight,
+ EnumAdjustment,
+ EnumEquation,
+
+ UnaryAbs,
+ UnarySqrt,
+ UnarySin,
+ UnaryCos,
+ UnaryTan,
+ UnaryAtan,
+ UnaryNeg,
+
+ BinaryPlus,
+ BinaryMinus,
+ BinaryMul,
+ BinaryDiv,
+ BinaryMin,
+ BinaryMax,
+ BinaryAtan2,
+
+ TernaryIf
};
#define EXPRESSION_FLAG_SUMANGLE_MODE 1