1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <svtools/sfxecode.hxx>
23 #include <svtools/soerr.hxx>
25 #define NC_(Context, String) TranslateId(Context, u8##String)
27 const ErrMsgCode RID_ERRCTX[] =
29 { NC_("RID_ERRCTX", "Error") , ErrCode(ERRCTX_ERROR) },
30 { NC_("RID_ERRCTX", "Warning") , ErrCode(ERRCTX_WARNING) },
31 { NC_("RID_ERRCTX", "$(ERR) loading the template $(ARG1)") , ErrCode(ERRCTX_SFX_LOADTEMPLATE) },
32 { NC_("RID_ERRCTX", "$(ERR) saving the document $(ARG1)"), ErrCode(ERRCTX_SFX_SAVEDOC) },
33 { NC_("RID_ERRCTX", "$(ERR) saving the document $(ARG1)"), ErrCode(ERRCTX_SFX_SAVEASDOC) },
34 { NC_("RID_ERRCTX", "$(ERR) displaying doc. information for document $(ARG1)") , ErrCode(ERRCTX_SFX_DOCINFO) },
35 { NC_("RID_ERRCTX", "$(ERR) writing document $(ARG1) as template") , ErrCode(ERRCTX_SFX_DOCTEMPLATE) },
36 { NC_("RID_ERRCTX", "$(ERR) copying or moving document contents") , ErrCode(ERRCTX_SFX_MOVEORCOPYCONTENTS) },
37 { NC_("RID_ERRCTX", "$(ERR) starting the Document Manager") , ErrCode(ERRCTX_SFX_DOCMANAGER) },
38 { NC_("RID_ERRCTX", "$(ERR) loading document $(ARG1)") , ErrCode(ERRCTX_SFX_OPENDOC) },
39 { NC_("RID_ERRCTX", "$(ERR) creating a new document") , ErrCode(ERRCTX_SFX_NEWDOCDIRECT) },
40 { NC_("RID_ERRCTX", "$(ERR) creating a new document") , ErrCode(ERRCTX_SFX_NEWDOC) },
41 { NC_("RID_ERRCTX", "$(ERR) expanding entry") , ErrCode(ERRCTX_SFX_CREATEOBJSH) },
42 { NC_("RID_ERRCTX", "$(ERR) loading BASIC of document $(ARG1)") , ErrCode(ERRCTX_SFX_LOADBASIC) },
43 { NC_("RID_ERRCTX", "$(ERR) searching for an address"), ErrCode(ERRCTX_SFX_SEARCHADDRESS) },
47 const std::pair<TranslateId, ErrCodeClass> RID_ERRHDL_CLASS[] =
49 { NC_("RID_ERRHDL", "Abort") , ErrCodeClass::Abort },
50 { NC_("RID_ERRHDL", "Nonexistent object") , ErrCodeClass::NotExists },
51 { NC_("RID_ERRHDL", "Object already exists") , ErrCodeClass::AlreadyExists },
52 { NC_("RID_ERRHDL", "Object not accessible") , ErrCodeClass::Access },
53 { NC_("RID_ERRHDL", "Inadmissible path") , ErrCodeClass::Path },
54 { NC_("RID_ERRHDL", "Locking problem") , ErrCodeClass::Locking },
55 { NC_("RID_ERRHDL", "Wrong parameter") , ErrCodeClass::Parameter },
56 { NC_("RID_ERRHDL", "Resource exhausted") , ErrCodeClass::Space },
57 { NC_("RID_ERRHDL", "Action not supported") , ErrCodeClass::NotSupported },
58 { NC_("RID_ERRHDL", "Read Error") , ErrCodeClass::Read },
59 { NC_("RID_ERRHDL", "Write Error") , ErrCodeClass::Write },
60 { NC_("RID_ERRHDL", "unknown") , ErrCodeClass::Unknown },
61 { NC_("RID_ERRHDL", "Version Incompatibility") , ErrCodeClass::Version },
62 { NC_("RID_ERRHDL", "General Error") , ErrCodeClass::General },
63 { NC_("RID_ERRHDL", "Incorrect format") , ErrCodeClass::Format },
64 { NC_("RID_ERRHDL", "Error creating object") , ErrCodeClass::Create },
65 { NC_("RID_ERRHDL", "Inadmissible value or data type") , ErrCodeClass::Sbx },
66 { NC_("RID_ERRHDL", "BASIC runtime error") , ErrCodeClass::Runtime },
67 { NC_("RID_ERRHDL", "BASIC syntax error") , ErrCodeClass::Compiler },
68 { {}, ErrCodeClass::NONE }
71 const ErrMsgCode RID_ERRHDL[] =
73 { NC_("RID_ERRHDL", "General Error") , ErrCode(1) },
74 { NC_("RID_ERRHDL", "General input/output error.") , ERRCODE_IO_GENERAL },
75 { NC_("RID_ERRHDL", "Invalid file name.") , ERRCODE_IO_MISPLACEDCHAR },
76 { NC_("RID_ERRHDL", "Nonexistent file.") , ERRCODE_IO_NOTEXISTS },
77 { NC_("RID_ERRHDL", "File already exists.") , ERRCODE_IO_ALREADYEXISTS },
78 { NC_("RID_ERRHDL", "The object is not a directory.") , ERRCODE_IO_NOTADIRECTORY },
79 { NC_("RID_ERRHDL", "The object is not a file.") , ERRCODE_IO_NOTAFILE },
80 { NC_("RID_ERRHDL", "The specified device is invalid.") , ERRCODE_IO_INVALIDDEVICE },
81 { NC_("RID_ERRHDL", "The object cannot be accessed\ndue to insufficient user rights.") , ERRCODE_IO_ACCESSDENIED },
82 { NC_("RID_ERRHDL", "Sharing violation while accessing the object.") , ERRCODE_IO_LOCKVIOLATION },
83 { NC_("RID_ERRHDL", "No more space on device.") , ERRCODE_IO_OUTOFSPACE },
84 { NC_("RID_ERRHDL", "This operation cannot be run on\nfiles containing wildcards.") , ERRCODE_IO_ISWILDCARD },
85 { NC_("RID_ERRHDL", "This operation is not supported on this operating system.") , ERRCODE_IO_NOTSUPPORTED },
86 { NC_("RID_ERRHDL", "There are too many files open.") , ERRCODE_IO_TOOMANYOPENFILES },
87 { NC_("RID_ERRHDL", "Data could not be read from the file.") , ERRCODE_IO_CANTREAD },
88 { NC_("RID_ERRHDL", "The file could not be written.") , ERRCODE_IO_CANTWRITE },
89 { NC_("RID_ERRHDL", "The operation could not be run due to insufficient memory.") , ERRCODE_IO_OUTOFMEMORY },
90 { NC_("RID_ERRHDL", "The seek operation could not be run.") , ERRCODE_IO_CANTSEEK },
91 { NC_("RID_ERRHDL", "The tell operation could not be run.") , ERRCODE_IO_CANTTELL },
92 { NC_("RID_ERRHDL", "Incorrect file version.") , ERRCODE_IO_WRONGVERSION },
93 { NC_("RID_ERRHDL", "Incorrect file format.") , ERRCODE_IO_WRONGFORMAT },
94 { NC_("RID_ERRHDL", "The file name contains invalid characters.") , ERRCODE_IO_INVALIDCHAR },
95 { NC_("RID_ERRHDL", "An unknown I/O error has occurred.") , ERRCODE_IO_UNKNOWN },
96 { NC_("RID_ERRHDL", "An invalid attempt was made to access the file.") , ERRCODE_IO_INVALIDACCESS },
97 { NC_("RID_ERRHDL", "The file could not be created.") , ERRCODE_IO_CANTCREATE },
98 { NC_("RID_ERRHDL", "The operation was started under an invalid parameter.") , ERRCODE_IO_INVALIDPARAMETER },
99 { NC_("RID_ERRHDL", "The operation on the file was aborted.") , ERRCODE_IO_ABORT },
100 { NC_("RID_ERRHDL", "Path to the file does not exist.") , ERRCODE_IO_NOTEXISTSPATH },
101 { NC_("RID_ERRHDL", "An object cannot be copied into itself.") , ERRCODE_IO_RECURSIVE },
102 { NC_("RID_ERRHDL", "The specified template could not be found.") , ERRCODE_SFX_TEMPLATENOTFOUND },
103 { NC_("RID_ERRHDL", "The file cannot be used as template.") , ERRCODE_SFX_NOTATEMPLATE },
104 { NC_("RID_ERRHDL", "This document has already been opened for editing.") , ERRCODE_SFX_ALREADYOPEN },
105 { NC_("RID_ERRHDL", "The wrong password has been entered.") , ERRCODE_SFX_WRONGPASSWORD },
106 { NC_("RID_ERRHDL", "Error reading file.") , ERRCODE_SFX_DOLOADFAILED },
107 { NC_("RID_ERRHDL", "Document opened as read-only cannot be saved over itself.") , ERRCODE_SFX_DOCUMENTREADONLY },
108 { NC_("RID_ERRHDL", "General OLE Error.") , ERRCODE_SFX_OLEGENERAL },
109 { NC_("RID_ERRHDL", "The host name $(ARG1) could not be resolved.") , ERRCODE_INET_NAME_RESOLVE },
110 { NC_("RID_ERRHDL", "Could not establish Internet connection to $(ARG1).") , ERRCODE_INET_CONNECT },
111 { NC_("RID_ERRHDL", "Error reading data from the Internet.\nServer error message: $(ARG1).") , ERRCODE_INET_READ },
112 { NC_("RID_ERRHDL", "Error transferring data to the Internet.\nServer error message: $(ARG1).") , ERRCODE_INET_WRITE },
113 { NC_("RID_ERRHDL", "General Internet error has occurred.") , ERRCODE_INET_GENERAL },
114 { 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 },
115 { NC_("RID_ERRHDL", "The contents could not be created.") , ERRCODE_SFX_CANTCREATECONTENT },
116 { NC_("RID_ERRHDL", "The file name is too long for the target file system.") , ERRCODE_IO_NAMETOOLONG },
117 { NC_("RID_ERRHDL", "The input syntax is invalid.") , ERRCODE_SFX_INVALIDSYNTAX },
118 { 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 },
119 { 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 },
120 { NC_("RID_ERRHDL", "Could not create backup copy.") , ERRCODE_SFX_CANTCREATEBACKUP },
121 { 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 },
122 { NC_("RID_ERRHDL", "Invalid data length.") , ERRCODE_IO_INVALIDLENGTH },
123 { NC_("RID_ERRHDL", "Function not possible: path contains current directory.") , ERRCODE_IO_CURRENTDIR },
124 { NC_("RID_ERRHDL", "Function not possible: device (drive) not identical.") , ERRCODE_IO_NOTSAMEDEVICE },
125 { NC_("RID_ERRHDL", "Device (drive) not ready.") , ERRCODE_IO_DEVICENOTREADY },
126 { NC_("RID_ERRHDL", "Wrong checksum.") , ERRCODE_IO_BADCRC },
127 { NC_("RID_ERRHDL", "Function not possible: write protected.") , ERRCODE_IO_WRITEPROTECTED },
128 { NC_("RID_ERRHDL", "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first."), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE },
129 { NC_("RID_ERRHDL", "File format error found at $(ARG1)(row,col)."), ERRCODE_SFX_FORMAT_ROWCOL },
130 { NC_("RID_ERRHDL", "The filter for this file format is disabled in configuration. Please contact your systems administrator."), ERRCODE_IO_FILTERDISABLED },
134 const ErrMsgCode RID_SO_ERROR_HANDLER[] =
136 { NC_("RID_ERRHDL", "General OLE error."),
137 ERRCODE_SO_GENERALERROR },
138 { NC_("RID_ERRHDL", "The action cannot be executed in the object's current state."),
139 ERRCODE_SO_CANNOT_DOVERB_NOW },
140 { NC_("RID_ERRHDL", "The object does not support any actions."),
141 ERRCODE_SO_NOVERBS },
142 { NC_("RID_ERRHDL", "Object does not support this action."),
143 ERRCODE_SO_NOTIMPL },
147 const ErrMsgCode RID_SO_ERRCTX[] =
149 { NC_("RID_ERRHDL", "$(ERR) activating object") , ErrCode(ERRCTX_SO_DOVERB) },
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */