summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-08-27 13:07:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-27 21:24:16 +0200
commitae8e1ad2e322cfa9522f793edc961203e28c1f22 (patch)
treee04c03d53101a78810511f509c81bc1cb186795b /include/svtools
parentd96b243c5d363f66e574fe68879e59244c338c22 (diff)
convert code-class in ErrCode to scoped enum
Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7 Reviewed-on: https://gerrit.libreoffice.org/41601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/ehdl.hxx2
-rw-r--r--include/svtools/sfxecode.hxx38
-rw-r--r--include/svtools/soerr.hxx4
3 files changed, 22 insertions, 22 deletions
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)