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