diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-03 02:35:31 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-03 20:53:12 +0000 |
commit | bb45bdf359c65c174fd557d615f77ceb46fa685c (patch) | |
tree | 1f87575ee1d0471b14f5078a99d3a589d955d56d /rsc/inc/rscerror.h | |
parent | 27a4d5597c0757611d0e2e682d0c05441859cc4e (diff) |
module rsc: String, bool and other clean-up.
Change-Id: I2dcde42e6068631a5a643961a764df86dc63dca2
Reviewed-on: https://gerrit.libreoffice.org/4690
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'rsc/inc/rscerror.h')
-rw-r--r-- | rsc/inc/rscerror.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h index 6b8a579594e4..6c7fd6ef1926 100644 --- a/rsc/inc/rscerror.h +++ b/rsc/inc/rscerror.h @@ -85,20 +85,19 @@ #define ERR_WARNINGEND 0x2000 -class ERRTYPE { +class ERRTYPE +{ sal_uInt32 nError; public: ERRTYPE() { nError = ERR_OK; } ERRTYPE( sal_uInt32 nErr ) { nError = nErr; } - ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; }; + ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; } ERRTYPE& operator = ( const ERRTYPE & rError ); - operator sal_uInt32() const { return( nError ); } - sal_Bool IsError() const { return( nError <= ERR_ERROREND ); } - sal_Bool IsOk() const { return( !IsError() ); } - sal_Bool IsWarning() const { - return( nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND ); - }; - void Clear(){ nError = ERR_OK; } + operator sal_uInt32() const { return( nError ); } + bool IsError() const { return nError <= ERR_ERROREND; } + bool IsOk() const { return !IsError(); } + bool IsWarning() const { return nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND;} + void Clear(){ nError = ERR_OK; } }; /****************** R s c E r r o r **************************************/ @@ -126,17 +125,14 @@ public: virtual ~RscError() {} sal_uInt32 nErrors;// Anzahl der Fehler - RscError( RscVerbosity _verbosity ) { - fListing = NULL; - nErrors = 0; - m_verbosity = _verbosity; - }; - void SetListFile( FILE * fList ){ - fListing = fList; - }; - FILE * GetListFile(){ - return fListing; - }; + RscError( RscVerbosity _verbosity ) + { + fListing = NULL; + nErrors = 0; + m_verbosity = _verbosity; + } + void SetListFile( FILE * fList ){ fListing = fList; } + FILE * GetListFile(){ return fListing; } RscVerbosity GetVerbosity() const { return m_verbosity; } virtual void StdOut( const char *, const RscVerbosity _verbosityLevel = RscVerbosityNormal ); virtual void StdErr( const char * ); |