summaryrefslogtreecommitdiff
path: root/sc/inc/scmatrix.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-11 15:36:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-12 08:44:50 +0200
commitfa25280bf83689aa92abbd5777a30c6fb4edd296 (patch)
treefdcd5ba34c7c8e712f496f9f51bb54080e55f8b5 /sc/inc/scmatrix.hxx
parentb5e352e5117fffaca8cfddde426079708a208258 (diff)
convert SC_MATVAL constants to typed_flags_set
Change-Id: I973c5253b385a5495bec38201655e3dbcb9a6f81
Diffstat (limited to 'sc/inc/scmatrix.hxx')
-rw-r--r--sc/inc/scmatrix.hxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index d26961d155fd..7fdcb1d782d9 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -70,7 +70,7 @@ struct ScMatrixValue
/// Only valid if ScMatrix methods indicate that this is a boolean
bool GetBoolean() const { return fVal != 0.0; }
- ScMatrixValue() : fVal(0.0), nType(SC_MATVAL_EMPTY) {}
+ ScMatrixValue() : fVal(0.0), nType(ScMatValType::Empty) {}
ScMatrixValue(const ScMatrixValue& r) :
fVal(r.fVal), aStr(r.aStr), nType(r.nType) {}
@@ -82,8 +82,8 @@ struct ScMatrixValue
switch (nType)
{
- case SC_MATVAL_VALUE:
- case SC_MATVAL_BOOLEAN:
+ case ScMatValType::Value:
+ case ScMatValType::Boolean:
return fVal == r.fVal;
break;
default:
@@ -176,19 +176,19 @@ public:
/// Value or boolean.
inline static bool IsValueType( ScMatValType nType )
{
- return nType <= SC_MATVAL_BOOLEAN;
+ return nType <= ScMatValType::Boolean;
}
/// Boolean.
inline static bool IsBooleanType( ScMatValType nType )
{
- return nType == SC_MATVAL_BOOLEAN;
+ return nType == ScMatValType::Boolean;
}
/// String, empty or empty path, but not value nor boolean.
inline static bool IsNonValueType( ScMatValType nType )
{
- return (nType & SC_MATVAL_NONVALUE) != 0;
+ return bool(nType & ScMatValType::NonvalueMask);
}
/** String, but not empty or empty path or any other type.
@@ -196,19 +196,19 @@ public:
IsNonValueType was named IsStringType. */
inline static bool IsRealStringType( ScMatValType nType )
{
- return (nType & SC_MATVAL_NONVALUE) == SC_MATVAL_STRING;
+ return (nType & ScMatValType::NonvalueMask) == ScMatValType::String;
}
/// Empty, but not empty path or any other type.
inline static bool IsEmptyType( ScMatValType nType )
{
- return (nType & SC_MATVAL_NONVALUE) == SC_MATVAL_EMPTY;
+ return (nType & ScMatValType::NonvalueMask) == ScMatValType::Empty;
}
/// Empty path, but not empty or any other type.
inline static bool IsEmptyPathType( ScMatValType nType )
{
- return (nType & SC_MATVAL_NONVALUE) == SC_MATVAL_EMPTYPATH;
+ return (nType & ScMatValType::NonvalueMask) == ScMatValType::EmptyPath;
}
ScMatrix() : nRefCnt(0), mbCloneIfConst(true) {}