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