diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-08-27 13:07:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-27 21:24:16 +0200 |
commit | ae8e1ad2e322cfa9522f793edc961203e28c1f22 (patch) | |
tree | e04c03d53101a78810511f509c81bc1cb186795b /sc | |
parent | d96b243c5d363f66e574fe68879e59244c338c22 (diff) |
convert code-class in ErrCode to scoped enum
Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7
Reviewed-on: https://gerrit.libreoffice.org/41601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/scerrors.hxx | 82 | ||||
-rw-r--r-- | sc/inc/scwarngs.hxx | 4 |
2 files changed, 43 insertions, 43 deletions
diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx index 039c65d97dae..7c062f4ea115 100644 --- a/sc/inc/scerrors.hxx +++ b/sc/inc/scerrors.hxx @@ -22,61 +22,61 @@ #include <vcl/errcode.hxx> -// ERRCODE_CLASS_READ - file related, displays "Read-Error" in MsgBox -#define SCERR_IMPORT_CONNECT ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_READ ) -#define SCERR_IMPORT_OPEN ErrCode( ErrCodeArea::Sc, 2 | ERRCODE_CLASS_READ ) -#define SCERR_IMPORT_UNKNOWN ErrCode( ErrCodeArea::Sc, 3 | ERRCODE_CLASS_READ ) +// ErrCodeClass::Read - file related, displays "Read-Error" in MsgBox +#define SCERR_IMPORT_CONNECT ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 1 ) +#define SCERR_IMPORT_OPEN ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 2 ) +#define SCERR_IMPORT_UNKNOWN ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 3 ) // out of memory -#define SCERR_IMPORT_OUTOFMEM ErrCode( ErrCodeArea::Sc, 4 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_OUTOFMEM ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 4 ) // unknown WK? format (Lotus 1-2-3) -#define SCERR_IMPORT_UNKNOWN_WK ErrCode( ErrCodeArea::Sc, 5 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_UNKNOWN_WK ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 5 ) // format error during reading (no formula error!) -#define SCERR_IMPORT_FORMAT ErrCode( ErrCodeArea::Sc, 6 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_FORMAT ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 6 ) // filter not implemented -#define SCERR_IMPORT_NI ErrCode( ErrCodeArea::Sc, 7 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_NI ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 7 ) // unknown BIFF format (Excel) -#define SCERR_IMPORT_UNKNOWN_BIFF ErrCode( ErrCodeArea::Sc, 8 | ERRCODE_CLASS_READ ) -#define SCERR_IMPORT_NI_BIFF ErrCode( ErrCodeArea::Sc, 9 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_UNKNOWN_BIFF ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 8 ) +#define SCERR_IMPORT_NI_BIFF ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 9 ) // file password protected -#define SCERR_IMPORT_FILEPASSWD ErrCode( ErrCodeArea::Sc, 10 | ERRCODE_CLASS_READ ) +#define SCERR_IMPORT_FILEPASSWD ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 10 ) // internal error -#define SCERR_IMPORT_INTERNAL ErrCode( ErrCodeArea::Sc, 11 | ERRCODE_CLASS_READ ) -#define SCERR_IMPORT_8K_LIMIT ErrCode( ErrCodeArea::Sc, 12 | ERRCODE_CLASS_READ ) -#define SCWARN_IMPORT_OPEN_FM3 ErrCode( ErrCodeArea::Sc, 13 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_WRONG_FM3 ErrCode( ErrCodeArea::Sc, 14 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_INFOLOST ErrCode( ErrCodeArea::Sc, 15 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK ) -#define SCERR_IMPORT_FILE_ROWCOL ErrCode( ErrCodeArea::Sc, 16 | ERRCODE_CLASS_READ ) -#define SCERR_IMPORT_FORMAT_ROWCOL ErrCode( ErrCodeArea::Sc, 17 | ERRCODE_CLASS_READ ) -#define SCWARN_IMPORT_FILE_ROWCOL ErrCode( ErrCodeArea::Sc, 18 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK ) +#define SCERR_IMPORT_INTERNAL ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 11 ) +#define SCERR_IMPORT_8K_LIMIT ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 12 ) +#define SCWARN_IMPORT_OPEN_FM3 ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Read, 13 ) +#define SCWARN_IMPORT_WRONG_FM3 ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Read, 14 ) +#define SCWARN_IMPORT_INFOLOST ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Read, 15 ) +#define SCERR_IMPORT_FILE_ROWCOL ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 16 ) +#define SCERR_IMPORT_FORMAT_ROWCOL ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 17 ) +#define SCWARN_IMPORT_FILE_ROWCOL ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Read, 18 ) -// ERRCODE_CLASS_WRITE - file related, displays "Write-Error" in MsgBox -#define SCERR_EXPORT_CONNECT ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_WRITE ) -#define SCERR_EXPORT_DATA ErrCode( ErrCodeArea::Sc, 2 | ERRCODE_CLASS_WRITE ) -#define SCERR_EXPORT_ENCODING ErrCode( ErrCodeArea::Sc, 3 | ERRCODE_CLASS_WRITE ) -#define SCERR_EXPORT_FIELDWIDTH ErrCode( ErrCodeArea::Sc, 4 | ERRCODE_CLASS_WRITE ) -#define SCERR_EXPORT_SQLEXCEPTION ErrCode( ErrCodeArea::Sc, 5 | ERRCODE_CLASS_WRITE ) +// ErrCodeClass::Write - file related, displays "Write-Error" in MsgBox +#define SCERR_EXPORT_CONNECT ErrCode( ErrCodeArea::Sc, ErrCodeClass::Write, 1 ) +#define SCERR_EXPORT_DATA ErrCode( ErrCodeArea::Sc, ErrCodeClass::Write, 2 ) +#define SCERR_EXPORT_ENCODING ErrCode( ErrCodeArea::Sc, ErrCodeClass::Write, 3 ) +#define SCERR_EXPORT_FIELDWIDTH ErrCode( ErrCodeArea::Sc, ErrCodeClass::Write, 4 ) +#define SCERR_EXPORT_SQLEXCEPTION ErrCode( ErrCodeArea::Sc, ErrCodeClass::Write, 5 ) -// ERRCODE_CLASS_IMPORT - does not display "Read-Error" in MsgBox +// ErrCodeClass::Import - does not display "Read-Error" in MsgBox // overflow of cell coordinates // table restricted to valid area (?) -#define SCWARN_IMPORT_RANGE_OVERFLOW ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_ROW_OVERFLOW ErrCode( ErrCodeArea::Sc, 2 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_COLUMN_OVERFLOW ErrCode( ErrCodeArea::Sc, 3 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_SHEET_OVERFLOW ErrCode( ErrCodeArea::Sc, 4 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_CELL_OVERFLOW ErrCode( ErrCodeArea::Sc, 5 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_IMPORT_FEATURES_LOST ErrCode( ErrCodeArea::Sc, 6 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK ) +#define SCWARN_IMPORT_RANGE_OVERFLOW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 1 ) +#define SCWARN_IMPORT_ROW_OVERFLOW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 2 ) +#define SCWARN_IMPORT_COLUMN_OVERFLOW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 3 ) +#define SCWARN_IMPORT_SHEET_OVERFLOW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 4 ) +#define SCWARN_IMPORT_CELL_OVERFLOW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 5 ) +#define SCWARN_IMPORT_FEATURES_LOST ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Import, 6 ) -// ERRCODE_CLASS_EXPORT - does not display "Write-Error" in MsgBox +// ErrCodeClass::Export - does not display "Write-Error" in MsgBox #define SCWARN_EXPORT_NONCONVERTIBLE_CHARS \ - ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_EXPORT_ASCII ErrCode( ErrCodeArea::Sc, 2 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_EXPORT_MAXROW ErrCode( ErrCodeArea::Sc, 3 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_EXPORT_MAXCOL ErrCode( ErrCodeArea::Sc, 4 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_EXPORT_MAXTAB ErrCode( ErrCodeArea::Sc, 5 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) -#define SCWARN_EXPORT_DATALOST ErrCode( ErrCodeArea::Sc, 6 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK ) + ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 1 ) +#define SCWARN_EXPORT_ASCII ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 2 ) +#define SCWARN_EXPORT_MAXROW ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 3 ) +#define SCWARN_EXPORT_MAXCOL ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 4 ) +#define SCWARN_EXPORT_MAXTAB ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 5 ) +#define SCWARN_EXPORT_DATALOST ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Export, 6 ) -// ERRCODE_CLASS_GENERAL -#define SCWARN_CORE_HARD_RECALC ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_GENERAL | ERRCODE_WARNING_MASK ) +// ErrCodeClass::General +#define SCWARN_CORE_HARD_RECALC ErrCode( WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::General, 1 ) #endif diff --git a/sc/inc/scwarngs.hxx b/sc/inc/scwarngs.hxx index 5bb783cfc488..e3dbfe16d351 100644 --- a/sc/inc/scwarngs.hxx +++ b/sc/inc/scwarngs.hxx @@ -20,8 +20,8 @@ #ifndef INCLUDED_SC_INC_SCWARNGS_HXX #define INCLUDED_SC_INC_SCWARNGS_HXX -#define ERRCODE_SC_EXPORT_WRN_ASCII (ERRCODE_WARNING_MASK | ErrCodeArea::Sc | ERRCODE_CLASS_WRITE | 1) -#define ERRCODE_SC_IMPORT_WRN_RNGOVRFLW (ERRCODE_WARNING_MASK | ErrCodeArea::Sc | ERRCODE_CLASS_READ | 1) +#define ERRCODE_SC_EXPORT_WRN_ASCII ErrCode(WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Write, 1) +#define ERRCODE_SC_IMPORT_WRN_RNGOVRFLW ErrCode(WarningFlag::Yes, ErrCodeArea::Sc, ErrCodeClass::Read, 1) #endif |