Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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 // !DLL_EXPORT
00036 #ifdef LIBWPS_VISIBILITY
00037 #define WPSLIB __attribute__((visibility("default")))
00038 #else
00039 #define WPSLIB
00040 #endif
00041 #endif
00042
00043
00044 namespace libwps
00045 {
00046
00047 enum WPSConfidence { WPS_CONFIDENCE_NONE=0, WPS_CONFIDENCE_EXCELLENT, WPS_CONFIDENCE_SUPPORTED_ENCRYPTION };
00048 enum WPSCreator { WPS_MSWORKS=0 ,
00049 WPS_LOTUS ,
00050 WPS_QUATTRO_PRO ,
00051 WPS_SYMPHONY ,
00052 WPS_RESERVED_0, WPS_RESERVED_1, WPS_RESERVED_2,
00053 WPS_RESERVED_3, WPS_RESERVED_4, WPS_RESERVED_5,
00054 WPS_RESERVED_6, WPS_RESERVED_7, WPS_RESERVED_8,
00055 WPS_MSWRITE=WPS_RESERVED_0
00056 };
00057 enum WPSKind { WPS_TEXT=0, WPS_SPREADSHEET, WPS_DATABASE };
00058 enum WPSResult { WPS_OK, WPS_ENCRYPTION_ERROR, WPS_FILE_ACCESS_ERROR, WPS_PARSE_ERROR, WPS_OLE_ERROR, WPS_UNKNOWN_ERROR };
00059
00063 class WPSDocument
00064 {
00065 public:
00087 static WPSLIB WPSConfidence isFileFormatSupported(librevenge::RVNGInputStream *input, WPSKind &kind, WPSCreator &creator, bool &needCharSetEncoding);
00088
00098 static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface,
00099 char const *password="", char const *encoding="");
00109 static WPSLIB WPSResult parse(librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface,
00110 char const *password="", char const *encoding="");
00111 };
00112
00113 }
00114
00115 #endif
00116