bump product version to 4.1.6.2
[LibreOffice.git] / sw / inc / swerror.h
blobf621f53e2b1eaf831959b848c9a66801fda1c929
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SWSWERROR_H
21 #define _SWSWERROR_H
23 #include <tools/errcode.hxx>
25 #define ERROR_SW_BASE (ERRCODE_AREA_SW)
26 #define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ)
27 #define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE)
29 #define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK)
30 #define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ )
31 #define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE )
34 // Import Errors
35 #define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 )
36 #define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 )
38 #define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 )
39 #define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 )
40 #define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 )
41 #define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 )
43 #define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 )
44 #define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 )
46 #define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12)
48 #define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13)
49 #define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14)
51 #define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15)
53 // Export errors
54 #define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 )
55 #define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 )
56 #define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 )
58 // Import/Export errors
59 #define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 )
61 #define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
63 // other errors and errorclasses
64 #define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
65 #define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
66 #define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
67 #define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 )
69 // ----- Warnings ---------------------------
71 // Import - Warnings
72 #define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 )
73 #define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 )
74 // continued below
76 // Import & Export - Warnings
77 #define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 )
78 #define WARN_SWG_OLE (WARN_SW_BASE | 73 )
79 #define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 )
81 // Export warnings
82 #define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75)
83 #define WARN_WRITE_ERROR_FILE (WARN_SW_WRITE_BASE |76)
85 // More Import & Export - Warnings
86 #define WARN_FORMAT_FILE_ROWCOL (WARN_SW_READ_BASE | 77)
88 #ifndef __RSC
90 inline bool IsWarning( sal_uLong nErr )
92 return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
95 inline bool IsError( sal_uLong nErr )
97 return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
100 #endif
103 #endif
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */