WPSDocument.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
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/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
11 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
12 *
13 * For minor contributions see the git repository.
14 *
15 * Alternatively, the contents of this file may be used under the terms
16 * of the GNU Lesser General Public License Version 2.1 or later
17 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18 * applicable instead of those above.
19 *
20 * For further information visit http://libwps.sourceforge.net
21 */
22
23
24#ifndef WPSDOCUMENT_H
25#define WPSDOCUMENT_H
26
27#include <string>
28#include <utility>
29#include <vector>
30
31#include <librevenge/librevenge.h>
32
33#ifdef DLL_EXPORT
34#ifdef BUILD_WPS
35#define WPSLIB __declspec(dllexport)
36#else
37#define WPSLIB __declspec(dllimport)
38#endif
39#else // !DLL_EXPORT
40#ifdef LIBWPS_VISIBILITY
41#define WPSLIB __attribute__((visibility("default")))
42#else
43#define WPSLIB
44#endif
45#endif
46
47
48namespace libwps
49{
50
66};
69
74{
75public:
97 static WPSLIB WPSConfidence isFileFormatSupported(librevenge::RVNGInputStream *input, WPSKind &kind, WPSCreator &creator, bool &needCharSetEncoding);
98
108 static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface,
109 char const *password="", char const *encoding="");
119 static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface,
120 char const *password="", char const *encoding="");
121
122
129 static WPSLIB std::vector<std::pair<std::string, std::string> > getListOfEncodings();
130
131};
132
133} // namespace libwps
134
135#endif /* WPSDOCUMENT_H */
136/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
#define WPSLIB
Definition WPSDocument.h:43
This class provides all the functions an application would need to parse Works documents.
Definition WPSDocument.h:74
static WPSLIB std::vector< std::pair< std::string, std::string > > getListOfEncodings()
Definition WPSDocument.cpp:418
static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface, char const *password="", char const *encoding="")
Parses the input stream content.
Definition WPSDocument.cpp:233
static WPSLIB WPSConfidence isFileFormatSupported(librevenge::RVNGInputStream *input, WPSKind &kind, WPSCreator &creator, bool &needCharSetEncoding)
Analyzes the content of an input stream to see if it can be parsed.
Definition WPSDocument.cpp:64
Definition libwps_internal.cpp:39
WPSKind
Definition WPSDocument.h:67
@ WPS_TEXT
Definition WPSDocument.h:67
@ WPS_DATABASE
Definition WPSDocument.h:67
@ WPS_SPREADSHEET
Definition WPSDocument.h:67
WPSResult
Definition WPSDocument.h:68
@ WPS_OLE_ERROR
Definition WPSDocument.h:68
@ WPS_OK
Definition WPSDocument.h:68
@ WPS_UNKNOWN_ERROR
Definition WPSDocument.h:68
@ WPS_FILE_ACCESS_ERROR
Definition WPSDocument.h:68
@ WPS_ENCRYPTION_ERROR
Definition WPSDocument.h:68
@ WPS_PARSE_ERROR
Definition WPSDocument.h:68
WPSCreator
Definition WPSDocument.h:52
@ WPS_DOSWORD
Definition WPSDocument.h:61
@ WPS_XYWRITE
Definition WPSDocument.h:63
@ WPS_SYMPHONY
Lotus Symphony files(untested, probably DOS documents).
Definition WPSDocument.h:56
@ WPS_RESERVED_3
Definition WPSDocument.h:58
@ WPS_RESERVED_2
Definition WPSDocument.h:57
@ WPS_QUATTRO_PRO
Quattro Pro wq1,wq2, wb1,wb2,wb3, qpw spreadsheets and qpw spreadsheet.
Definition WPSDocument.h:54
@ WPS_RESERVED_5
Definition WPSDocument.h:58
@ WPS_RESERVED_8
Definition WPSDocument.h:59
@ WPS_RESERVED_6
Definition WPSDocument.h:59
@ WPS_MSWORKS
Definition WPSDocument.h:52
@ WPS_RESERVED_1
Definition WPSDocument.h:57
@ WPS_RESERVED_4
Definition WPSDocument.h:58
@ WPS_POCKETEXCEL
Definition WPSDocument.h:65
@ WPS_POCKETWORD
Definition WPSDocument.h:64
@ WPS_RESERVED_0
Definition WPSDocument.h:57
@ WPS_MULTIPLAN
Definition WPSDocument.h:62
@ WPS_LOTUS
Lotus DOS(wk1), Apple(Lotus 123 v1), Windows(wk3,wk4,123) spreadsheets.
Definition WPSDocument.h:53
@ WPS_RESERVED_7
Definition WPSDocument.h:59
@ WPS_MSWRITE
Definition WPSDocument.h:60
WPSConfidence
Definition WPSDocument.h:51
@ WPS_CONFIDENCE_NONE
Definition WPSDocument.h:51
@ WPS_CONFIDENCE_SUPPORTED_ENCRYPTION
Definition WPSDocument.h:51
@ WPS_CONFIDENCE_EXCELLENT
Definition WPSDocument.h:51

Generated on for libwps by doxygen 1.17.0