summaryrefslogtreecommitdiff
path: root/svtools/inc/errtxt.hrc
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 /svtools/inc/errtxt.hrc
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 'svtools/inc/errtxt.hrc')
-rw-r--r--svtools/inc/errtxt.hrc168
1 files changed, 86 insertions, 82 deletions
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 },
+ { NC_("RID_ERRHDL", "Function not possible: write protected.") , ERRCODE_IO_WRITEPROTECTED },
+ { NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE },
{ nullptr, ERRCODE_NONE }
};
const ErrMsgCode RID_SO_ERROR_HANDLER[] =
{
{ NC_("RID_ERRHDL", "General OLE error."),
- ErrCode(sal_uInt32(ERRCODE_SO_GENERALERROR) & S_MAX) },
+ ERRCODE_SO_GENERALERROR },
{ NC_("RID_ERRHDL", "The action cannot be executed in the object's current state."),
- ErrCode(sal_uInt32(ERRCODE_SO_CANNOT_DOVERB_NOW) & S_MAX) },
+ ERRCODE_SO_CANNOT_DOVERB_NOW },
{ NC_("RID_ERRHDL", "The object does not support any actions."),
- ErrCode(sal_uInt32(ERRCODE_SO_NOVERBS) & S_MAX) },
+ ERRCODE_SO_NOVERBS },
{ NC_("RID_ERRHDL", "Object does not support this action."),
- ErrCode(sal_uInt32(ERRCODE_SO_NOTIMPL) & S_MAX) },
+ ERRCODE_SO_NOTIMPL },
{ nullptr, ERRCODE_NONE }
};