diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-21 08:51:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-21 10:55:49 +0200 |
commit | 60dc8572e677b6c29f73d8848d9d6036d8d1ff05 (patch) | |
tree | bc21bcca1588b31804d19807381c4674d76bd035 /sd | |
parent | 25f65b23840a424991027067ae48d0a1de682380 (diff) |
simplify sd error macros
Change-Id: I0c2a720c4dddda77715e9d2697e9436f48a7d471
Reviewed-on: https://gerrit.libreoffice.org/41377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/errhdl.hrc | 9 | ||||
-rw-r--r-- | sd/inc/sderror.hxx | 17 |
2 files changed, 7 insertions, 19 deletions
diff --git a/sd/inc/errhdl.hrc b/sd/inc/errhdl.hrc index bcaa2a0a5328..f568a0292f62 100644 --- a/sd/inc/errhdl.hrc +++ b/sd/inc/errhdl.hrc @@ -24,17 +24,14 @@ #include "sderror.hxx" -#define ERR_CODE( class, err ) ErrCode(class | (sal_uInt32(err) - ERROR_SD_BASE)) -#define WARN_CODE( class, err ) ErrCode(class | (sal_uInt32(err) - WARN_SD_BASE)) - const ErrMsgCode RID_SD_ERRHDL[] = { { NC_("RID_SD_ERRHDL", "File format error found at $(ARG1)(row,col)."), - ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_ROWCOL ) }, + ERR_FORMAT_ROWCOL }, { NC_("RID_SD_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at position $(ARG2)(row,col)."), - ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_FILE_ROWCOL ) }, + ERR_FORMAT_FILE_ROWCOL }, { NC_("RID_SD_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at position $(ARG2)(row,col)."), - ERR_CODE ( ERRCODE_CLASS_READ , WARN_FORMAT_FILE_ROWCOL ) }, + WARN_FORMAT_FILE_ROWCOL }, { nullptr, ERRCODE_NONE } }; diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx index 4f52035a13c0..2be4c8c634b3 100644 --- a/sd/inc/sderror.hxx +++ b/sd/inc/sderror.hxx @@ -22,21 +22,12 @@ #include <vcl/errcode.hxx> -#define ERROR_SD_BASE (ERRCODE_AREA_SD) -#define ERROR_SD_READ_BASE (ERROR_SD_BASE | ERRCODE_CLASS_READ) -#define ERROR_SD_WRITE_BASE (ERROR_SD_BASE | ERRCODE_CLASS_WRITE) - -#define WARN_SD_BASE (ERRCODE_AREA_SD | ERRCODE_WARNING_MASK) -#define WARN_SD_READ_BASE (WARN_SD_BASE | ERRCODE_CLASS_READ ) -#define WARN_SD_WRITE_BASE (WARN_SD_BASE | ERRCODE_CLASS_WRITE ) - // Import errors -#define ERR_FORMAT_ROWCOL ErrCode(ERROR_SD_READ_BASE | 1) -#define ERR_FORMAT_FILE_ROWCOL ErrCode(ERROR_SD_READ_BASE | 2) - -// ----- Warnings --------------------------- +#define ERR_FORMAT_ROWCOL ErrCode(ERRCODE_AREA_SD | ERRCODE_CLASS_READ | 1) +#define ERR_FORMAT_FILE_ROWCOL ErrCode(ERRCODE_AREA_SD | ERRCODE_CLASS_READ | 2) -#define WARN_FORMAT_FILE_ROWCOL ErrCode(WARN_SD_READ_BASE | 100) +// Warnings +#define WARN_FORMAT_FILE_ROWCOL ErrCode(ERRCODE_AREA_SD | ERRCODE_WARNING_MASK | ERRCODE_CLASS_READ | 100) #endif |