From 3e22dfa5eb1ccebdc719a671d23bde7ccab256fb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Sep 2016 15:22:20 +0200 Subject: convert formula error codes to scoped enum Change-Id: I5ff214bf1ec9031e30344bc125bc99916fd11bfb Reviewed-on: https://gerrit.libreoffice.org/28897 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- sc/inc/formularesult.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sc/inc/formularesult.hxx') diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index 68a08e52d797..0a977dcf043a 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -33,12 +33,12 @@ struct FormulaResultValue double mfValue; svl::SharedString maString; - sal_uInt16 mnError; + FormulaError mnError; FormulaResultValue(); FormulaResultValue( double fValue ); - FormulaResultValue(const svl::SharedString& rStr ); - FormulaResultValue( sal_uInt16 nErr ); + FormulaResultValue( const svl::SharedString& rStr ); + FormulaResultValue( FormulaError nErr ); }; } @@ -71,7 +71,7 @@ class ScFormulaResult double mfValue; // double result direct for performance and memory consumption const formula::FormulaToken* mpToken; // if not, result token obtained from interpreter }; - sal_uInt16 mnError; // error code + FormulaError mnError; // error code bool mbToken :1; // whether content of union is a token bool mbEmpty :1; // empty cell result bool mbEmptyDisplayedAsString :1; // only if mbEmpty @@ -154,15 +154,15 @@ public: one paragraph */ bool IsMultiline() const; - bool GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const; + bool GetErrorOrDouble( FormulaError& rErr, double& rVal ) const; sc::FormulaResultValue GetResult() const; /** Get error code if set or GetCellResultType() is formula::svError or svUnknown, else 0. */ - sal_uInt16 GetResultError() const; + FormulaError GetResultError() const; /** Set error code, don't touch token or double. */ - void SetResultError( sal_uInt16 nErr ); + void SetResultError( FormulaError nErr ); /** Set direct double. Shouldn't be used externally except in ScFormulaCell for rounded CalcAsShown or SetErrCode() or -- cgit v1.2.3