xref: /trunk/main/sw/inc/swerror.h (revision 6a8e298a)
1*6a8e298aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*6a8e298aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*6a8e298aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*6a8e298aSAndrew Rist  * distributed with this work for additional information
6*6a8e298aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*6a8e298aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*6a8e298aSAndrew Rist  * "License"); you may not use this file except in compliance
9*6a8e298aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*6a8e298aSAndrew Rist  *
11*6a8e298aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*6a8e298aSAndrew Rist  *
13*6a8e298aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*6a8e298aSAndrew Rist  * software distributed under the License is distributed on an
15*6a8e298aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*6a8e298aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*6a8e298aSAndrew Rist  * specific language governing permissions and limitations
18*6a8e298aSAndrew Rist  * under the License.
19*6a8e298aSAndrew Rist  *
20*6a8e298aSAndrew Rist  *************************************************************/
21*6a8e298aSAndrew Rist 
22*6a8e298aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SWSWERROR_H
25cdf0e10cSrcweir #define _SWSWERROR_H
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <tools/errcode.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #define ERROR_SW_BASE			(ERRCODE_AREA_SW)
30cdf0e10cSrcweir #define ERROR_SW_READ_BASE		(ERROR_SW_BASE | ERRCODE_CLASS_READ)
31cdf0e10cSrcweir #define ERROR_SW_WRITE_BASE		(ERROR_SW_BASE | ERRCODE_CLASS_WRITE)
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #define WARN_SW_BASE			(ERRCODE_AREA_SW | ERRCODE_WARNING_MASK)
34cdf0e10cSrcweir #define WARN_SW_READ_BASE		(WARN_SW_BASE | ERRCODE_CLASS_READ )
35cdf0e10cSrcweir #define WARN_SW_WRITE_BASE		(WARN_SW_BASE | ERRCODE_CLASS_WRITE )
36cdf0e10cSrcweir 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir // Import Fehler
39cdf0e10cSrcweir #define ERR_SWG_FILE_FORMAT_ERROR     (ERROR_SW_READ_BASE | 1 )
40cdf0e10cSrcweir #define ERR_SWG_READ_ERROR              (ERROR_SW_READ_BASE   | 2 )
41cdf0e10cSrcweir 
42cdf0e10cSrcweir #define ERR_SW6_INPUT_FILE				(ERROR_SW_READ_BASE	| 4 )
43cdf0e10cSrcweir #define ERR_SW6_NOWRITER_FILE			(ERROR_SW_READ_BASE	| 5 )
44cdf0e10cSrcweir #define ERR_SW6_UNEXPECTED_EOF			(ERROR_SW_READ_BASE	| 6 )
45cdf0e10cSrcweir #define ERR_SW6_PASSWD					(ERROR_SW_READ_BASE	| 7 )
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #define ERR_WW6_NO_WW6_FILE_ERR			(ERROR_SW_READ_BASE	| 8 )
48cdf0e10cSrcweir #define ERR_WW6_FASTSAVE_ERR            (ERROR_SW_READ_BASE | 9 )
49cdf0e10cSrcweir 
50cdf0e10cSrcweir #define ERR_FORMAT_ROWCOL               (ERROR_SW_READ_BASE | 12)
51cdf0e10cSrcweir 
52cdf0e10cSrcweir #define ERR_SWG_NEW_VERSION				(ERROR_SW_READ_BASE | 13)
53cdf0e10cSrcweir #define ERR_WW8_NO_WW8_FILE_ERR			(ERROR_SW_READ_BASE	| 14)
54cdf0e10cSrcweir 
55cdf0e10cSrcweir #define ERR_FORMAT_FILE_ROWCOL          (ERROR_SW_READ_BASE | 15)
56cdf0e10cSrcweir 
57cdf0e10cSrcweir // Export Fehler
58cdf0e10cSrcweir #define ERR_SWG_WRITE_ERROR               (ERROR_SW_WRITE_BASE | 30 )
59cdf0e10cSrcweir #define   ERR_SWG_OLD_GLOSSARY            (ERROR_SW_WRITE_BASE | 31 )
60cdf0e10cSrcweir #define ERR_WRITE_ERROR_FILE			(ERROR_SW_WRITE_BASE | 35 )
61cdf0e10cSrcweir 
62cdf0e10cSrcweir // Import/Export Fehler
63cdf0e10cSrcweir #define ERR_SWG_INTERNAL_ERROR            (ERROR_SW_BASE  | 50 )
64cdf0e10cSrcweir 
65cdf0e10cSrcweir #define ERR_TXTBLOCK_NEWFILE_ERROR		(ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
66cdf0e10cSrcweir 
67cdf0e10cSrcweir // weitere Fehler und Fehlerklassen
68cdf0e10cSrcweir #define ERR_AUTOPATH_ERROR				(ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
69cdf0e10cSrcweir #define ERR_TBLSPLIT_ERROR				(ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
70cdf0e10cSrcweir #define ERR_TBLINSCOL_ERROR				(ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
71cdf0e10cSrcweir #define ERR_TBLDDECHG_ERROR				(ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 )
72cdf0e10cSrcweir 
73cdf0e10cSrcweir // ----- Warnings ---------------------------
74cdf0e10cSrcweir 
75cdf0e10cSrcweir // Import - Warnings
76cdf0e10cSrcweir #define WARN_SWG_NO_DRAWINGS            (WARN_SW_READ_BASE | 70 )
77cdf0e10cSrcweir #define WARN_WW6_FASTSAVE_ERR           (WARN_SW_READ_BASE | 71 )
78cdf0e10cSrcweir // continued below
79cdf0e10cSrcweir 
80cdf0e10cSrcweir // Import & Export - Warnings
81cdf0e10cSrcweir #define WARN_SWG_FEATURES_LOST          (WARN_SW_BASE | 72 )
82cdf0e10cSrcweir #define WARN_SWG_OLE                    (WARN_SW_BASE | 73 )
83cdf0e10cSrcweir #define	WARN_SWG_POOR_LOAD          	(WARN_SW_BASE | 74 )
84cdf0e10cSrcweir 
85cdf0e10cSrcweir // Export warnings
86cdf0e10cSrcweir #define WARN_SWG_HTML_NO_MACROS			(WARN_SW_WRITE_BASE |75)
87cdf0e10cSrcweir #define WARN_WRITE_ERROR_FILE			(WARN_SW_WRITE_BASE |76)
88cdf0e10cSrcweir 
89cdf0e10cSrcweir // More Import & Export  - Warnings
90cdf0e10cSrcweir #define WARN_FORMAT_FILE_ROWCOL         (WARN_SW_READ_BASE | 77)
91cdf0e10cSrcweir 
92cdf0e10cSrcweir #ifndef __RSC
93cdf0e10cSrcweir 
IsWarning(sal_uLong nErr)94cdf0e10cSrcweir inline FASTBOOL IsWarning( sal_uLong nErr )
95cdf0e10cSrcweir {
96cdf0e10cSrcweir 	return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
97cdf0e10cSrcweir }
98cdf0e10cSrcweir 
IsError(sal_uLong nErr)99cdf0e10cSrcweir inline FASTBOOL IsError( sal_uLong nErr )
100cdf0e10cSrcweir {
101cdf0e10cSrcweir 	return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
102cdf0e10cSrcweir }
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #endif
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 
107cdf0e10cSrcweir #endif
108cdf0e10cSrcweir 
109