summaryrefslogtreecommitdiffstats
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-08-19 18:31:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-22 11:08:15 +0200
commit158595543053c158a9bcb95f679e7b8a3c2e4e89 (patch)
treed15d673725cc0f4644034957b8e521875eea51e4 /sc/inc
parentloplugin:unnecessaryparen (diff)
downloadcore-158595543053c158a9bcb95f679e7b8a3c2e4e89.tar.gz
core-158595543053c158a9bcb95f679e7b8a3c2e4e89.zip
Convert ErrCode area to scoped enum
Change-Id: Ifa365bbac3c7eb21da9381ec8bb3be6b6785016b Reviewed-on: https://gerrit.libreoffice.org/41402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/scerrors.hxx73
-rw-r--r--sc/inc/scwarngs.hxx4
2 files changed, 39 insertions, 38 deletions
diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx
index 859d5a0befca..039c65d97dae 100644
--- a/sc/inc/scerrors.hxx
+++ b/sc/inc/scerrors.hxx
@@ -23,59 +23,60 @@
#include <vcl/errcode.hxx>
// ERRCODE_CLASS_READ - file related, displays "Read-Error" in MsgBox
-#define SCERR_IMPORT_CONNECT ErrCode( 1 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_OPEN ErrCode( 2 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_UNKNOWN ErrCode( 3 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#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 )
// out of memory
-#define SCERR_IMPORT_OUTOFMEM ErrCode( 4 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_OUTOFMEM ErrCode( ErrCodeArea::Sc, 4 | ERRCODE_CLASS_READ )
// unknown WK? format (Lotus 1-2-3)
-#define SCERR_IMPORT_UNKNOWN_WK ErrCode( 5 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_UNKNOWN_WK ErrCode( ErrCodeArea::Sc, 5 | ERRCODE_CLASS_READ )
// format error during reading (no formula error!)
-#define SCERR_IMPORT_FORMAT ErrCode( 6 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_FORMAT ErrCode( ErrCodeArea::Sc, 6 | ERRCODE_CLASS_READ )
// filter not implemented
-#define SCERR_IMPORT_NI ErrCode( 7 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_NI ErrCode( ErrCodeArea::Sc, 7 | ERRCODE_CLASS_READ )
// unknown BIFF format (Excel)
-#define SCERR_IMPORT_UNKNOWN_BIFF ErrCode( 8 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_NI_BIFF ErrCode( 9 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_UNKNOWN_BIFF ErrCode( ErrCodeArea::Sc, 8 | ERRCODE_CLASS_READ )
+#define SCERR_IMPORT_NI_BIFF ErrCode( ErrCodeArea::Sc, 9 | ERRCODE_CLASS_READ )
// file password protected
-#define SCERR_IMPORT_FILEPASSWD ErrCode( 10 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
+#define SCERR_IMPORT_FILEPASSWD ErrCode( ErrCodeArea::Sc, 10 | ERRCODE_CLASS_READ )
// internal error
-#define SCERR_IMPORT_INTERNAL ErrCode( 11 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_8K_LIMIT ErrCode( 12 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_OPEN_FM3 ErrCode( 13 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_WRONG_FM3 ErrCode( 14 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_INFOLOST ErrCode( 15 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_FILE_ROWCOL ErrCode( 16 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCERR_IMPORT_FORMAT_ROWCOL ErrCode( 17 | ERRCODE_CLASS_READ | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_FILE_ROWCOL ErrCode( 18 | ERRCODE_CLASS_READ | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
+#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 )
// ERRCODE_CLASS_WRITE - file related, displays "Write-Error" in MsgBox
-#define SCERR_EXPORT_CONNECT ErrCode( 1 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC )
-#define SCERR_EXPORT_DATA ErrCode( 2 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC )
-#define SCERR_EXPORT_ENCODING ErrCode( 3 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC )
-#define SCERR_EXPORT_FIELDWIDTH ErrCode( 4 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC )
-#define SCERR_EXPORT_SQLEXCEPTION ErrCode( 5 | ERRCODE_CLASS_WRITE | ERRCODE_AREA_SC )
+#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 )
// ERRCODE_CLASS_IMPORT - does not display "Read-Error" in MsgBox
// overflow of cell coordinates
// table restricted to valid area (?)
-#define SCWARN_IMPORT_RANGE_OVERFLOW ErrCode( 1 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_ROW_OVERFLOW ErrCode( 2 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_COLUMN_OVERFLOW ErrCode( 3 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_SHEET_OVERFLOW ErrCode( 4 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_CELL_OVERFLOW ErrCode( 5 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_IMPORT_FEATURES_LOST ErrCode( 6 | ERRCODE_CLASS_IMPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
+#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 )
// ERRCODE_CLASS_EXPORT - does not display "Write-Error" in MsgBox
-#define SCWARN_EXPORT_NONCONVERTIBLE_CHARS ErrCode( 1 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_EXPORT_ASCII ErrCode( 2 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_EXPORT_MAXROW ErrCode( 3 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_EXPORT_MAXCOL ErrCode( 4 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_EXPORT_MAXTAB ErrCode( 5 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
-#define SCWARN_EXPORT_DATALOST ErrCode( 6 | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
+#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_CLASS_GENERAL
-#define SCWARN_CORE_HARD_RECALC ErrCode( 1 | ERRCODE_CLASS_GENERAL | ERRCODE_WARNING_MASK | ERRCODE_AREA_SC )
+#define SCWARN_CORE_HARD_RECALC ErrCode( ErrCodeArea::Sc, 1 | ERRCODE_CLASS_GENERAL | ERRCODE_WARNING_MASK )
#endif
diff --git a/sc/inc/scwarngs.hxx b/sc/inc/scwarngs.hxx
index fb460d2cec12..5bb783cfc488 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 | ERRCODE_AREA_SC | ERRCODE_CLASS_WRITE | 1)
-#define ERRCODE_SC_IMPORT_WRN_RNGOVRFLW (ERRCODE_WARNING_MASK | ERRCODE_AREA_SC | ERRCODE_CLASS_READ | 1)
+#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)
#endif