summaryrefslogtreecommitdiff
path: root/sw/inc/calc.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 10:24:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 09:58:26 +0000
commit651752b9294f2db3458faa429beaa45bb450a57b (patch)
tree848973f40003b902d24c195904b89e2bc2ad371e /sw/inc/calc.hxx
parente2e76df7e48fb77f1e802f57c7d9a22eb8c74c5a (diff)
convert SwCalcError to scoped enum
and drop unused CALC_VARNFND and CALC_WRONGTIME enumerators Change-Id: I415960180b074ee4c54c47e69962fe2ca1be42e0 Reviewed-on: https://gerrit.libreoffice.org/34195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/calc.hxx')
-rw-r--r--sw/inc/calc.hxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 630c43cb4a15..306a2bb6e9c7 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -87,16 +87,14 @@ extern const sal_Char sCalc_Round[];
extern const sal_Char sCalc_Date[];
// Calculate ErrorCodes
-enum SwCalcError
+enum class SwCalcError
{
- CALC_NOERR=0,
- CALC_SYNTAX, // syntax error
- CALC_ZERODIV, // division by zero
- CALC_BRACK, // faulty brackets
- CALC_POWERR, // overflow in power function
- CALC_VARNFND, // variable was not found
- CALC_OVERFLOW, // overflow
- CALC_WRONGTIME // wrong time format
+ NONE=0,
+ Syntax, // syntax error
+ DivByZero, // division by zero
+ FaultyBrackets, // faulty brackets
+ OverflowInPower, // overflow in power function
+ Overflow, // overflow
};
class SwSbxValue : public SbxValue
@@ -196,7 +194,7 @@ public:
void Pop();
void SetCalcError( SwCalcError eErr ) { m_eError = eErr; }
- bool IsCalcError() const { return 0 != m_eError; }
+ bool IsCalcError() const { return SwCalcError::NONE != m_eError; }
static bool Str2Double( const OUString& rStr, sal_Int32& rPos,
double& rVal );