summaryrefslogtreecommitdiff
path: root/sw/inc/error.hrc
blob: c89b11abd505305a9a1d373ae6c3da89da8285b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#ifndef INCLUDED_SW_INC_ERROR_HRC
#define INCLUDED_SW_INC_ERROR_HRC

#include "swerror.h"

#define NC_(Context, String) (Context "\004" u8##String)

#define ERR_CODE( class, err )  ErrCode(class | (sal_uInt32(err) - ERRCODE_AREA_SW))
#define WARN_CODE( class, err ) ErrCode(class | (sal_uInt32(err) - WARN_SW_BASE))

const ErrMsgCode RID_SW_ERRHDL[] =
{
    // Import-Errors
    { NC_("RID_SW_ERRHDL", "File format error found.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_FILE_FORMAT_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Error reading file.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_READ_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Input file error.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_INPUT_FILE ) },
    { NC_("RID_SW_ERRHDL", "This is not a %PRODUCTNAME Writer file.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_NOWRITER_FILE ) },
    { NC_("RID_SW_ERRHDL", "Unexpected end of file.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_UNEXPECTED_EOF ) },
    { NC_("RID_SW_ERRHDL", "Password-protected files cannot be opened.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SW6_PASSWD ) },
    { NC_("RID_SW_ERRHDL", "This is not a valid WinWord6 file.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW6_NO_WW6_FILE_ERR ) },
    { NC_("RID_SW_ERRHDL", "This file was saved with WinWord in 'Fast Save' mode. Please unmark the WinWord option 'Allow Fast Saves' and save the file again.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW6_FASTSAVE_ERR ) },
    { NC_("RID_SW_ERRHDL", "File format error found at $(ARG1)(row,col).") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_ROWCOL ) },
    { NC_("RID_SW_ERRHDL", "File has been written in a newer version.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_NEW_VERSION ) },
    { NC_("RID_SW_ERRHDL", "This is not a valid WinWord97 file."), ERR_CODE ( ERRCODE_CLASS_READ , ERR_WW8_NO_WW8_FILE_ERR ) },
    { NC_("RID_SW_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."), ERR_CODE ( ERRCODE_CLASS_READ , ERR_FORMAT_FILE_ROWCOL ) },
    // Export-Errors
    { NC_("RID_SW_ERRHDL", "Error writing file.") , ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_WRITE_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Wrong AutoText document version.") , ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_OLD_GLOSSARY ) },
    { NC_("RID_SW_ERRHDL", "Error in writing sub-document $(ARG1)."), ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_WRITE_ERROR_FILE ) },
    // Import-/Export-Errors
    { NC_("RID_SW_ERRHDL", "Internal error in %PRODUCTNAME Writer file format.") , ERR_CODE ( ERRCODE_CLASS_READ , ERR_SWG_INTERNAL_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Internal error in %PRODUCTNAME Writer file format.") , ERR_CODE ( ERRCODE_CLASS_WRITE , ERR_SWG_INTERNAL_ERROR ) },
    { NC_("RID_SW_ERRHDL", "$(ARG1) has changed.") , ERR_CODE ( ERRCODE_CLASS_LOCKING , ERR_TXTBLOCK_NEWFILE_ERROR ) },
    { NC_("RID_SW_ERRHDL", "$(ARG1) does not exist.") , ERR_CODE ( ERRCODE_CLASS_PATH , ERR_AUTOPATH_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Cells cannot be further split.") , ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLSPLIT_ERROR ) },
    { NC_("RID_SW_ERRHDL", "Additional columns cannot be inserted.") , ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLINSCOL_ERROR ) },
    { NC_("RID_SW_ERRHDL", "The structure of a linked table cannot be modified.") , ERR_CODE ( ERRCODE_CLASS_NONE , ERR_TBLDDECHG_ERROR ) },

    { NC_("RID_SW_ERRHDL", "No drawings could be read.") , WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_NO_DRAWINGS ) },
    { NC_("RID_SW_ERRHDL", "This file was saved with WinWord in 'Fast Save' mode. Please unmark the WinWord option 'Allow Fast Saves' and save the file again.") , WARN_CODE ( ERRCODE_CLASS_READ , WARN_WW6_FASTSAVE_ERR ) },
    { NC_("RID_SW_ERRHDL", "Not all attributes could be read.") , WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_FEATURES_LOST ) },
    { NC_("RID_SW_ERRHDL", "Not all attributes could be recorded.") , WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_FEATURES_LOST ) },
    { NC_("RID_SW_ERRHDL", "Some OLE objects could only be loaded as images.") , WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_OLE ) },
    { NC_("RID_SW_ERRHDL", "Some OLE objects could only be saved as images.") , WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_OLE ) },
    { NC_("RID_SW_ERRHDL", "Document could not be completely loaded.") , WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_POOR_LOAD ) },
    { NC_("RID_SW_ERRHDL", "Document could not be completely saved.") , WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_POOR_LOAD ) },
    { NC_("RID_SW_ERRHDL", "This HTML document contains %PRODUCTNAME Basic macros.\nThey were not saved with the current export settings."), WARN_CODE ( ERRCODE_CLASS_WRITE , WARN_SWG_HTML_NO_MACROS) },
    { NC_("RID_SW_ERRHDL", "Error in writing sub-document $(ARG1)."), ERR_CODE ( ERRCODE_CLASS_WRITE , WARN_WRITE_ERROR_FILE ) },
    { NC_("RID_SW_ERRHDL", "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)."), ERR_CODE ( ERRCODE_CLASS_WRITE , WARN_FORMAT_FILE_ROWCOL ) },
    { nullptr, ERRCODE_NONE }
};

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */