WPSDocument.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libwps
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
00011  * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
00019  *
00020  * For further information visit http://libwps.sourceforge.net
00021  */
00022 
00023 
00024 #ifndef WPSDOCUMENT_H
00025 #define WPSDOCUMENT_H
00026 
00027 #include <librevenge/librevenge.h>
00028 
00029 #ifdef DLL_EXPORT
00030 #ifdef BUILD_WPS
00031 #define WPSLIB __declspec(dllexport)
00032 #else
00033 #define WPSLIB __declspec(dllimport)
00034 #endif
00035 #else
00036 #define WPSLIB
00037 #endif
00038 
00039 
00040 namespace libwps
00041 {
00042 
00043 enum WPSConfidence { WPS_CONFIDENCE_NONE=0, WPS_CONFIDENCE_EXCELLENT };
00044 enum WPSKind { WPS_TEXT=0, WPS_SPREADSHEET, WPS_DATABASE };
00045 enum WPSResult { WPS_OK, WPS_FILE_ACCESS_ERROR, WPS_PARSE_ERROR, WPS_OLE_ERROR, WPS_UNKNOWN_ERROR };
00046 
00052 class WPSDocument
00053 {
00054 public:
00055         static WPSLIB WPSConfidence isFileFormatSupported(librevenge::RVNGInputStream *input, WPSKind &kind);
00056         static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface);
00057         static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface);
00058 };
00059 
00060 } // namespace libwps
00061 
00062 #endif /* WPSDOCUMENT_H */
00063 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */