Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SWSWERROR_H
30 : : #define _SWSWERROR_H
31 : :
32 : : #include <tools/errcode.hxx>
33 : :
34 : : #define ERROR_SW_BASE (ERRCODE_AREA_SW)
35 : : #define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ)
36 : : #define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE)
37 : :
38 : : #define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK)
39 : : #define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ )
40 : : #define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE )
41 : :
42 : :
43 : : // Import Errors
44 : : #define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 )
45 : : #define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 )
46 : :
47 : : #define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 )
48 : : #define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 )
49 : : #define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 )
50 : : #define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 )
51 : :
52 : : #define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 )
53 : : #define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 )
54 : :
55 : : #define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12)
56 : :
57 : : #define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13)
58 : : #define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14)
59 : :
60 : : #define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15)
61 : :
62 : : // Export errors
63 : : #define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 )
64 : : #define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 )
65 : : #define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 )
66 : :
67 : : // Import/Export errors
68 : : #define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 )
69 : :
70 : : #define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
71 : :
72 : : // other errors and errorclasses
73 : : #define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
74 : : #define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
75 : : #define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
76 : : #define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 )
77 : :
78 : : // ----- Warnings ---------------------------
79 : :
80 : : // Import - Warnings
81 : : #define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 )
82 : : #define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 )
83 : : // continued below
84 : :
85 : : // Import & Export - Warnings
86 : : #define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 )
87 : : #define WARN_SWG_OLE (WARN_SW_BASE | 73 )
88 : : #define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 )
89 : :
90 : : // Export warnings
91 : : #define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75)
92 : : #define WARN_WRITE_ERROR_FILE (WARN_SW_WRITE_BASE |76)
93 : :
94 : : // More Import & Export - Warnings
95 : : #define WARN_FORMAT_FILE_ROWCOL (WARN_SW_READ_BASE | 77)
96 : :
97 : : #ifndef __RSC
98 : :
99 : : inline bool IsWarning( sal_uLong nErr )
100 : : {
101 : : return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
102 : : }
103 : :
104 : 10909 : inline bool IsError( sal_uLong nErr )
105 : : {
106 [ + + ][ + + ]: 10909 : return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
107 : : }
108 : :
109 : : #endif
110 : :
111 : :
112 : : #endif
113 : :
114 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|