diff options
-rwxr-xr-x | compilerplugins/clang/unusedenumconstants.py | 1 | ||||
-rw-r--r-- | connectivity/source/commontools/RowFunctionParser.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MQueryHelper.hxx | 15 | ||||
-rw-r--r-- | connectivity/source/inc/RowFunctionParser.hxx | 9 | ||||
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 1 |
5 files changed, 19 insertions, 21 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 89c35db1cf00..03b907137c67 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -90,6 +90,7 @@ for d in definitionSet: "sw/source/filter/ww8/fields.hxx", "vcl/source/fontsubset/cff.cxx", "include/vcl/settings.hxx", # stored in a setting, can't remove it without potentially triggering UBSAN + "basic/source/inc/opcodes.hxx", # can't touch this without breaking unit tests, not sure why # unit test code "cppu/source/uno/check.cxx", # general weird nonsense going on diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index b44713f4c961..dd7d05f03900 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -93,13 +93,13 @@ public: ORowSetValueDecoratorRef aRet; switch(meFunct) { - case ENUM_FUNC_EQUATION: + case ExpressionFunct::Equation: aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue() == mpSecondArg->evaluate(_aRow )->getValue() ); break; - case ENUM_FUNC_AND: + case ExpressionFunct::And: aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() && mpSecondArg->evaluate(_aRow )->getValue().getBool() ); break; - case ENUM_FUNC_OR: + case ExpressionFunct::Or: aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() || mpSecondArg->evaluate(_aRow )->getValue().getBool() ); break; default: @@ -111,7 +111,7 @@ public: { switch(meFunct) { - case ENUM_FUNC_EQUATION: + case ExpressionFunct::Equation: (*mpFirstArg->evaluate(_aRow )) = mpSecondArg->evaluate(_aRow )->getValue(); break; default: @@ -334,18 +334,18 @@ public: assignment = unaryFunction >> ch_p('=') >> argument - [ BinaryFunctionFunctor( ENUM_FUNC_EQUATION, self.getContext()) ] + [ BinaryFunctionFunctor( ExpressionFunct::Equation, self.getContext()) ] ; andExpression = assignment | ( '(' >> orExpression >> ')' ) - | ( assignment >> AND_ >> assignment ) [ BinaryFunctionFunctor( ENUM_FUNC_AND, self.getContext()) ] + | ( assignment >> AND_ >> assignment ) [ BinaryFunctionFunctor( ExpressionFunct::And, self.getContext()) ] ; orExpression = andExpression - | ( orExpression >> OR_ >> andExpression ) [ BinaryFunctionFunctor( ENUM_FUNC_OR, self.getContext()) ] + | ( orExpression >> OR_ >> andExpression ) [ BinaryFunctionFunctor( ExpressionFunct::Or, self.getContext()) ] ; basicExpression = diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx index 1871b4591e77..3861b5791a16 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.hxx +++ b/connectivity/source/drivers/mork/MQueryHelper.hxx @@ -47,11 +47,10 @@ namespace connectivity class MQueryExpressionBase { public: - typedef enum { - Unknown, + enum class node_type { StringExpr, Expr - } node_type; + }; protected: node_type m_eNodeType; @@ -61,8 +60,8 @@ namespace connectivity public: virtual ~MQueryExpressionBase() {} - bool isStringExpr( ) const { return m_eNodeType == StringExpr; } - bool isExpr( ) const { return m_eNodeType == Expr; } + bool isStringExpr( ) const { return m_eNodeType == node_type::StringExpr; } + bool isExpr( ) const { return m_eNodeType == node_type::Expr; } }; class MQueryExpressionString : public MQueryExpressionBase { @@ -76,7 +75,7 @@ namespace connectivity MQueryExpressionString( const OUString& lhs, MQueryOp::cond_type cond, const OUString& rhs ) - : MQueryExpressionBase( MQueryExpressionBase::StringExpr ) + : MQueryExpressionBase( MQueryExpressionBase::node_type::StringExpr ) , m_aName( lhs ) , m_aBooleanCondition( cond ) , m_aValue( rhs ) @@ -85,7 +84,7 @@ namespace connectivity MQueryExpressionString( const OUString& lhs, MQueryOp::cond_type cond ) - : MQueryExpressionBase( MQueryExpressionBase::StringExpr ) + : MQueryExpressionBase( MQueryExpressionBase::node_type::StringExpr ) , m_aName( lhs ) , m_aBooleanCondition( cond ) , m_aValue( OUString() ) @@ -123,7 +122,7 @@ namespace connectivity bool_cond getExpressionCondition( ) const { return m_aExprCondType; } - MQueryExpression() : MQueryExpressionBase( MQueryExpressionBase::Expr ), + MQueryExpression() : MQueryExpressionBase( MQueryExpressionBase::node_type::Expr ), m_aExprCondType( OR ) {} diff --git a/connectivity/source/inc/RowFunctionParser.hxx b/connectivity/source/inc/RowFunctionParser.hxx index ed547ed6647c..df2c7ba2bf4e 100644 --- a/connectivity/source/inc/RowFunctionParser.hxx +++ b/connectivity/source/inc/RowFunctionParser.hxx @@ -29,12 +29,11 @@ namespace connectivity { -enum ExpressionFunct +enum class ExpressionFunct { - FUNC_CONST, - ENUM_FUNC_EQUATION, - ENUM_FUNC_AND, - ENUM_FUNC_OR + Equation, + And, + Or }; #define EXPRESSION_FLAG_SUMANGLE_MODE 1 diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 3af9dd9a9e95..b8f7e16caaea 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -90,7 +90,6 @@ enum class PageType Gradient, Hatch, Bitmap, - Color, Shadow, Transparence, }; |