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 .
20 #ifndef INCLUDED_SW_INC_ERROR_HRC
21 #define INCLUDED_SW_INC_ERROR_HRC
23 #include <svtools/ehdl.hxx>
24 #include <vcl/errcode.hxx>
28 #define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
30 #define ERR_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())
31 #define WARN_CODE( class, err ) ErrCode(ErrCodeArea::Sw, class, err.GetCode())
33 const ErrMsgCode RID_SW_ERRHDL[] =
36 { NC_("RID_SW_ERRHDL", "File format error found.") , ERR_SWG_FILE_FORMAT_ERROR },
37 { NC_("RID_SW_ERRHDL", "Error reading file.") , ERR_SWG_READ_ERROR },
38 { NC_("RID_SW_ERRHDL", "This is not a valid WinWord6 file.") , ERR_WW6_NO_WW6_FILE_ERR },
39 { NC_("RID_SW_ERRHDL", "File format error found at $(ARG1)(row,col).") , ERR_FORMAT_ROWCOL },
40 { NC_("RID_SW_ERRHDL", "This is not a valid WinWord97 file."), ERR_WW8_NO_WW8_FILE_ERR },
41 { NC_("RID_SW_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."), ERR_FORMAT_FILE_ROWCOL },
43 { NC_("RID_SW_ERRHDL", "Error writing file.") , ERR_SWG_WRITE_ERROR },
44 { NC_("RID_SW_ERRHDL", "Wrong AutoText document version.") , ERR_SWG_OLD_GLOSSARY },
45 { NC_("RID_SW_ERRHDL", "Error in writing sub-document $(ARG1)."), ERR_WRITE_ERROR_FILE },
46 // Import-/Export-Errors
47 { NC_("RID_SW_ERRHDL", "Internal error in %PRODUCTNAME Writer file format.") , ERR_CODE ( ErrCodeClass::Read , ERR_SWG_INTERNAL_ERROR ) },
48 { NC_("RID_SW_ERRHDL", "Internal error in %PRODUCTNAME Writer file format.") , ERR_CODE ( ErrCodeClass::Write , ERR_SWG_INTERNAL_ERROR ) },
49 { NC_("RID_SW_ERRHDL", "$(ARG1) has changed.") , ERR_TXTBLOCK_NEWFILE_ERROR },
50 { NC_("RID_SW_ERRHDL", "$(ARG1) does not exist.") , ERR_AUTOPATH_ERROR },
51 { NC_("RID_SW_ERRHDL", "Cells cannot be further split.") , ERR_TBLSPLIT_ERROR },
52 { NC_("RID_SW_ERRHDL", "Additional columns cannot be inserted.") , ERR_TBLINSCOL_ERROR },
53 { NC_("RID_SW_ERRHDL", "The structure of a linked table cannot be modified.") , ERR_TBLDDECHG_ERROR },
55 { NC_("RID_SW_ERRHDL", "Not all attributes could be read.") , WARN_CODE ( ErrCodeClass::Read , WARN_SWG_FEATURES_LOST ) },
56 { NC_("RID_SW_ERRHDL", "Not all attributes could be recorded.") , WARN_CODE ( ErrCodeClass::Write , WARN_SWG_FEATURES_LOST ) },
57 { NC_("RID_SW_ERRHDL", "Document could not be completely saved.") , WARN_SWG_POOR_LOAD },
58 { NC_("RID_SW_ERRHDL", "This HTML document contains Basic macros.\nThey were not saved with the current export settings."), WARN_SWG_HTML_NO_MACROS },
59 { NC_("RID_SW_ERRHDL", "Error in writing sub-document $(ARG1)."), WARN_WRITE_ERROR_FILE },
60 { NC_("RID_SW_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."), WARN_FORMAT_FILE_ROWCOL },
61 { nullptr, ERRCODE_NONE }
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */