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
00025 #ifndef STOFFDOCUMENT_HXX
00026 #define STOFFDOCUMENT_HXX
00027
00028 #ifdef DLL_EXPORT
00029 #ifdef BUILD_STOFF
00030 #define STOFFLIB __declspec(dllexport)
00031 #else
00032 #define STOFFLIB __declspec(dllimport)
00033 #endif
00034 #else // !DLL_EXPORT
00035 #ifdef LIBSTAROFFICE_VISIBILITY
00036 #define STOFFLIB __attribute__((visibility("default")))
00037 #else
00038 #define STOFFLIB
00039 #endif
00040 #endif
00041
00042 namespace librevenge
00043 {
00044 class RVNGBinaryData;
00045 class RVNGDrawingInterface;
00046 class RVNGPresentationInterface;
00047 class RVNGSpreadsheetInterface;
00048 class RVNGTextInterface;
00049 class RVNGInputStream;
00050 }
00051
00055 class STOFFDocument
00056 {
00057 public:
00059 enum Confidence {
00060 STOFF_C_NONE=0,
00061 STOFF_C_UNSUPPORTED_ENCRYPTION ,
00062 STOFF_C_SUPPORTED_ENCRYPTION ,
00063 STOFF_C_EXCELLENT
00064 };
00066 enum Kind {
00067 STOFF_K_UNKNOWN=0 ,
00068 STOFF_K_BITMAP ,
00069 STOFF_K_CHART ,
00070 STOFF_K_DATABASE ,
00071 STOFF_K_DRAW ,
00072 STOFF_K_MATH ,
00073 STOFF_K_PRESENTATION ,
00074 STOFF_K_SPREADSHEET ,
00075 STOFF_K_TEXT ,
00076 STOFF_K_GRAPHIC
00077 };
00079 enum Result {
00080 STOFF_R_OK=0 ,
00081 STOFF_R_FILE_ACCESS_ERROR ,
00082 STOFF_R_OLE_ERROR ,
00083 STOFF_R_PARSE_ERROR ,
00084 STOFF_R_PASSWORD_MISSMATCH_ERROR ,
00085 STOFF_R_UNKNOWN_ERROR
00086 };
00087
00093 static STOFFLIB Confidence isFileFormatSupported(librevenge::RVNGInputStream *input, Kind &kind);
00094
00095
00096
00097
00098
00107 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface, char const *password=0);
00108
00117 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *documentInterface, char const *password=0);
00118
00127 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGPresentationInterface *documentInterface, char const *password=0);
00128
00137 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface, char const *password=0);
00138
00139
00140
00141
00142
00152 static STOFFLIB bool decodeGraphic(librevenge::RVNGBinaryData const &binary, librevenge::RVNGDrawingInterface *documentInterface);
00153
00163 static STOFFLIB bool decodeSpreadsheet(librevenge::RVNGBinaryData const &binary, librevenge::RVNGSpreadsheetInterface *documentInterface);
00164
00174 static STOFFLIB bool decodeText(librevenge::RVNGBinaryData const &binary, librevenge::RVNGTextInterface *documentInterface);
00175 };
00176
00177 #endif
00178