diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-13 10:24:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-13 09:58:26 +0000 |
commit | 651752b9294f2db3458faa429beaa45bb450a57b (patch) | |
tree | 848973f40003b902d24c195904b89e2bc2ad371e /sw/inc | |
parent | e2e76df7e48fb77f1e802f57c7d9a22eb8c74c5a (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')
-rw-r--r-- | sw/inc/calc.hxx | 18 | ||||
-rw-r--r-- | sw/inc/shellres.hxx | 2 |
2 files changed, 8 insertions, 12 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 ); diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx index 5f391b7bf3b0..469486668801 100644 --- a/sw/inc/shellres.hxx +++ b/sw/inc/shellres.hxx @@ -35,9 +35,7 @@ struct SW_DLLPUBLIC ShellResource OUString aCalc_ZeroDiv; OUString aCalc_Brack; OUString aCalc_Pow; - OUString aCalc_VarNFnd; OUString aCalc_Overflow; - OUString aCalc_WrongTime; OUString aCalc_Default; OUString aCalc_Error; |