25#ifndef STOFFDOCUMENT_HXX
26#define STOFFDOCUMENT_HXX
30#define STOFFLIB __declspec(dllexport)
32#define STOFFLIB __declspec(dllimport)
35#ifdef LIBSTAROFFICE_VISIBILITY
36#define STOFFLIB __attribute__((visibility("default")))
45class RVNGDrawingInterface;
46class RVNGPresentationInterface;
47class RVNGSpreadsheetInterface;
48class RVNGTextInterface;
107 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface,
char const *password=
nullptr);
117 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *documentInterface,
char const *password=
nullptr);
127 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGPresentationInterface *documentInterface,
char const *password=
nullptr);
137 static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGSpreadsheetInterface *documentInterface,
char const *password=
nullptr);
152 static STOFFLIB bool decodeGraphic(librevenge::RVNGBinaryData
const &binary, librevenge::RVNGDrawingInterface *documentInterface);
163 static STOFFLIB bool decodeSpreadsheet(librevenge::RVNGBinaryData
const &binary, librevenge::RVNGSpreadsheetInterface *documentInterface);
174 static STOFFLIB bool decodeText(librevenge::RVNGBinaryData
const &binary, librevenge::RVNGTextInterface *documentInterface);
#define STOFFLIB
Definition: STOFFDocument.hxx:38
This class provides all the functions an application would need to parse StarOffice documents.
Definition: STOFFDocument.hxx:56
static STOFFLIB bool decodeText(librevenge::RVNGBinaryData const &binary, librevenge::RVNGTextInterface *documentInterface)
Parses the text contained in the binary data and called documentInterface to reconstruct a text.
Definition: STOFFDocument.cxx:276
Kind
an enum to define the kind of document
Definition: STOFFDocument.hxx:66
@ STOFF_K_CHART
chart
Definition: STOFFDocument.hxx:69
@ STOFF_K_DATABASE
database
Definition: STOFFDocument.hxx:70
@ STOFF_K_GRAPHIC
gallery graphic: .sdg
Definition: STOFFDocument.hxx:76
@ STOFF_K_BITMAP
bitmap/image
Definition: STOFFDocument.hxx:68
@ STOFF_K_UNKNOWN
unknown
Definition: STOFFDocument.hxx:67
@ STOFF_K_DRAW
vectorized graphic: .sda
Definition: STOFFDocument.hxx:71
@ STOFF_K_TEXT
word processing file
Definition: STOFFDocument.hxx:75
@ STOFF_K_PRESENTATION
presentation
Definition: STOFFDocument.hxx:73
@ STOFF_K_MATH
math
Definition: STOFFDocument.hxx:72
@ STOFF_K_SPREADSHEET
spreadsheet: .sdc
Definition: STOFFDocument.hxx:74
static STOFFLIB bool decodeSpreadsheet(librevenge::RVNGBinaryData const &binary, librevenge::RVNGSpreadsheetInterface *documentInterface)
Parses the spreadsheet contained in the binary data and called documentInterface to reconstruct a spr...
Definition: STOFFDocument.cxx:259
static STOFFLIB Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface, char const *password=nullptr)
Parses the input stream content.
Definition: STOFFDocument.cxx:204
static STOFFLIB Confidence isFileFormatSupported(librevenge::RVNGInputStream *input, Kind &kind)
Analyzes the content of an input stream to see if it can be parsed.
Definition: STOFFDocument.cxx:63
static STOFFLIB bool decodeGraphic(librevenge::RVNGBinaryData const &binary, librevenge::RVNGDrawingInterface *documentInterface)
Parses the graphic contained in the binary data and called documentInterface to reconstruct a graphic...
Definition: STOFFDocument.cxx:242
Result
an enum which defines the result of the file parsing
Definition: STOFFDocument.hxx:79
@ STOFF_R_FILE_ACCESS_ERROR
problem when accessing file
Definition: STOFFDocument.hxx:81
@ STOFF_R_OLE_ERROR
problem when reading the OLE structure
Definition: STOFFDocument.hxx:82
@ STOFF_R_OK
conversion ok
Definition: STOFFDocument.hxx:80
@ STOFF_R_PARSE_ERROR
problem when parsing the file
Definition: STOFFDocument.hxx:83
@ STOFF_R_PASSWORD_MISSMATCH_ERROR
problem when using the given password
Definition: STOFFDocument.hxx:84
@ STOFF_R_UNKNOWN_ERROR
unknown error
Definition: STOFFDocument.hxx:85
Confidence
an enum which defines if we have confidence that a file is supported
Definition: STOFFDocument.hxx:59
@ STOFF_C_NONE
not supported
Definition: STOFFDocument.hxx:60
@ STOFF_C_SUPPORTED_ENCRYPTION
encryption supported
Definition: STOFFDocument.hxx:62
@ STOFF_C_UNSUPPORTED_ENCRYPTION
encryption not supported
Definition: STOFFDocument.hxx:61
@ STOFF_C_EXCELLENT
supported
Definition: STOFFDocument.hxx:63
Definition: STOFFDocument.hxx:43