[Libreoffice-commits] core.git: basic/source include/basic include/editeng include/svtools include/svx include/vcl sc/inc sd/inc svtools/inc svtools/source sw/inc sw/source

Noel Grandin noelgrandin at gmail.com
Sun Aug 27 19:27:50 UTC 2017


 basic/source/classes/sb.cxx       |    2 
 include/basic/sberrors.hxx        |  413 ++++++++++++++++++--------------------
 include/basic/sbxdef.hxx          |   58 ++---
 include/editeng/editerr.hxx       |    4 
 include/svtools/ehdl.hxx          |    2 
 include/svtools/sfxecode.hxx      |   38 +--
 include/svtools/soerr.hxx         |    4 
 include/svx/svxerr.hxx            |   22 +-
 include/vcl/errcode.hxx           |  158 +++++++-------
 include/vcl/graphicfilter.hxx     |   12 -
 sc/inc/scerrors.hxx               |   82 +++----
 sc/inc/scwarngs.hxx               |    4 
 sd/inc/sderror.hxx                |    6 
 svtools/inc/errtxt.hrc            |  168 +++++++--------
 svtools/inc/strings.hxx           |    2 
 svtools/source/misc/ehdl.cxx      |   13 -
 sw/inc/error.hrc                  |   12 -
 sw/inc/swerror.h                  |   38 +--
 sw/source/filter/ascii/parasc.cxx |    2 
 19 files changed, 526 insertions(+), 514 deletions(-)

New commits:
commit ae8e1ad2e322cfa9522f793edc961203e28c1f22
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Aug 27 13:07:55 2017 +0200

    convert code-class in ErrCode to scoped enum
    
    Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7
    Reviewed-on: https://gerrit.libreoffice.org/41601
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index b810eb0c87ce..f06dd5b36971 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1669,7 +1669,7 @@ bool StarBASIC::RTError( ErrCode code, const OUString& rMsg, sal_Int32 l, sal_In
     SolarMutexGuard aSolarGuard;
 
     ErrCode c = code;
-    if( c.GetClass() == ERRCODE_CLASS_COMPILER )
+    if( c.GetClass() == ErrCodeClass::Compiler )
     {
         c = ERRCODE_NONE;
     }
diff --git a/include/basic/sberrors.hxx b/include/basic/sberrors.hxx
index d35a5ceb6a39..8ecaaeacb549 100644
--- a/include/basic/sberrors.hxx
+++ b/include/basic/sberrors.hxx
@@ -54,227 +54,226 @@
 #define ERRCODE_BASIC_NOT_A_COLL            ERRCODE_SBX_NOT_A_COLL              // Object not a collection
 
 // Append Basic specific error messages to ErrCodeArea::Sbx
-#define ERRCODE_BASIC_NO_GOSUB              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+1) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Return without Gosub
-#define ERRCODE_BASIC_REDO_FROM_START       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+2) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Redo form start (SB internal)
-#define ERRCODE_BASIC_NO_MEMORY             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+3) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Out of memory
-#define ERRCODE_BASIC_ALREADY_DIM           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+4) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Array already dimensioned
-#define ERRCODE_BASIC_DUPLICATE_DEF         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+5) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Duplicate definition
-#define ERRCODE_BASIC_VAR_UNDEFINED         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+6) | \
-                                            ERRCODE_CLASS_RUNTIME)          // Variable undefined (SB)
-#define ERRCODE_BASIC_USER_ABORT            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+7) | \
-                                            ERRCODE_CLASS_RUNTIME)              // User interrupt occurred
-#define ERRCODE_BASIC_BAD_RESUME            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+8) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Resume without error
-#define ERRCODE_BASIC_STACK_OVERFLOW        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+9) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Out of stack space
-#define ERRCODE_BASIC_BAD_DLL_LOAD          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+10) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Error in loading DLL
-#define ERRCODE_BASIC_BAD_DLL_CALL          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+11) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Bad DLL calling convention
-#define ERRCODE_BASIC_BAD_CHANNEL           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+12) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Bad file name or number
-#define ERRCODE_BASIC_FILE_NOT_FOUND        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+13) | \
-                                            ERRCODE_CLASS_RUNTIME)              // File not found
-#define ERRCODE_BASIC_BAD_FILE_MODE         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+14) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Bad file mode
-#define ERRCODE_BASIC_FILE_ALREADY_OPEN     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+15) | \
-                                            ERRCODE_CLASS_RUNTIME)              // File already open
-#define ERRCODE_BASIC_IO_ERROR              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+16) | \
-                                            ERRCODE_CLASS_RUNTIME)          // Device I/O error
-#define ERRCODE_BASIC_FILE_EXISTS           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+17) | \
-                                            ERRCODE_CLASS_RUNTIME)              // File already exists
-#define ERRCODE_BASIC_BAD_RECORD_LENGTH     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+18) | \
-                                            ERRCODE_CLASS_RUNTIME)              // bad record length
-#define ERRCODE_BASIC_DISK_FULL             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+19) | \
-                                            ERRCODE_CLASS_RUNTIME)              // disk full
-#define ERRCODE_BASIC_READ_PAST_EOF         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+20) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Input past end of file
-#define ERRCODE_BASIC_BAD_RECORD_NUMBER     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+21) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Bad record number
-#define ERRCODE_BASIC_TOO_MANY_FILES        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+22) | \
-                                            ERRCODE_CLASS_RUNTIME)          // Too many files
-#define ERRCODE_BASIC_NO_DEVICE             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+23) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Device not available
-#define ERRCODE_BASIC_ACCESS_DENIED         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+24) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Permission denied
-#define ERRCODE_BASIC_NOT_READY             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+25) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Disk not ready
-#define ERRCODE_BASIC_NOT_IMPLEMENTED       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+26) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Feature not implemented
-#define ERRCODE_BASIC_DIFFERENT_DRIVE       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+27) | \
-                                            ERRCODE_CLASS_RUNTIME)              // No rename with different drive
-#define ERRCODE_BASIC_ACCESS_ERROR          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+28) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Path/File access error
-#define ERRCODE_BASIC_PATH_NOT_FOUND        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+29) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Path not found
-#define ERRCODE_BASIC_BAD_PATTERN           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+30) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Invalid pattern string
-#define ERRCODE_BASIC_IS_NULL               ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+31) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Invalid use of Null
+#define ERRCODE_BASIC_NO_GOSUB              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+1 \
+                                            )              // Return without Gosub
+#define ERRCODE_BASIC_REDO_FROM_START       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+2 \
+                                            )              // Redo form start (SB internal)
+#define ERRCODE_BASIC_NO_MEMORY             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+3 \
+                                            )              // Out of memory
+#define ERRCODE_BASIC_ALREADY_DIM           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+4 \
+                                            )              // Array already dimensioned
+#define ERRCODE_BASIC_DUPLICATE_DEF         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+5 \
+                                            )              // Duplicate definition
+#define ERRCODE_BASIC_VAR_UNDEFINED         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+6 \
+                                            )          // Variable undefined (SB)
+#define ERRCODE_BASIC_USER_ABORT            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+7 \
+                                            )              // User interrupt occurred
+#define ERRCODE_BASIC_BAD_RESUME            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+8 \
+                                            )              // Resume without error
+#define ERRCODE_BASIC_STACK_OVERFLOW        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+9 \
+                                            )              // Out of stack space
+#define ERRCODE_BASIC_BAD_DLL_LOAD          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+10 \
+                                            )              // Error in loading DLL
+#define ERRCODE_BASIC_BAD_DLL_CALL          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+11 \
+                                            )              // Bad DLL calling convention
+#define ERRCODE_BASIC_BAD_CHANNEL           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+12 \
+                                            )              // Bad file name or number
+#define ERRCODE_BASIC_FILE_NOT_FOUND        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+13 \
+                                            )              // File not found
+#define ERRCODE_BASIC_BAD_FILE_MODE         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+14 \
+                                            )              // Bad file mode
+#define ERRCODE_BASIC_FILE_ALREADY_OPEN     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+15 \
+                                            )              // File already open
+#define ERRCODE_BASIC_IO_ERROR              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+16 \
+                                            )          // Device I/O error
+#define ERRCODE_BASIC_FILE_EXISTS           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+17 \
+                                            )              // File already exists
+#define ERRCODE_BASIC_BAD_RECORD_LENGTH     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+18 \
+                                            )              // bad record length
+#define ERRCODE_BASIC_DISK_FULL             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+19 \
+                                            )              // disk full
+#define ERRCODE_BASIC_READ_PAST_EOF         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+20 \
+                                            )              // Input past end of file
+#define ERRCODE_BASIC_BAD_RECORD_NUMBER     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+21 \
+                                            )              // Bad record number
+#define ERRCODE_BASIC_TOO_MANY_FILES        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+22 \
+                                            )          // Too many files
+#define ERRCODE_BASIC_NO_DEVICE             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+23 \
+                                            )              // Device not available
+#define ERRCODE_BASIC_ACCESS_DENIED         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+24 \
+                                            )              // Permission denied
+#define ERRCODE_BASIC_NOT_READY             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+25 \
+                                            )              // Disk not ready
+#define ERRCODE_BASIC_NOT_IMPLEMENTED       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+26 \
+                                            )              // Feature not implemented
+#define ERRCODE_BASIC_DIFFERENT_DRIVE       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+27 \
+                                            )              // No rename with different drive
+#define ERRCODE_BASIC_ACCESS_ERROR          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+28 \
+                                            )              // Path/File access error
+#define ERRCODE_BASIC_PATH_NOT_FOUND        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+29 \
+                                            )              // Path not found
+#define ERRCODE_BASIC_BAD_PATTERN           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+30 \
+                                            )              // Invalid pattern string
+#define ERRCODE_BASIC_IS_NULL               ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+31 \
+                                            )              // Invalid use of Null
 
 // DDE messages from 250-299
-#define ERRCODE_BASIC_DDE_ERROR             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+32) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_WAITINGACK        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+33) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_OUTOFCHANNELS     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+34) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_NO_RESPONSE       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+35) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_MULT_RESPONSES    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+36) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_CHANNEL_LOCKED    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+37) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_NOTPROCESSED      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+38) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_TIMEOUT           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+39) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_USER_INTERRUPT    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+40) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_BUSY              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+41) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_NO_DATA           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+42) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_WRONG_DATA_FORMAT ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+43) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_PARTNER_QUIT      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+44) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_CONV_CLOSED       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+45) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_NO_CHANNEL        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+46) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_INVALID_LINK      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+47) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_QUEUE_OVERFLOW    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+48) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_LINK_ALREADY_EST  ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+49) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_LINK_INV_TOPIC    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+50) | \
-                                            ERRCODE_CLASS_RUNTIME)
-#define ERRCODE_BASIC_DDE_DLL_NOT_FOUND     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+51) | \
-                                            ERRCODE_CLASS_RUNTIME)
+#define ERRCODE_BASIC_DDE_ERROR             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+32 \
+                                            )
+#define ERRCODE_BASIC_DDE_WAITINGACK        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+33 \
+                                            )
+#define ERRCODE_BASIC_DDE_OUTOFCHANNELS     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+34 \
+                                            )
+#define ERRCODE_BASIC_DDE_NO_RESPONSE       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+35 \
+                                            )
+#define ERRCODE_BASIC_DDE_MULT_RESPONSES    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+36 \
+                                            )
+#define ERRCODE_BASIC_DDE_CHANNEL_LOCKED    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+37 \
+                                            )
+#define ERRCODE_BASIC_DDE_NOTPROCESSED      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+38 \
+                                            )
+#define ERRCODE_BASIC_DDE_TIMEOUT           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+39 \
+                                            )
+#define ERRCODE_BASIC_DDE_USER_INTERRUPT    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+40 \
+                                            )
+#define ERRCODE_BASIC_DDE_BUSY              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+41 \
+                                            )
+#define ERRCODE_BASIC_DDE_NO_DATA           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+42 \
+                                            )
+#define ERRCODE_BASIC_DDE_WRONG_DATA_FORMAT ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+43 \
+                                            )
+#define ERRCODE_BASIC_DDE_PARTNER_QUIT      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+44 \
+                                            )
+#define ERRCODE_BASIC_DDE_CONV_CLOSED       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+45 \
+                                            )
+#define ERRCODE_BASIC_DDE_NO_CHANNEL        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+46 \
+                                            )
+#define ERRCODE_BASIC_DDE_INVALID_LINK      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+47 \
+                                            )
+#define ERRCODE_BASIC_DDE_QUEUE_OVERFLOW    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+48 \
+                                            )
+#define ERRCODE_BASIC_DDE_LINK_ALREADY_EST  ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+49 \
+                                            )
+#define ERRCODE_BASIC_DDE_LINK_INV_TOPIC    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+50 \
+                                            )
+#define ERRCODE_BASIC_DDE_DLL_NOT_FOUND     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+51 \
+                                            )
 
-#define ERRCODE_BASIC_NEEDS_OBJECT          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+52) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Object required
-#define ERRCODE_BASIC_BAD_ORDINAL           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+53) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Invalid ordinal
-#define ERRCODE_BASIC_DLLPROC_NOT_FOUND     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+54) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Specified DLL function not found
-#define ERRCODE_BASIC_BAD_CLIPBD_FORMAT     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+55) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Invalid clipboard format
+#define ERRCODE_BASIC_NEEDS_OBJECT          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+52 \
+                                            )              // Object required
+#define ERRCODE_BASIC_BAD_ORDINAL           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+53 \
+                                            )              // Invalid ordinal
+#define ERRCODE_BASIC_DLLPROC_NOT_FOUND     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+54 \
+                                            )              // Specified DLL function not found
+#define ERRCODE_BASIC_BAD_CLIPBD_FORMAT     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+55 \
+                                            )              // Invalid clipboard format
 
 // Debugger messages from 700-799
 
-#define ERRCODE_BASIC_PROPERTY_NOT_FOUND    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+56) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Class not have property
-#define ERRCODE_BASIC_METHOD_NOT_FOUND      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+57) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Class does not have method
-#define ERRCODE_BASIC_ARG_MISSING           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+58) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Missing required argument
-#define ERRCODE_BASIC_BAD_NUMBER_OF_ARGS    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+59) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Bad number of arguments
-#define ERRCODE_BASIC_METHOD_FAILED         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+60) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Method failed
-#define ERRCODE_BASIC_SETPROP_FAILED        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+61) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Unable to set property
-#define ERRCODE_BASIC_GETPROP_FAILED        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+62) | \
-                                            ERRCODE_CLASS_RUNTIME)              // Unable to get property
+#define ERRCODE_BASIC_PROPERTY_NOT_FOUND    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+56 \
+                                            )              // Class not have property
+#define ERRCODE_BASIC_METHOD_NOT_FOUND      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+57 \
+                                            )              // Class does not have method
+#define ERRCODE_BASIC_ARG_MISSING           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+58 \
+                                            )              // Missing required argument
+#define ERRCODE_BASIC_BAD_NUMBER_OF_ARGS    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+59 \
+                                            )              // Bad number of arguments
+#define ERRCODE_BASIC_METHOD_FAILED         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+60 \
+                                            )              // Method failed
+#define ERRCODE_BASIC_SETPROP_FAILED        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+61 \
+                                            )              // Unable to set property
+#define ERRCODE_BASIC_GETPROP_FAILED        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+62 \
+                                            )              // Unable to get property
 
 // Compiler Errors (do not occur at runtime)
 // These IDs can shift at any time
 
-#define ERRCODE_BASIC_UNEXPECTED            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+63) | \
-                                            ERRCODE_CLASS_COMPILER)             // Unexpected symbol: xx
-#define ERRCODE_BASIC_EXPECTED              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+64) | \
-                                            ERRCODE_CLASS_COMPILER)             // Expected: xx
-#define ERRCODE_BASIC_SYMBOL_EXPECTED       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+65) | \
-                                            ERRCODE_CLASS_COMPILER)             // Symbol expected
-#define ERRCODE_BASIC_VAR_EXPECTED          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+66) | \
-                                            ERRCODE_CLASS_COMPILER)             // Variable expected
-#define ERRCODE_BASIC_LABEL_EXPECTED        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+67) | \
-                                            ERRCODE_CLASS_COMPILER)             // Label expected
-#define ERRCODE_BASIC_LVALUE_EXPECTED       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+68) | \
-                                            ERRCODE_CLASS_COMPILER)             // Lvalue expected
-#define ERRCODE_BASIC_VAR_DEFINED           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+69) | \
-                                            ERRCODE_CLASS_COMPILER)             // Variable xxx already defined
-#define ERRCODE_BASIC_PROC_DEFINED          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+70) | \
-                                            ERRCODE_CLASS_COMPILER)             // Procedure xx already defined
-#define ERRCODE_BASIC_LABEL_DEFINED         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+71) | \
-                                            ERRCODE_CLASS_COMPILER)             // Label xxx already defined
-#define ERRCODE_BASIC_UNDEF_VAR             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+72) | \
-                                            ERRCODE_CLASS_COMPILER)             // Variable xx undefined
-#define ERRCODE_BASIC_UNDEF_ARRAY           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+73) | \
-                                            ERRCODE_CLASS_COMPILER)             // Array or function xx undefined
-#define ERRCODE_BASIC_UNDEF_PROC            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+74) | \
-                                            ERRCODE_CLASS_COMPILER)             // Procedure xxx undefined
-#define ERRCODE_BASIC_UNDEF_LABEL           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+75) | \
-                                            ERRCODE_CLASS_COMPILER)             // Label xxx undefined
-#define ERRCODE_BASIC_UNDEF_TYPE            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+76) | \
-                                            ERRCODE_CLASS_COMPILER)             // Unknown user defined type xxx
-#define ERRCODE_BASIC_BAD_EXIT              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+77) | \
-                                            ERRCODE_CLASS_COMPILER)             // Exit XXX expected
-#define ERRCODE_BASIC_BAD_BLOCK             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+78) | \
-                                            ERRCODE_CLASS_COMPILER)             // Unterminated statement block: missing XX
-#define ERRCODE_BASIC_BAD_BRACKETS          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+79) | \
-                                            ERRCODE_CLASS_COMPILER)             // Parentheses do not match
-#define ERRCODE_BASIC_BAD_DECLARATION       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+80) | \
-                                            ERRCODE_CLASS_COMPILER)             // Symbol xx defined differently
-#define ERRCODE_BASIC_BAD_PARAMETERS        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+81) | \
-                                            ERRCODE_CLASS_COMPILER)             // Parameters do not match
-#define ERRCODE_BASIC_BAD_CHAR_IN_NUMBER    ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+82) | \
-                                            ERRCODE_CLASS_COMPILER)             // Bad character in number
-#define ERRCODE_BASIC_MUST_HAVE_DIMS        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+83) | \
-                                            ERRCODE_CLASS_COMPILER)             // Array needs dimensioning
-#define ERRCODE_BASIC_NO_IF                 ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+84) | \
-                                            ERRCODE_CLASS_COMPILER)             // Else/Endif without If
-#define ERRCODE_BASIC_NOT_IN_SUBR           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+85) | \
-                                            ERRCODE_CLASS_COMPILER)             // xxx not allowed within a sub
-#define ERRCODE_BASIC_NOT_IN_MAIN           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+86) | \
-                                            ERRCODE_CLASS_COMPILER)             // xxx not allowed outside a sub
-#define ERRCODE_BASIC_WRONG_DIMS            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+87) | \
-                                            ERRCODE_CLASS_COMPILER)             // Dimensions do not match
-#define ERRCODE_BASIC_BAD_OPTION            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+88) | \
-                                            ERRCODE_CLASS_COMPILER)             // Unknown option: xxx
-#define ERRCODE_BASIC_CONSTANT_REDECLARED   ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+89) | \
-                                            ERRCODE_CLASS_COMPILER)             // Constant xx redeclared
-#define ERRCODE_BASIC_PROG_TOO_LARGE        ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+90) | \
-                                            ERRCODE_CLASS_COMPILER)             // Program is too large
-#define ERRCODE_BASIC_NO_STRINGS_ARRAYS     ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+91) | \
-                                            ERRCODE_CLASS_COMPILER)
+#define ERRCODE_BASIC_UNEXPECTED            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+63 \
+                                            )             // Unexpected symbol: xx
+#define ERRCODE_BASIC_EXPECTED              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+64 \
+                                            )             // Expected: xx
+#define ERRCODE_BASIC_SYMBOL_EXPECTED       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+65 \
+                                            )             // Symbol expected
+#define ERRCODE_BASIC_VAR_EXPECTED          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+66 \
+                                            )             // Variable expected
+#define ERRCODE_BASIC_LABEL_EXPECTED        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+67 \
+                                            )             // Label expected
+#define ERRCODE_BASIC_LVALUE_EXPECTED       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+68 \
+                                            )             // Lvalue expected
+#define ERRCODE_BASIC_VAR_DEFINED           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+69 \
+                                            )             // Variable xxx already defined
+#define ERRCODE_BASIC_PROC_DEFINED          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+70 \
+                                            )             // Procedure xx already defined
+#define ERRCODE_BASIC_LABEL_DEFINED         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+71 \
+                                            )             // Label xxx already defined
+#define ERRCODE_BASIC_UNDEF_VAR             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+72 \
+                                            )             // Variable xx undefined
+#define ERRCODE_BASIC_UNDEF_ARRAY           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+73 \
+                                            )             // Array or function xx undefined
+#define ERRCODE_BASIC_UNDEF_PROC            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+74 \
+                                            )             // Procedure xxx undefined
+#define ERRCODE_BASIC_UNDEF_LABEL           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+75 \
+                                            )             // Label xxx undefined
+#define ERRCODE_BASIC_UNDEF_TYPE            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+76 \
+                                            )             // Unknown user defined type xxx
+#define ERRCODE_BASIC_BAD_EXIT              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+77 \
+                                            )             // Exit XXX expected
+#define ERRCODE_BASIC_BAD_BLOCK             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+78 \
+                                            )             // Unterminated statement block: missing XX
+#define ERRCODE_BASIC_BAD_BRACKETS          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+79 \
+                                            )             // Parentheses do not match
+#define ERRCODE_BASIC_BAD_DECLARATION       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+80 \
+                                            )             // Symbol xx defined differently
+#define ERRCODE_BASIC_BAD_PARAMETERS        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+81 \
+                                            )             // Parameters do not match
+#define ERRCODE_BASIC_BAD_CHAR_IN_NUMBER    ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+82 \
+                                            )             // Bad character in number
+#define ERRCODE_BASIC_MUST_HAVE_DIMS        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+83 \
+                                            )             // Array needs dimensioning
+#define ERRCODE_BASIC_NO_IF                 ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+84 \
+                                            )             // Else/Endif without If
+#define ERRCODE_BASIC_NOT_IN_SUBR           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+85 \
+                                            )             // xxx not allowed within a sub
+#define ERRCODE_BASIC_NOT_IN_MAIN           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+86 \
+                                            )             // xxx not allowed outside a sub
+#define ERRCODE_BASIC_WRONG_DIMS            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+87 \
+                                            )             // Dimensions do not match
+#define ERRCODE_BASIC_BAD_OPTION            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+88 \
+                                            )             // Unknown option: xxx
+#define ERRCODE_BASIC_CONSTANT_REDECLARED   ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+89 \
+                                            )             // Constant xx redeclared
+#define ERRCODE_BASIC_PROG_TOO_LARGE        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+90 \
+                                            )             // Program is too large
+#define ERRCODE_BASIC_NO_STRINGS_ARRAYS     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+91 \
+                                            )
 
-#define ERRCODE_BASIC_EXCEPTION             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+92) | \
-                                            ERRCODE_CLASS_RUNTIME)
+#define ERRCODE_BASIC_EXCEPTION             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+92 )
 
-#define ERRCODE_BASMGR_STDLIBOPEN           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+93))
-#define ERRCODE_BASMGR_STDLIBSAVE           ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+94))
-#define ERRCODE_BASMGR_LIBLOAD              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+95))
-#define ERRCODE_BASMGR_LIBCREATE            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+96))
-#define ERRCODE_BASMGR_LIBSAVE              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+97))
-#define ERRCODE_BASMGR_LIBDEL               ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+98))
-#define ERRCODE_BASMGR_MGROPEN              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+99))
-#define ERRCODE_BASMGR_MGRSAVE              ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+100))
-#define ERRCODE_BASMGR_REMOVELIB            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+101))
-#define ERRCODE_BASMGR_UNLOADLIB            ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+102))
+#define ERRCODE_BASMGR_STDLIBOPEN           ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+93)
+#define ERRCODE_BASMGR_STDLIBSAVE           ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+94)
+#define ERRCODE_BASMGR_LIBLOAD              ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+95)
+#define ERRCODE_BASMGR_LIBCREATE            ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+96)
+#define ERRCODE_BASMGR_LIBSAVE              ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+97)
+#define ERRCODE_BASMGR_LIBDEL               ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+98)
+#define ERRCODE_BASMGR_MGROPEN              ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+99)
+#define ERRCODE_BASMGR_MGRSAVE              ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+100)
+#define ERRCODE_BASMGR_REMOVELIB            ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+101)
+#define ERRCODE_BASMGR_UNLOADLIB            ErrCode( ErrCodeArea::Sbx, LAST_SBX_ERROR_ID+102)
 
-#define ERRCODE_BASIC_ARRAY_FIX             ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+104) | \
-                                            ERRCODE_CLASS_COMPILER)             // This array is fixed
-#define ERRCODE_BASIC_STRING_OVERFLOW       ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+105) | \
-                                            ERRCODE_CLASS_COMPILER)             // Out of string space
-#define ERRCODE_BASIC_EXPR_TOO_COMPLEX      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+106) | \
-                                            ERRCODE_CLASS_COMPILER)             // Expression too complex
-#define ERRCODE_BASIC_OPER_NOT_PERFORM      ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+107) | \
-                                            ERRCODE_CLASS_COMPILER)             // Can't perform requested operation
-#define ERRCODE_BASIC_TOO_MANY_DLL          ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+108) | \
-                                            ERRCODE_CLASS_COMPILER)             // Too many dll application clients
-#define ERRCODE_BASIC_LOOP_NOT_INIT         ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+109) | \
-                                            ERRCODE_CLASS_COMPILER)             // For loop not initialized
+#define ERRCODE_BASIC_ARRAY_FIX             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+104 \
+                                            )             // This array is fixed
+#define ERRCODE_BASIC_STRING_OVERFLOW       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+105 \
+                                            )             // Out of string space
+#define ERRCODE_BASIC_EXPR_TOO_COMPLEX      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+106 \
+                                            )             // Expression too complex
+#define ERRCODE_BASIC_OPER_NOT_PERFORM      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+107 \
+                                            )             // Can't perform requested operation
+#define ERRCODE_BASIC_TOO_MANY_DLL          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+108 \
+                                            )             // Too many dll application clients
+#define ERRCODE_BASIC_LOOP_NOT_INIT         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, LAST_SBX_ERROR_ID+109 \
+                                            )             // For loop not initialized
 
-#define ERRCODE_BASIC_COMPAT                ErrCode( ErrCodeArea::Sbx, (LAST_SBX_ERROR_ID+103) | ERRCODE_CLASS_RUNTIME)
+#define ERRCODE_BASIC_COMPAT                ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, LAST_SBX_ERROR_ID+103 )
 
 // Grid messages from 30000-30999
 // OLE messages from 31000-31999
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index 9c36d849bb3b..1c15a1c31968 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -124,35 +124,35 @@ enum class SbxNameType {          // Type of the questioned name of a variable
 };
 
 // New error codes per define
-#define ERRCODE_SBX_SYNTAX               ErrCode( ErrCodeArea::Sbx,  1UL | ERRCODE_CLASS_COMPILER)
-#define ERRCODE_SBX_NOTIMP               ErrCode( ErrCodeArea::Sbx,  2UL | ERRCODE_CLASS_NOTSUPPORTED)
-#define ERRCODE_SBX_OVERFLOW             ErrCode( ErrCodeArea::Sbx,  3UL | ERRCODE_CLASS_SBX)        // overflow
-#define ERRCODE_SBX_BOUNDS               ErrCode( ErrCodeArea::Sbx,  4UL | ERRCODE_CLASS_SBX)        // Invalid array index
-#define ERRCODE_SBX_ZERODIV              ErrCode( ErrCodeArea::Sbx,  5UL | ERRCODE_CLASS_SBX)        // Division by zero
-#define ERRCODE_SBX_CONVERSION           ErrCode( ErrCodeArea::Sbx,  6UL | ERRCODE_CLASS_SBX)        // wrong data type
-#define ERRCODE_SBX_BAD_PARAMETER        ErrCode( ErrCodeArea::Sbx,  7UL | ERRCODE_CLASS_RUNTIME)    // invalid Parameter
-#define ERRCODE_SBX_PROC_UNDEFINED       ErrCode( ErrCodeArea::Sbx,  8UL | ERRCODE_CLASS_RUNTIME)    // Sub or Func not def
-#define ERRCODE_SBX_ERROR                ErrCode( ErrCodeArea::Sbx,  9UL | ERRCODE_CLASS_UNKNOWN)    // generic object error
-#define ERRCODE_SBX_NO_OBJECT            ErrCode( ErrCodeArea::Sbx, 10UL | ERRCODE_CLASS_RUNTIME)   // Object var not object
-#define ERRCODE_SBX_CANNOT_LOAD          ErrCode( ErrCodeArea::Sbx, 11UL | ERRCODE_CLASS_CREATE)    // Object init/load fail
-#define ERRCODE_SBX_BAD_INDEX            ErrCode( ErrCodeArea::Sbx, 12UL | ERRCODE_CLASS_SBX)       // Invalid object index
-#define ERRCODE_SBX_NO_ACTIVE_OBJECT     ErrCode( ErrCodeArea::Sbx, 13UL | ERRCODE_CLASS_ACCESS)    // Object not active
-#define ERRCODE_SBX_BAD_PROP_VALUE       ErrCode( ErrCodeArea::Sbx, 14UL | ERRCODE_CLASS_RUNTIME)   // Bad property value
-#define ERRCODE_SBX_PROP_READONLY        ErrCode( ErrCodeArea::Sbx, 15UL | ERRCODE_CLASS_READ)      // Property is read only
-#define ERRCODE_SBX_PROP_WRITEONLY       ErrCode( ErrCodeArea::Sbx, 16UL | ERRCODE_CLASS_WRITE)     // Property is write only
-#define ERRCODE_SBX_INVALID_OBJECT       ErrCode( ErrCodeArea::Sbx, 17UL | ERRCODE_CLASS_ACCESS)    // Invalid object reference
-#define ERRCODE_SBX_NO_METHOD            ErrCode( ErrCodeArea::Sbx, 18UL | ERRCODE_CLASS_RUNTIME)   // Property or Method unknown
-#define ERRCODE_SBX_INVALID_USAGE_OBJECT ErrCode( ErrCodeArea::Sbx, 19UL | ERRCODE_CLASS_ACCESS)   // Invalid object usage
-#define ERRCODE_SBX_NO_OLE               ErrCode( ErrCodeArea::Sbx, 20UL | ERRCODE_CLASS_ACCESS)    // No OLE-Object
-#define ERRCODE_SBX_BAD_METHOD           ErrCode( ErrCodeArea::Sbx, 21UL | ERRCODE_CLASS_RUNTIME)   // Method not supported
-#define ERRCODE_SBX_OLE_ERROR            ErrCode( ErrCodeArea::Sbx, 22UL | ERRCODE_CLASS_RUNTIME)   // OLE Automation Error
-#define ERRCODE_SBX_BAD_ACTION           ErrCode( ErrCodeArea::Sbx, 23UL | ERRCODE_CLASS_NOTSUPPORTED)  // Action not supported
-#define ERRCODE_SBX_NO_NAMED_ARGS        ErrCode( ErrCodeArea::Sbx, 24UL | ERRCODE_CLASS_RUNTIME)   // No named arguments
-#define ERRCODE_SBX_BAD_LOCALE           ErrCode( ErrCodeArea::Sbx, 25UL | ERRCODE_CLASS_NOTSUPPORTED)  // Locale not supported
-#define ERRCODE_SBX_NAMED_NOT_FOUND      ErrCode( ErrCodeArea::Sbx, 26UL | ERRCODE_CLASS_RUNTIME)   // Unknown named argument
-#define ERRCODE_SBX_NOT_OPTIONAL         ErrCode( ErrCodeArea::Sbx, 27UL | ERRCODE_CLASS_RUNTIME)   // Argument not optional
-#define ERRCODE_SBX_WRONG_ARGS           ErrCode( ErrCodeArea::Sbx, 28UL | ERRCODE_CLASS_SBX)       // Invalid number of arguments
-#define ERRCODE_SBX_NOT_A_COLL           ErrCode( ErrCodeArea::Sbx, 29UL | ERRCODE_CLASS_RUNTIME)   // Object contains no elements
+#define ERRCODE_SBX_SYNTAX               ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, 1)
+#define ERRCODE_SBX_NOTIMP               ErrCode( ErrCodeArea::Sbx, ErrCodeClass::NotSupported, 2)
+#define ERRCODE_SBX_OVERFLOW             ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 3)        // overflow
+#define ERRCODE_SBX_BOUNDS               ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 4)        // Invalid array index
+#define ERRCODE_SBX_ZERODIV              ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 5)        // Division by zero
+#define ERRCODE_SBX_CONVERSION           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 6)        // wrong data type
+#define ERRCODE_SBX_BAD_PARAMETER        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 7)    // invalid Parameter
+#define ERRCODE_SBX_PROC_UNDEFINED       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 8)    // Sub or Func not def
+#define ERRCODE_SBX_ERROR                ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Unknown, 9)    // generic object error
+#define ERRCODE_SBX_NO_OBJECT            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 10)   // Object var not object
+#define ERRCODE_SBX_CANNOT_LOAD          ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Create, 11)    // Object init/load fail
+#define ERRCODE_SBX_BAD_INDEX            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 12)       // Invalid object index
+#define ERRCODE_SBX_NO_ACTIVE_OBJECT     ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Access, 13)    // Object not active
+#define ERRCODE_SBX_BAD_PROP_VALUE       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 14)   // Bad property value
+#define ERRCODE_SBX_PROP_READONLY        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Read, 15)      // Property is read only
+#define ERRCODE_SBX_PROP_WRITEONLY       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Write, 16)     // Property is write only
+#define ERRCODE_SBX_INVALID_OBJECT       ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Access, 17)    // Invalid object reference
+#define ERRCODE_SBX_NO_METHOD            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 18)   // Property or Method unknown
+#define ERRCODE_SBX_INVALID_USAGE_OBJECT ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Access, 19)   // Invalid object usage
+#define ERRCODE_SBX_NO_OLE               ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Access, 20)    // No OLE-Object
+#define ERRCODE_SBX_BAD_METHOD           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 21)   // Method not supported
+#define ERRCODE_SBX_OLE_ERROR            ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 22)   // OLE Automation Error
+#define ERRCODE_SBX_BAD_ACTION           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::NotSupported, 23)  // Action not supported
+#define ERRCODE_SBX_NO_NAMED_ARGS        ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 24)   // No named arguments
+#define ERRCODE_SBX_BAD_LOCALE           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::NotSupported, 25)  // Locale not supported
+#define ERRCODE_SBX_NAMED_NOT_FOUND      ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 26)   // Unknown named argument
+#define ERRCODE_SBX_NOT_OPTIONAL         ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 27)   // Argument not optional
+#define ERRCODE_SBX_WRONG_ARGS           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Sbx, 28)       // Invalid number of arguments
+#define ERRCODE_SBX_NOT_A_COLL           ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Runtime, 29)   // Object contains no elements
 #define LAST_SBX_ERROR_ID                29UL
 
 // Flag-Bits:
diff --git a/include/editeng/editerr.hxx b/include/editeng/editerr.hxx
index 918e39a65d2d..23cc549a9cdb 100644
--- a/include/editeng/editerr.hxx
+++ b/include/editeng/editerr.hxx
@@ -21,8 +21,8 @@
 
 #include <vcl/errcode.hxx>
 
-#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS    ErrCode(ErrCodeArea::Svx, 2UL)
-#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT   ErrCode(ErrCodeArea::Svx, 8UL | ERRCODE_CLASS_READ)
+#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS    ErrCode(ErrCodeArea::Svx, 2)
+#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT   ErrCode(ErrCodeArea::Svx, ErrCodeClass::Read, 8)
 
 #endif
 
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index 25713c5831ba..2b42fd5e8b91 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -65,7 +65,7 @@ private:
     const ErrMsgCode*    pIds;
     const std::locale&   rResLocale;
 
-    SVT_DLLPRIVATE static void GetClassString(sal_uLong lErrId, OUString &);
+    SVT_DLLPRIVATE static void GetClassString(ErrCodeClass lErrId, OUString &);
     virtual bool          CreateString(const ErrorInfo *, OUString &) const override;
 };
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 7827e6a7146a..3cc2f28e4816 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -21,27 +21,27 @@
 
 #include <vcl/errcode.hxx>
 
-#define ERRCODE_SFX_NOTATEMPLATE            ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_FORMAT | 2)
-#define ERRCODE_SFX_GENERAL                 ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_GENERAL | 3)
-#define ERRCODE_SFX_DOLOADFAILED            ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_READ | 4)
-#define ERRCODE_SFX_ALREADYOPEN             ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_ALREADYEXISTS | 10)
-#define ERRCODE_SFX_WRONGPASSWORD           ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_READ | 11)
-#define ERRCODE_SFX_DOCUMENTREADONLY        ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_WRITE | 12)
-#define ERRCODE_SFX_OLEGENERAL              ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_NONE | 14)
-#define ERRCODE_SFX_TEMPLATENOTFOUND        ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_NOTEXISTS | 15)
+#define ERRCODE_SFX_NOTATEMPLATE            ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Format, 2)
+#define ERRCODE_SFX_GENERAL                 ErrCode(ErrCodeArea::Sfx, ErrCodeClass::General, 3)
+#define ERRCODE_SFX_DOLOADFAILED            ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Read, 4)
+#define ERRCODE_SFX_ALREADYOPEN             ErrCode(ErrCodeArea::Sfx, ErrCodeClass::AlreadyExists, 10)
+#define ERRCODE_SFX_WRONGPASSWORD           ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Read, 11)
+#define ERRCODE_SFX_DOCUMENTREADONLY        ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Write, 12)
+#define ERRCODE_SFX_OLEGENERAL              ErrCode(ErrCodeArea::Sfx, ErrCodeClass::NONE, 14)
+#define ERRCODE_SFX_TEMPLATENOTFOUND        ErrCode(ErrCodeArea::Sfx, ErrCodeClass::NotExists, 15)
 
-#define ERRCODE_SFX_CANTCREATECONTENT       ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_CREATE | 21)
-#define ERRCODE_SFX_INVALIDSYNTAX           ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_PATH | 36)
-#define ERRCODE_SFX_CANTGETPASSWD           ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_READ | 42)
-#define ERRCODE_SFX_NOMOREDOCUMENTSALLOWED  ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 44)
-#define ERRCODE_SFX_CANTCREATEBACKUP        ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_CREATE | 50)
-#define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 51)
-#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 52)
-#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 54)
-#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 55)
+#define ERRCODE_SFX_CANTCREATECONTENT       ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Create, 21)
+#define ERRCODE_SFX_INVALIDSYNTAX           ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Path, 36)
+#define ERRCODE_SFX_CANTGETPASSWD           ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Read, 42)
+#define ERRCODE_SFX_NOMOREDOCUMENTSALLOWED  ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 44)
+#define ERRCODE_SFX_CANTCREATEBACKUP        ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Create, 50)
+#define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
+#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
-                                            ErrCode(ErrCodeArea::Sfx, ERRCODE_WARNING_MASK | ERRCODE_CLASS_NONE | 56)
-#define ERRCODE_SFX_FORMAT_ROWCOL           ErrCode(ErrCodeArea::Sfx, ERRCODE_CLASS_NONE | 57)
+                                            ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 56)
+#define ERRCODE_SFX_FORMAT_ROWCOL           ErrCode(ErrCodeArea::Sfx, ErrCodeClass::NONE, 57)
 
 
 // Various
diff --git a/include/svtools/soerr.hxx b/include/svtools/soerr.hxx
index 1d09ca527d00..96a4677bf5d0 100644
--- a/include/svtools/soerr.hxx
+++ b/include/svtools/soerr.hxx
@@ -24,8 +24,8 @@
 #include <svtools/svtdllapi.h>
 
 // error codes
-#define SO_ERR(x) ErrCode(ErrCodeArea::So, ERRCODE_CLASS_SO | x)
-#define SO_WRN(x) ErrCode(ErrCodeArea::So, ERRCODE_CLASS_SO | ERRCODE_WARNING_MASK | x)
+#define SO_ERR(x) ErrCode(ErrCodeArea::So, ErrCodeClass::So, x)
+#define SO_WRN(x) ErrCode(WarningFlag::Yes, ErrCodeArea::So, ErrCodeClass::So, x)
 
 #define ERRCODE_SO_GENERALERROR             SO_ERR(1)
 #define ERRCODE_SO_CANNOT_DOVERB_NOW        SO_WRN(28)
diff --git a/include/svx/svxerr.hxx b/include/svx/svxerr.hxx
index cd0e72560d19..e746649ea317 100644
--- a/include/svx/svxerr.hxx
+++ b/include/svx/svxerr.hxx
@@ -23,23 +23,23 @@
 #include <svtools/ehdl.hxx>
 #include <svx/svxdllapi.h>
 
-#define ERRCODE_SVX_LINGU_LINGUNOTEXISTS      ErrCode( ErrCodeArea::Svx,  3UL | ERRCODE_CLASS_NOTEXISTS )
-#define ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE   ErrCode( ErrCodeArea::Svx,  6UL | ERRCODE_CLASS_WRITE )
-#define ERRCODE_SVX_GRAPHIC_NOTREADABLE       ErrCode( ErrCodeArea::Svx,  7UL | ERRCODE_CLASS_READ )
-#define ERRCODE_SVX_LINGU_NOLANGUAGE          ErrCode( ErrCodeArea::Svx,  9UL | ERRCODE_CLASS_NOTEXISTS )
-#define ERRCODE_SVX_MODIFIED_VBASIC_STORAGE   ErrCode( ErrCodeArea::Svx, 13UL | ERRCODE_CLASS_WRITE | ERRCODE_WARNING_MASK )
-#define ERRCODE_SVX_VBASIC_STORAGE_EXIST      ErrCode( ErrCodeArea::Svx, 14UL | ERRCODE_CLASS_WRITE | ERRCODE_WARNING_MASK )
+#define ERRCODE_SVX_LINGU_LINGUNOTEXISTS      ErrCode( ErrCodeArea::Svx, ErrCodeClass::NotExists, 3 )
+#define ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE   ErrCode( ErrCodeArea::Svx, ErrCodeClass::Write, 6 )
+#define ERRCODE_SVX_GRAPHIC_NOTREADABLE       ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 7 )
+#define ERRCODE_SVX_LINGU_NOLANGUAGE          ErrCode( ErrCodeArea::Svx, ErrCodeClass::NotExists, 9 )
+#define ERRCODE_SVX_MODIFIED_VBASIC_STORAGE   ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Write, 13 )
+#define ERRCODE_SVX_VBASIC_STORAGE_EXIST      ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Write, 14 )
 /** Error message: "Wrong password." */
-#define ERRCODE_SVX_WRONGPASS                 ErrCode( ErrCodeArea::Svx, 15UL | ERRCODE_CLASS_NONE)
+#define ERRCODE_SVX_WRONGPASS                 ErrCode( ErrCodeArea::Svx, ErrCodeClass::NONE, 15)
 /** Error message: "Read error. Unsupported encryption method." */
-#define ERRCODE_SVX_READ_FILTER_CRYPT         ErrCode( ErrCodeArea::Svx, 16UL | ERRCODE_CLASS_READ)
+#define ERRCODE_SVX_READ_FILTER_CRYPT         ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 16)
 /** Error message: "Read error. Passwort encrypted Powerpoint documents..." */
-#define ERRCODE_SVX_READ_FILTER_PPOINT        ErrCode( ErrCodeArea::Svx, 17UL | ERRCODE_CLASS_READ)
+#define ERRCODE_SVX_READ_FILTER_PPOINT        ErrCode( ErrCodeArea::Svx, ErrCodeClass::Read, 17)
 /** Error message: "Warning. Passwort protection is not supported when..." */
-#define ERRCODE_SVX_EXPORT_FILTER_CRYPT       ErrCode( ErrCodeArea::Svx, 18UL | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK)
+#define ERRCODE_SVX_EXPORT_FILTER_CRYPT       ErrCode( WarningFlag::Yes, ErrCodeArea::Svx, ErrCodeClass::Export, 18)
 
 
-// both codes will be used twice : with ERRCODE_CLASS_READ- and ERRCODE_CLASS_WRITE-bits
+// both codes will be used twice : with ErrCodeClass::Read- and ErrCodeClass::Write-bits
 #define ERRCTX_SVX_LINGU_THESAURUS              1
 #define ERRCTX_SVX_LINGU_SPELLING               2
 #define ERRCTX_SVX_LINGU_HYPHENATION            3
diff --git a/include/vcl/errcode.hxx b/include/vcl/errcode.hxx
index d32412a8753b..274a4a00ef03 100644
--- a/include/vcl/errcode.hxx
+++ b/include/vcl/errcode.hxx
@@ -59,13 +59,23 @@ Warning           ||   ||      |
 #define ERRCODE_DYNAMIC_MASK             (31UL << ERRCODE_DYNAMIC_SHIFT)
 
 enum class ErrCodeArea;
+enum class ErrCodeClass;
+
+enum class WarningFlag { Yes };
 
 class SAL_WARN_UNUSED ErrCode final
 {
 public:
-    explicit constexpr ErrCode(ErrCodeArea nArea, sal_uInt32 value) : m_value(value | (sal_uInt32(nArea) << ERRCODE_AREA_SHIFT)) {}
-    explicit constexpr ErrCode(sal_uInt32 value) : m_value(value) {}
-    constexpr ErrCode() : m_value(0) {}
+    explicit constexpr ErrCode(WarningFlag, ErrCodeArea nArea, ErrCodeClass nClass, sal_uInt16 nCode)
+        : m_value(ERRCODE_WARNING_MASK | (sal_uInt32(nArea) << ERRCODE_AREA_SHIFT) | (sal_uInt32(nClass) << ERRCODE_CLASS_SHIFT) | nCode) {}
+    explicit constexpr ErrCode(ErrCodeArea nArea, ErrCodeClass nClass, sal_uInt16 nCode)
+        : m_value((sal_uInt32(nArea) << ERRCODE_AREA_SHIFT) | (sal_uInt32(nClass) << ERRCODE_CLASS_SHIFT) | nCode) {}
+    explicit constexpr ErrCode(ErrCodeArea nArea, sal_uInt32 nClassAndCode)
+        : m_value((sal_uInt32(nArea) << ERRCODE_AREA_SHIFT) | nClassAndCode) {}
+    explicit constexpr ErrCode(sal_uInt32 nValue)
+        : m_value(nValue) {}
+    constexpr ErrCode()
+        : m_value(0) {}
 
     explicit operator sal_uInt32() const { return m_value; }
     explicit operator bool() const { return m_value != 0; }
@@ -108,12 +118,12 @@ public:
         return ErrCode(m_value & ~ERRCODE_DYNAMIC_MASK);
     }
 
-    ErrCodeArea GetArea() const {
+    constexpr ErrCodeArea GetArea() const {
         return static_cast<ErrCodeArea>((m_value >> ERRCODE_AREA_SHIFT) & 0x01fff);
     }
 
-    sal_uInt32 GetClass() const {
-        return m_value & ERRCODE_CLASS_MASK;
+    constexpr ErrCodeClass GetClass() const {
+        return static_cast<ErrCodeClass>((m_value >> ERRCODE_CLASS_SHIFT) & 0x1f);
     }
 
     constexpr sal_uInt16 GetRest() const {
@@ -160,70 +170,72 @@ enum class ErrCodeArea {
     Sw                  = 56,
 };
 
-#define ERRCODE_CLASS_NONE               ( 0  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_ABORT              ( 1  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_GENERAL            ( 2  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_NOTEXISTS          ( 3  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_ALREADYEXISTS      ( 4  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_ACCESS             ( 5  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_PATH               ( 6  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_LOCKING            ( 7  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_PARAMETER          ( 8  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_SPACE              ( 9  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_NOTSUPPORTED       (10  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_READ               (11  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_WRITE              (12  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_UNKNOWN            (13  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_VERSION            (14  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_FORMAT             (15  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_CREATE             (16  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_IMPORT             (17  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_EXPORT             (18  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_SO                 (20  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_SBX                (21  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_RUNTIME            (22  << ERRCODE_CLASS_SHIFT)
-#define ERRCODE_CLASS_COMPILER           (23  << ERRCODE_CLASS_SHIFT)
+enum class ErrCodeClass {
+    NONE               =  0,
+    Abort              =  1,
+    General            =  2,
+    NotExists          =  3,
+    AlreadyExists      =  4,
+    Access             =  5,
+    Path               =  6,
+    Locking            =  7,
+    Parameter          =  8,
+    Space              =  9,
+    NotSupported       = 10,
+    Read               = 11,
+    Write              = 12,
+    Unknown            = 13,
+    Version            = 14,
+    Format             = 15,
+    Create             = 16,
+    Import             = 17,
+    Export             = 18,
+    So                 = 20,
+    Sbx                = 21,
+    Runtime            = 22,
+    Compiler           = 23
+};
 
 #define ERRCODE_NONE                     ErrCode(0)
 
-#define ERRCODE_IO_MISPLACEDCHAR         ErrCode( ErrCodeArea::Io, 1UL  | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_NOTEXISTS             ErrCode( ErrCodeArea::Io, 2UL  | ERRCODE_CLASS_NOTEXISTS )
-#define ERRCODE_IO_ALREADYEXISTS         ErrCode( ErrCodeArea::Io, 3UL  | ERRCODE_CLASS_ALREADYEXISTS )
-#define ERRCODE_IO_NOTADIRECTORY         ErrCode( ErrCodeArea::Io, 4UL  | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_NOTAFILE              ErrCode( ErrCodeArea::Io, 5UL  | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_INVALIDDEVICE         ErrCode( ErrCodeArea::Io, 6UL  | ERRCODE_CLASS_PATH )
-#define ERRCODE_IO_ACCESSDENIED          ErrCode( ErrCodeArea::Io, 7UL  | ERRCODE_CLASS_ACCESS )
-#define ERRCODE_IO_LOCKVIOLATION         ErrCode( ErrCodeArea::Io, 8UL  | ERRCODE_CLASS_LOCKING )
-#define ERRCODE_IO_OUTOFSPACE            ErrCode( ErrCodeArea::Io, 9UL  | ERRCODE_CLASS_SPACE )
-#define ERRCODE_IO_ISWILDCARD            ErrCode( ErrCodeArea::Io, 11UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_NOTSUPPORTED          ErrCode( ErrCodeArea::Io, 12UL | ERRCODE_CLASS_NOTSUPPORTED )
-#define ERRCODE_IO_GENERAL               ErrCode( ErrCodeArea::Io, 13UL | ERRCODE_CLASS_GENERAL )
-#define ERRCODE_IO_TOOMANYOPENFILES      ErrCode( ErrCodeArea::Io, 14UL | ERRCODE_CLASS_SPACE )
-#define ERRCODE_IO_CANTREAD              ErrCode( ErrCodeArea::Io, 15UL | ERRCODE_CLASS_READ )
-#define ERRCODE_IO_CANTWRITE             ErrCode( ErrCodeArea::Io, 16UL | ERRCODE_CLASS_WRITE )
-#define ERRCODE_IO_OUTOFMEMORY           ErrCode( ErrCodeArea::Io, 17UL | ERRCODE_CLASS_SPACE )
-#define ERRCODE_IO_CANTSEEK              ErrCode( ErrCodeArea::Io, 18UL | ERRCODE_CLASS_GENERAL )
-#define ERRCODE_IO_CANTTELL              ErrCode( ErrCodeArea::Io, 19UL | ERRCODE_CLASS_GENERAL )
-#define ERRCODE_IO_WRONGVERSION          ErrCode( ErrCodeArea::Io, 20UL | ERRCODE_CLASS_VERSION )
-#define ERRCODE_IO_WRONGFORMAT           ErrCode( ErrCodeArea::Io, 21UL | ERRCODE_CLASS_FORMAT )
-#define ERRCODE_IO_INVALIDCHAR           ErrCode( ErrCodeArea::Io, 22UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_UNKNOWN               ErrCode( ErrCodeArea::Io, 23UL | ERRCODE_CLASS_UNKNOWN )
-#define ERRCODE_IO_INVALIDACCESS         ErrCode( ErrCodeArea::Io, 24UL | ERRCODE_CLASS_ACCESS )
-#define ERRCODE_IO_CANTCREATE            ErrCode( ErrCodeArea::Io, 25UL | ERRCODE_CLASS_CREATE )
-#define ERRCODE_IO_INVALIDPARAMETER      ErrCode( ErrCodeArea::Io, 26UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_ABORT                 ErrCode( ErrCodeArea::Io, 27UL | ERRCODE_CLASS_ABORT )
-#define ERRCODE_IO_NOTEXISTSPATH         ErrCode( ErrCodeArea::Io, 28UL | ERRCODE_CLASS_NOTEXISTS )
-#define ERRCODE_IO_PENDING               ErrCode( ErrCodeArea::Io, 29UL | ERRCODE_CLASS_NOTEXISTS )
-#define ERRCODE_IO_RECURSIVE             ErrCode( ErrCodeArea::Io, 30UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_NAMETOOLONG           ErrCode( ErrCodeArea::Io, 31UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_INVALIDLENGTH         ErrCode( ErrCodeArea::Io, 32UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_CURRENTDIR            ErrCode( ErrCodeArea::Io, 33UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_NOTSAMEDEVICE         ErrCode( ErrCodeArea::Io, 34UL | ERRCODE_CLASS_PARAMETER )
-#define ERRCODE_IO_DEVICENOTREADY        ErrCode( ErrCodeArea::Io, 35UL | ERRCODE_CLASS_READ )
-#define ERRCODE_IO_BADCRC                ErrCode( ErrCodeArea::Io, 36UL | ERRCODE_CLASS_READ )
-#define ERRCODE_IO_WRITEPROTECTED        ErrCode( ErrCodeArea::Io, 37UL | ERRCODE_CLASS_ACCESS )
-#define ERRCODE_IO_BROKENPACKAGE         ErrCode( ErrCodeArea::Io, 38UL | ERRCODE_CLASS_FORMAT )
-#define ERRCODE_IO_NOTSTORABLEINBINARYFORMAT ErrCode( ErrCodeArea::Io, 39UL | ERRCODE_CLASS_FORMAT )
+#define ERRCODE_IO_MISPLACEDCHAR         ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 1 )
+#define ERRCODE_IO_NOTEXISTS             ErrCode( ErrCodeArea::Io, ErrCodeClass::NotExists, 2 )
+#define ERRCODE_IO_ALREADYEXISTS         ErrCode( ErrCodeArea::Io, ErrCodeClass::AlreadyExists, 3 )
+#define ERRCODE_IO_NOTADIRECTORY         ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 4 )
+#define ERRCODE_IO_NOTAFILE              ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 5 )
+#define ERRCODE_IO_INVALIDDEVICE         ErrCode( ErrCodeArea::Io, ErrCodeClass::Path, 6 )
+#define ERRCODE_IO_ACCESSDENIED          ErrCode( ErrCodeArea::Io, ErrCodeClass::Access, 7 )
+#define ERRCODE_IO_LOCKVIOLATION         ErrCode( ErrCodeArea::Io, ErrCodeClass::Locking, 8 )
+#define ERRCODE_IO_OUTOFSPACE            ErrCode( ErrCodeArea::Io, ErrCodeClass::Space, 9 )
+#define ERRCODE_IO_ISWILDCARD            ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 11 )
+#define ERRCODE_IO_NOTSUPPORTED          ErrCode( ErrCodeArea::Io, ErrCodeClass::NotSupported, 12 )
+#define ERRCODE_IO_GENERAL               ErrCode( ErrCodeArea::Io, ErrCodeClass::General, 13 )
+#define ERRCODE_IO_TOOMANYOPENFILES      ErrCode( ErrCodeArea::Io, ErrCodeClass::Space, 14 )
+#define ERRCODE_IO_CANTREAD              ErrCode( ErrCodeArea::Io, ErrCodeClass::Read, 15 )
+#define ERRCODE_IO_CANTWRITE             ErrCode( ErrCodeArea::Io, ErrCodeClass::Write, 16 )
+#define ERRCODE_IO_OUTOFMEMORY           ErrCode( ErrCodeArea::Io, ErrCodeClass::Space, 17 )
+#define ERRCODE_IO_CANTSEEK              ErrCode( ErrCodeArea::Io, ErrCodeClass::General, 18 )
+#define ERRCODE_IO_CANTTELL              ErrCode( ErrCodeArea::Io, ErrCodeClass::General, 19 )
+#define ERRCODE_IO_WRONGVERSION          ErrCode( ErrCodeArea::Io, ErrCodeClass::Version, 20 )
+#define ERRCODE_IO_WRONGFORMAT           ErrCode( ErrCodeArea::Io, ErrCodeClass::Format, 21 )
+#define ERRCODE_IO_INVALIDCHAR           ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 22 )
+#define ERRCODE_IO_UNKNOWN               ErrCode( ErrCodeArea::Io, ErrCodeClass::Unknown, 23 )
+#define ERRCODE_IO_INVALIDACCESS         ErrCode( ErrCodeArea::Io, ErrCodeClass::Access, 24 )
+#define ERRCODE_IO_CANTCREATE            ErrCode( ErrCodeArea::Io, ErrCodeClass::Create, 25 )
+#define ERRCODE_IO_INVALIDPARAMETER      ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 26 )
+#define ERRCODE_IO_ABORT                 ErrCode( ErrCodeArea::Io, ErrCodeClass::Abort, 27 )
+#define ERRCODE_IO_NOTEXISTSPATH         ErrCode( ErrCodeArea::Io, ErrCodeClass::NotExists, 28 )
+#define ERRCODE_IO_PENDING               ErrCode( ErrCodeArea::Io, ErrCodeClass::NotExists, 29 )
+#define ERRCODE_IO_RECURSIVE             ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 30 )
+#define ERRCODE_IO_NAMETOOLONG           ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 31 )
+#define ERRCODE_IO_INVALIDLENGTH         ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 32 )
+#define ERRCODE_IO_CURRENTDIR            ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 33 )
+#define ERRCODE_IO_NOTSAMEDEVICE         ErrCode( ErrCodeArea::Io, ErrCodeClass::Parameter, 34 )
+#define ERRCODE_IO_DEVICENOTREADY        ErrCode( ErrCodeArea::Io, ErrCodeClass::Read, 35 )
+#define ERRCODE_IO_BADCRC                ErrCode( ErrCodeArea::Io, ErrCodeClass::Read, 36 )
+#define ERRCODE_IO_WRITEPROTECTED        ErrCode( ErrCodeArea::Io, ErrCodeClass::Access, 37 )
+#define ERRCODE_IO_BROKENPACKAGE         ErrCode( ErrCodeArea::Io, ErrCodeClass::Format, 38 )
+#define ERRCODE_IO_NOTSTORABLEINBINARYFORMAT ErrCode( ErrCodeArea::Io, ErrCodeClass::Format, 39 )
 
 // StreamErrorCodes
 
@@ -257,12 +269,12 @@ enum class ErrCodeArea {
 
 #define ERRCODE_ABORT                    ERRCODE_IO_ABORT
 
-#define ERRCODE_INET_NAME_RESOLVE        ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_READ | 1)
-#define ERRCODE_INET_CONNECT             ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_READ | 2)
-#define ERRCODE_INET_READ                ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_READ | 3)
-#define ERRCODE_INET_WRITE               ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_WRITE| 4)
-#define ERRCODE_INET_GENERAL             ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_WRITE| 5)
-#define ERRCODE_INET_OFFLINE             ErrCode(ErrCodeArea::Inet, ERRCODE_CLASS_READ | 6)
+#define ERRCODE_INET_NAME_RESOLVE        ErrCode(ErrCodeArea::Inet, ErrCodeClass::Read,  1)
+#define ERRCODE_INET_CONNECT             ErrCode(ErrCodeArea::Inet, ErrCodeClass::Read,  2)
+#define ERRCODE_INET_READ                ErrCode(ErrCodeArea::Inet, ErrCodeClass::Read,  3)
+#define ERRCODE_INET_WRITE               ErrCode(ErrCodeArea::Inet, ErrCodeClass::Write, 4)
+#define ERRCODE_INET_GENERAL             ErrCode(ErrCodeArea::Inet, ErrCodeClass::Write, 5)
+#define ERRCODE_INET_OFFLINE             ErrCode(ErrCodeArea::Inet, ErrCodeClass::Read,  6)
 
 #endif
 
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 7f15760ee786..133a16486834 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -36,12 +36,12 @@ class SvStream;
 struct WmfExternal;
 struct ConvertData;
 
-#define ERRCODE_GRFILTER_OPENERROR    ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 1)
-#define ERRCODE_GRFILTER_IOERROR      ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 2)
-#define ERRCODE_GRFILTER_FORMATERROR  ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 3)
-#define ERRCODE_GRFILTER_VERSIONERROR ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 4)
-#define ERRCODE_GRFILTER_FILTERERROR  ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 5)
-#define ERRCODE_GRFILTER_TOOBIG       ErrCode(ErrCodeArea::Vcl, ERRCODE_CLASS_GENERAL | 7)
+#define ERRCODE_GRFILTER_OPENERROR    ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 1)
+#define ERRCODE_GRFILTER_IOERROR      ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 2)
+#define ERRCODE_GRFILTER_FORMATERROR  ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 3)
+#define ERRCODE_GRFILTER_VERSIONERROR ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 4)
+#define ERRCODE_GRFILTER_FILTERERROR  ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 5)
+#define ERRCODE_GRFILTER_TOOBIG       ErrCode(ErrCodeArea::Vcl, ErrCodeClass::General, 7)
 
 #define GRFILTER_OUTHINT_GREY       1
 
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
 
diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx
index be444100f80d..a337c3018917 100644
--- a/sd/inc/sderror.hxx
+++ b/sd/inc/sderror.hxx
@@ -23,11 +23,11 @@
 #include <vcl/errcode.hxx>
 
 // Import errors
-#define ERR_FORMAT_ROWCOL               ErrCode(ErrCodeArea::Sd, ERRCODE_CLASS_READ | 1)
-#define ERR_FORMAT_FILE_ROWCOL          ErrCode(ErrCodeArea::Sd, ERRCODE_CLASS_READ | 2)
+#define ERR_FORMAT_ROWCOL               ErrCode(ErrCodeArea::Sd, ErrCodeClass::Read, 1)
+#define ERR_FORMAT_FILE_ROWCOL          ErrCode(ErrCodeArea::Sd, ErrCodeClass::Read, 2)
 
 // Warnings
-#define WARN_FORMAT_FILE_ROWCOL         ErrCode(ErrCodeArea::Sd, ERRCODE_WARNING_MASK | ERRCODE_CLASS_READ | 100)
+#define WARN_FORMAT_FILE_ROWCOL         ErrCode(WarningFlag::Yes, ErrCodeArea::Sd, ErrCodeClass::Read, 100)
 
 #endif
 
diff --git a/svtools/inc/errtxt.hrc b/svtools/inc/errtxt.hrc
index c80892692d02..b0c82246c807 100644
--- a/svtools/inc/errtxt.hrc
+++ b/svtools/inc/errtxt.hrc
@@ -24,7 +24,6 @@
 #include <svtools/soerr.hxx>
 
 #define NC_(Context, String) (Context "\004" u8##String)
-#define S_MAX   0x7fff
 
 const ErrMsgCode RID_ERRCTX[] =
 {
@@ -46,99 +45,104 @@ const ErrMsgCode RID_ERRCTX[] =
     { nullptr, ERRCODE_NONE }
 };
 
+const std::pair<const char*, ErrCodeClass> RID_ERRHDL_CLASS[] =
+{
+    { NC_("RID_ERRHDL", "Abort") , ErrCodeClass::Abort },
+    { NC_("RID_ERRHDL", "Nonexistent object") , ErrCodeClass::NotExists },
+    { NC_("RID_ERRHDL", "Object already exists") , ErrCodeClass::AlreadyExists },
+    { NC_("RID_ERRHDL", "Object not accessible") , ErrCodeClass::Access },
+    { NC_("RID_ERRHDL", "Inadmissible path") , ErrCodeClass::Path },
+    { NC_("RID_ERRHDL", "Locking problem") , ErrCodeClass::Locking },
+    { NC_("RID_ERRHDL", "Wrong parameter") , ErrCodeClass::Parameter },
+    { NC_("RID_ERRHDL", "Resource exhausted") , ErrCodeClass::Space },
+    { NC_("RID_ERRHDL", "Action not supported") , ErrCodeClass::NotSupported },
+    { NC_("RID_ERRHDL", "Read Error") , ErrCodeClass::Read },
+    { NC_("RID_ERRHDL", "Write Error") , ErrCodeClass::Write },
+    { NC_("RID_ERRHDL", "unknown") , ErrCodeClass::Unknown },
+    { NC_("RID_ERRHDL", "Version Incompatibility") , ErrCodeClass::Version },
+    { NC_("RID_ERRHDL", "General Error") , ErrCodeClass::General },
+    { NC_("RID_ERRHDL", "Incorrect format") , ErrCodeClass::Format },
+    { NC_("RID_ERRHDL", "Error creating object") , ErrCodeClass::Create },
+    { NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCodeClass::Sbx },
+    { NC_("RID_ERRHDL", "BASIC runtime error") , ErrCodeClass::Runtime },
+    { NC_("RID_ERRHDL", "BASIC syntax error") , ErrCodeClass::Compiler },
+    { nullptr, ErrCodeClass::NONE }
+};
+
 const ErrMsgCode RID_ERRHDL[] =
 {
-    { NC_("RID_ERRHDL", "Abort") , ErrCode(ERRCODE_CLASS_ABORT) },
-    { NC_("RID_ERRHDL", "Nonexistent object") , ErrCode(ERRCODE_CLASS_NOTEXISTS) },
-    { NC_("RID_ERRHDL", "Object already exists") , ErrCode(ERRCODE_CLASS_ALREADYEXISTS) },
-    { NC_("RID_ERRHDL", "Object not accessible") , ErrCode(ERRCODE_CLASS_ACCESS) },
-    { NC_("RID_ERRHDL", "Inadmissible path") , ErrCode(ERRCODE_CLASS_PATH) },
-    { NC_("RID_ERRHDL", "Locking problem") , ErrCode(ERRCODE_CLASS_LOCKING) },
-    { NC_("RID_ERRHDL", "Wrong parameter") , ErrCode(ERRCODE_CLASS_PARAMETER) },
-    { NC_("RID_ERRHDL", "Resource exhausted") , ErrCode(ERRCODE_CLASS_SPACE) },
-    { NC_("RID_ERRHDL", "Action not supported") , ErrCode(ERRCODE_CLASS_NOTSUPPORTED) },
-    { NC_("RID_ERRHDL", "Read Error") , ErrCode(ERRCODE_CLASS_READ) },
-    { NC_("RID_ERRHDL", "Write Error") , ErrCode(ERRCODE_CLASS_WRITE) },
-    { NC_("RID_ERRHDL", "unknown") , ErrCode(ERRCODE_CLASS_UNKNOWN) },
-    { NC_("RID_ERRHDL", "Version Incompatibility") , ErrCode(ERRCODE_CLASS_VERSION) },
-    { NC_("RID_ERRHDL", "General Error") , ErrCode(ERRCODE_CLASS_GENERAL) },
-    { NC_("RID_ERRHDL", "Incorrect format") , ErrCode(ERRCODE_CLASS_FORMAT) },
-    { NC_("RID_ERRHDL", "Error creating object") , ErrCode(ERRCODE_CLASS_CREATE) },
-    { NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCode(ERRCODE_CLASS_SBX) },
-    { NC_("RID_ERRHDL", "BASIC runtime error") , ErrCode(ERRCODE_CLASS_RUNTIME) },
-    { NC_("RID_ERRHDL", "BASIC syntax error") , ErrCode(ERRCODE_CLASS_COMPILER) },
     { NC_("RID_ERRHDL", "General Error") , ErrCode(1) },
-    { NC_("RID_ERRHDL", "General input/output error.") , ErrCode(ERRCODE_IO_GENERAL) },
-    { NC_("RID_ERRHDL", "Invalid file name.") , ErrCode(ERRCODE_IO_MISPLACEDCHAR) },
-    { NC_("RID_ERRHDL", "Nonexistent file.") , ErrCode(ERRCODE_IO_NOTEXISTS) },
-    { NC_("RID_ERRHDL", "File already exists.") , ErrCode(ERRCODE_IO_ALREADYEXISTS) },
-    { NC_("RID_ERRHDL", "The object is not a directory.") , ErrCode(ERRCODE_IO_NOTADIRECTORY) },
-    { NC_("RID_ERRHDL", "The object is not a file.") , ErrCode(ERRCODE_IO_NOTAFILE) },
-    { NC_("RID_ERRHDL", "The specified device is invalid.") , ErrCode(ERRCODE_IO_INVALIDDEVICE) },
-    { NC_("RID_ERRHDL", "The object cannot be accessed\ndue to insufficient user rights.") , ErrCode(ERRCODE_IO_ACCESSDENIED) },
-    { NC_("RID_ERRHDL", "Sharing violation while accessing the object.") , ErrCode(ERRCODE_IO_LOCKVIOLATION) },
-    { NC_("RID_ERRHDL", "No more space on device.") , ErrCode(ERRCODE_IO_OUTOFSPACE) },
-    { NC_("RID_ERRHDL", "This operation cannot be run on\nfiles containing wildcards.") , ErrCode(ERRCODE_IO_ISWILDCARD) },
-    { NC_("RID_ERRHDL", "This operation is not supported on this operating system.") , ErrCode(ERRCODE_IO_NOTSUPPORTED) },
-    { NC_("RID_ERRHDL", "There are too many files open.") , ErrCode(ERRCODE_IO_TOOMANYOPENFILES) },
-    { NC_("RID_ERRHDL", "Data could not be read from the file.") , ErrCode(ERRCODE_IO_CANTREAD) },
-    { NC_("RID_ERRHDL", "The file could not be written.") , ErrCode(ERRCODE_IO_CANTWRITE) },
-    { NC_("RID_ERRHDL", "The operation could not be run due to insufficient memory.") , ErrCode(ERRCODE_IO_OUTOFMEMORY) },
-    { NC_("RID_ERRHDL", "The seek operation could not be run.") , ErrCode(ERRCODE_IO_CANTSEEK) },
-    { NC_("RID_ERRHDL", "The tell operation could not be run.") , ErrCode(ERRCODE_IO_CANTTELL) },
-    { NC_("RID_ERRHDL", "Incorrect file version.") , ErrCode(ERRCODE_IO_WRONGVERSION) },
-    { NC_("RID_ERRHDL", "Incorrect file format.") , ErrCode(ERRCODE_IO_WRONGFORMAT) },
-    { NC_("RID_ERRHDL", "The file name contains invalid characters.") , ErrCode(ERRCODE_IO_INVALIDCHAR) },
-    { NC_("RID_ERRHDL", "An unknown I/O error has occurred.") , ErrCode(ERRCODE_IO_UNKNOWN) },
-    { NC_("RID_ERRHDL", "An invalid attempt was made to access the file.") , ErrCode(ERRCODE_IO_INVALIDACCESS) },
-    { NC_("RID_ERRHDL", "The file could not be created.") , ErrCode(ERRCODE_IO_CANTCREATE) },
-    { NC_("RID_ERRHDL", "The operation was started under an invalid parameter.") , ErrCode(ERRCODE_IO_INVALIDPARAMETER) },
-    { NC_("RID_ERRHDL", "The operation on the file was aborted.") , ErrCode(ERRCODE_IO_ABORT) },
-    { NC_("RID_ERRHDL", "Path to the file does not exist.") , ErrCode(ERRCODE_IO_NOTEXISTSPATH) },
-    { NC_("RID_ERRHDL", "An object cannot be copied into itself.") , ErrCode(ERRCODE_IO_RECURSIVE) },
-    { NC_("RID_ERRHDL", "The specified template could not be found.") , ErrCode(ERRCODE_SFX_TEMPLATENOTFOUND) },
-    { NC_("RID_ERRHDL", "The file cannot be used as template.") , ErrCode(ERRCODE_SFX_NOTATEMPLATE) },
-    { NC_("RID_ERRHDL", "This document has already been opened for editing.") , ErrCode(ERRCODE_SFX_ALREADYOPEN) },
-    { NC_("RID_ERRHDL", "The wrong password has been entered.") , ErrCode(ERRCODE_SFX_WRONGPASSWORD) },
-    { NC_("RID_ERRHDL", "Error reading file.") , ErrCode(ERRCODE_SFX_DOLOADFAILED) },
-    { NC_("RID_ERRHDL", "The document was opened as read-only.") , ErrCode(ERRCODE_SFX_DOCUMENTREADONLY) },
-    { NC_("RID_ERRHDL", "General OLE Error.") , ErrCode(ERRCODE_SFX_OLEGENERAL) },
-    { NC_("RID_ERRHDL", "The host name $(ARG1) could not be resolved.") , ErrCode(ERRCODE_INET_NAME_RESOLVE) },
-    { NC_("RID_ERRHDL", "Could not establish Internet connection to $(ARG1).") , ErrCode(ERRCODE_INET_CONNECT) },
-    { NC_("RID_ERRHDL", "Error reading data from the Internet.\nServer error message: $(ARG1).") , ErrCode(ERRCODE_INET_READ) },
-    { NC_("RID_ERRHDL", "Error transferring data to the Internet.\nServer error message: $(ARG1).") , ErrCode(ERRCODE_INET_WRITE) },
-    { NC_("RID_ERRHDL", "General Internet error has occurred.") , ErrCode(ERRCODE_INET_GENERAL) },
-    { NC_("RID_ERRHDL", "The requested Internet data is not available in the cache and cannot be transmitted as the Online mode has not be activated.") , ErrCode(ERRCODE_INET_OFFLINE) },
-    { NC_("RID_ERRHDL", "The contents could not be created.") , ErrCode(ERRCODE_SFX_CANTCREATECONTENT) },
-    { NC_("RID_ERRHDL", "The file name is too long for the target file system.") , ErrCode(ERRCODE_IO_NAMETOOLONG) },
-    { NC_("RID_ERRHDL", "The input syntax is invalid.") , ErrCode(ERRCODE_SFX_INVALIDSYNTAX) },
-    { NC_("RID_ERRHDL", "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."), ErrCode(ERRCODE_IO_NOTSTORABLEINBINARYFORMAT) },
-    { NC_("RID_ERRHDL", "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."), ErrCode(ERRCODE_SFX_NOMOREDOCUMENTSALLOWED) },
-    { NC_("RID_ERRHDL", "Could not create backup copy.") , ErrCode(ERRCODE_SFX_CANTCREATEBACKUP) },
-    { NC_("RID_ERRHDL", "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."), ErrCode(ERRCODE_SFX_MACROS_SUPPORT_DISABLED) },
-    { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in %PRODUCTNAME - Preferences - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ErrCode(ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC) },
-    { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ErrCode(ERRCODE_SFX_DOCUMENT_MACRO_DISABLED) },
-    { NC_("RID_ERRHDL", "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n ") , ErrCode(ERRCODE_SFX_INCOMPLETE_ENCRYPTION) },
-    { NC_("RID_ERRHDL", "Invalid data length.") , ErrCode(ERRCODE_IO_INVALIDLENGTH) },
-    { NC_("RID_ERRHDL", "Function not possible: path contains current directory.") , ErrCode(ERRCODE_IO_CURRENTDIR) },
-    { NC_("RID_ERRHDL", "Function not possible: device (drive) not identical.") , ErrCode(ERRCODE_IO_NOTSAMEDEVICE) },
-    { NC_("RID_ERRHDL", "Device (drive) not ready.") , ErrCode(ERRCODE_IO_DEVICENOTREADY) },
-    { NC_("RID_ERRHDL", "Wrong checksum.") , ErrCode(ERRCODE_IO_BADCRC) },
-    { NC_("RID_ERRHDL", "Function not possible: write protected.") , ErrCode(ERRCODE_IO_WRITEPROTECTED) },
-    { NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ErrCode(ERRCODE_SFX_SHARED_NOPASSWORDCHANGE) },
+    { NC_("RID_ERRHDL", "General input/output error.") , ERRCODE_IO_GENERAL },
+    { NC_("RID_ERRHDL", "Invalid file name.") , ERRCODE_IO_MISPLACEDCHAR },
+    { NC_("RID_ERRHDL", "Nonexistent file.") , ERRCODE_IO_NOTEXISTS },
+    { NC_("RID_ERRHDL", "File already exists.") , ERRCODE_IO_ALREADYEXISTS },
+    { NC_("RID_ERRHDL", "The object is not a directory.") , ERRCODE_IO_NOTADIRECTORY },
+    { NC_("RID_ERRHDL", "The object is not a file.") , ERRCODE_IO_NOTAFILE },
+    { NC_("RID_ERRHDL", "The specified device is invalid.") , ERRCODE_IO_INVALIDDEVICE },
+    { NC_("RID_ERRHDL", "The object cannot be accessed\ndue to insufficient user rights.") , ERRCODE_IO_ACCESSDENIED },
+    { NC_("RID_ERRHDL", "Sharing violation while accessing the object.") , ERRCODE_IO_LOCKVIOLATION },
+    { NC_("RID_ERRHDL", "No more space on device.") , ERRCODE_IO_OUTOFSPACE },
+    { NC_("RID_ERRHDL", "This operation cannot be run on\nfiles containing wildcards.") , ERRCODE_IO_ISWILDCARD },
+    { NC_("RID_ERRHDL", "This operation is not supported on this operating system.") , ERRCODE_IO_NOTSUPPORTED },
+    { NC_("RID_ERRHDL", "There are too many files open.") , ERRCODE_IO_TOOMANYOPENFILES },
+    { NC_("RID_ERRHDL", "Data could not be read from the file.") , ERRCODE_IO_CANTREAD },
+    { NC_("RID_ERRHDL", "The file could not be written.") , ERRCODE_IO_CANTWRITE },
+    { NC_("RID_ERRHDL", "The operation could not be run due to insufficient memory.") , ERRCODE_IO_OUTOFMEMORY },
+    { NC_("RID_ERRHDL", "The seek operation could not be run.") , ERRCODE_IO_CANTSEEK },
+    { NC_("RID_ERRHDL", "The tell operation could not be run.") , ERRCODE_IO_CANTTELL },
+    { NC_("RID_ERRHDL", "Incorrect file version.") , ERRCODE_IO_WRONGVERSION },
+    { NC_("RID_ERRHDL", "Incorrect file format.") , ERRCODE_IO_WRONGFORMAT },
+    { NC_("RID_ERRHDL", "The file name contains invalid characters.") , ERRCODE_IO_INVALIDCHAR },
+    { NC_("RID_ERRHDL", "An unknown I/O error has occurred.") , ERRCODE_IO_UNKNOWN },
+    { NC_("RID_ERRHDL", "An invalid attempt was made to access the file.") , ERRCODE_IO_INVALIDACCESS },
+    { NC_("RID_ERRHDL", "The file could not be created.") , ERRCODE_IO_CANTCREATE },
+    { NC_("RID_ERRHDL", "The operation was started under an invalid parameter.") , ERRCODE_IO_INVALIDPARAMETER },
+    { NC_("RID_ERRHDL", "The operation on the file was aborted.") , ERRCODE_IO_ABORT },
+    { NC_("RID_ERRHDL", "Path to the file does not exist.") , ERRCODE_IO_NOTEXISTSPATH },
+    { NC_("RID_ERRHDL", "An object cannot be copied into itself.") , ERRCODE_IO_RECURSIVE },
+    { NC_("RID_ERRHDL", "The specified template could not be found.") , ERRCODE_SFX_TEMPLATENOTFOUND },
+    { NC_("RID_ERRHDL", "The file cannot be used as template.") , ERRCODE_SFX_NOTATEMPLATE },
+    { NC_("RID_ERRHDL", "This document has already been opened for editing.") , ERRCODE_SFX_ALREADYOPEN },
+    { NC_("RID_ERRHDL", "The wrong password has been entered.") , ERRCODE_SFX_WRONGPASSWORD },
+    { NC_("RID_ERRHDL", "Error reading file.") , ERRCODE_SFX_DOLOADFAILED },
+    { NC_("RID_ERRHDL", "The document was opened as read-only.") , ERRCODE_SFX_DOCUMENTREADONLY },
+    { NC_("RID_ERRHDL", "General OLE Error.") , ERRCODE_SFX_OLEGENERAL },
+    { NC_("RID_ERRHDL", "The host name $(ARG1) could not be resolved.") , ERRCODE_INET_NAME_RESOLVE },
+    { NC_("RID_ERRHDL", "Could not establish Internet connection to $(ARG1).") , ERRCODE_INET_CONNECT },
+    { NC_("RID_ERRHDL", "Error reading data from the Internet.\nServer error message: $(ARG1).") , ERRCODE_INET_READ },
+    { NC_("RID_ERRHDL", "Error transferring data to the Internet.\nServer error message: $(ARG1).") , ERRCODE_INET_WRITE },
+    { NC_("RID_ERRHDL", "General Internet error has occurred.") , ERRCODE_INET_GENERAL },
+    { NC_("RID_ERRHDL", "The requested Internet data is not available in the cache and cannot be transmitted as the Online mode has not be activated.") , ERRCODE_INET_OFFLINE },
+    { NC_("RID_ERRHDL", "The contents could not be created.") , ERRCODE_SFX_CANTCREATECONTENT },
+    { NC_("RID_ERRHDL", "The file name is too long for the target file system.") , ERRCODE_IO_NAMETOOLONG },
+    { NC_("RID_ERRHDL", "The input syntax is invalid.") , ERRCODE_SFX_INVALIDSYNTAX },
+    { NC_("RID_ERRHDL", "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."), ERRCODE_IO_NOTSTORABLEINBINARYFORMAT },
+    { NC_("RID_ERRHDL", "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."), ERRCODE_SFX_NOMOREDOCUMENTSALLOWED },
+    { NC_("RID_ERRHDL", "Could not create backup copy.") , ERRCODE_SFX_CANTCREATEBACKUP },
+    { NC_("RID_ERRHDL", "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."), ERRCODE_SFX_MACROS_SUPPORT_DISABLED },
+    { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in %PRODUCTNAME - Preferences - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC },
+    { NC_("RID_ERRHDL", "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available.") , ERRCODE_SFX_DOCUMENT_MACRO_DISABLED },
+    { NC_("RID_ERRHDL", "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n ") , ERRCODE_SFX_INCOMPLETE_ENCRYPTION },
+    { NC_("RID_ERRHDL", "Invalid data length.") , ERRCODE_IO_INVALIDLENGTH },
+    { NC_("RID_ERRHDL", "Function not possible: path contains current directory.") , ERRCODE_IO_CURRENTDIR },
+    { NC_("RID_ERRHDL", "Function not possible: device (drive) not identical.") , ERRCODE_IO_NOTSAMEDEVICE },
+    { NC_("RID_ERRHDL", "Device (drive) not ready.") , ERRCODE_IO_DEVICENOTREADY },
+    { NC_("RID_ERRHDL", "Wrong checksum.") , ERRCODE_IO_BADCRC },

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list