63 #ifndef STOFF_OLE_PARSER_H
64 #define STOFF_OLE_PARSER_H
69 #include <librevenge-stream/librevenge-stream.h>
78 namespace STOFFOLEParserInternal
104 shared_ptr<OleDirectory>
getDirectory(std::string
const &dir);
111 OleContent(std::string
const &dir, std::string
const &base) :
147 bool getImageData(librevenge::RVNGBinaryData &data, std::string &type)
const
159 void setImageData(librevenge::RVNGBinaryData
const &data, std::string
const &type)
195 std::vector<std::string> res;
267 shared_ptr<STOFFOLEParserInternal::State>
m_state;
std::string getBaseName()
returns the base name
Definition: STOFFOLEParser.hxx:116
bool m_parsed
a flag to know if the directory is parsed or not
Definition: STOFFOLEParser.hxx:217
shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:488
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: STOFFOLEParser.hxx:86
std::string m_imageType
the image type ( if known)
Definition: STOFFOLEParser.hxx:176
static bool readOle10Native(STOFFInputStreamPtr ip, OleContent &content)
extracts the picture if it is possible.
Definition: STOFFOLEParser.cxx:856
static bool readOle(STOFFInputStreamPtr ip, std::string const &oleName, libstoff::DebugFile &ascii)
the "Ole" small structure : unknown contain
Definition: STOFFOLEParser.cxx:386
Definition: STOFFDebug.hxx:198
bool getImageData(librevenge::RVNGBinaryData &data, std::string &type) const
returns the image data
Definition: STOFFOLEParser.hxx:147
bool m_isParsed
true if the data has been parsed
Definition: STOFFOLEParser.hxx:170
static bool isOle10Native(STOFFInputStreamPtr ip, std::string const &oleName)
theOle10Native : basic Windows© picture, with no size
Definition: STOFFOLEParser.cxx:840
This class provides all the functions an application would need to parse StarOffice documents...
Definition: STOFFDocument.hxx:55
bool readCONTENTS(STOFFInputStreamPtr input, OleContent &content)
the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same heade...
Definition: STOFFOLEParser.cxx:1011
bool parse(STOFFInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: STOFFOLEParser.cxx:259
STOFFDocument::Kind m_kind
the ole kind
Definition: STOFFOLEParser.hxx:209
std::vector< shared_ptr< OleDirectory > > & getDirectoryList()
returns the list of directory ole
Definition: STOFFOLEParser.cxx:241
STOFFInputStreamPtr m_input
the main input
Definition: STOFFOLEParser.hxx:203
static bool readOlePres(STOFFInputStreamPtr ip, OleContent &content)
extracts the picture of OlePres001 if it is possible.
Definition: STOFFOLEParser.cxx:730
librevenge::RVNGBinaryData m_imageData
the image content ( if known )
Definition: STOFFOLEParser.hxx:174
STOFFOLEParser()
constructor
Definition: STOFFOLEParser.cxx:233
std::string m_dir
the directory
Definition: STOFFOLEParser.hxx:166
std::vector< std::string > getUnparsedOles() const
returns the list of unknown ole
Definition: STOFFOLEParser.hxx:193
OleDirectory(STOFFInputStreamPtr input, std::string const &dir)
constructor
Definition: STOFFOLEParser.hxx:182
shared_ptr< STOFFOLEParserInternal::State > m_state
the class state
Definition: STOFFOLEParser.hxx:267
shared_ptr< OleDirectory > getDirectory(std::string const &dir)
returns a OleDirectory corresponding to a dir if found
Definition: STOFFOLEParser.cxx:246
STOFFPosition m_position
the image position (if known)
Definition: STOFFOLEParser.hxx:172
OleContent(std::string const &dir, std::string const &base)
constructor
Definition: STOFFOLEParser.hxx:111
bool m_hasCompObj
true if the directory contains a compobj object
Definition: STOFFOLEParser.hxx:211
std::string m_clipName
the compobj clipname
Definition: STOFFOLEParser.hxx:215
bool m_inUse
a flag to know if the directory is currently used
Definition: STOFFOLEParser.hxx:219
static bool isOlePres(STOFFInputStreamPtr ip, std::string const &oleName)
the OlePres001 seems to contain standart picture file and size
Definition: STOFFOLEParser.cxx:685
std::string getOleName() const
returns the ole name
Definition: STOFFOLEParser.hxx:121
void setImageData(librevenge::RVNGBinaryData const &data, std::string const &type)
sets the image data
Definition: STOFFOLEParser.hxx:159
bool isParsed() const
returns true if the object if parsed
Definition: STOFFOLEParser.hxx:127
bool readContents(STOFFInputStreamPtr input, OleContent &content)
the Contents : in general a picture : a PNG, an JPEG, a basic metafile, I find also a Word art pictur...
Definition: STOFFOLEParser.cxx:902
void addNewBase(std::string const &base)
add a new base file
Definition: STOFFOLEParser.hxx:185
bool getCompObjName(STOFFInputStreamPtr fileInput, std::string &programName)
returns the main compobj program name
Definition: STOFFOLEParser.cxx:370
std::vector< OleContent > m_contentList
the list of base name
Definition: STOFFOLEParser.hxx:207
std::string m_dir
the dir name
Definition: STOFFOLEParser.hxx:205
structure use to store an object content
Definition: STOFFOLEParser.hxx:109
Kind
an enum to define the kind of document
Definition: STOFFDocument.hxx:66
STOFFPosition const & getPosition() const
return the image position
Definition: STOFFOLEParser.hxx:137
std::string m_base
the base name
Definition: STOFFOLEParser.hxx:168
void setPosition(STOFFPosition const &pos)
set the image position
Definition: STOFFOLEParser.hxx:142
void setParsed(bool flag=true)
sets the parsed flag
Definition: STOFFOLEParser.hxx:132
~STOFFOLEParser()
destructor
Definition: STOFFOLEParser.cxx:237
static bool readSummaryInformation(STOFFInputStreamPtr input, std::string const &oleName, libstoff::DebugFile &ascii)
the summary information
Definition: STOFFOLEParser.cxx:419
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: STOFFPosition.hxx:47
std::string m_clsName
the compobj CLSname
Definition: STOFFOLEParser.hxx:213
bool readCompObj(STOFFInputStreamPtr ip, OleDirectory &directory)
parse the "CompObj" contains : UserType,ClipName,ProgIdName
Definition: STOFFOLEParser.cxx:559
static bool readObjInfo(STOFFInputStreamPtr input, std::string const &oleName, libstoff::DebugFile &ascii)
the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
Definition: STOFFOLEParser.cxx:539
Internal: internal method to keep ole directory and their content.
Definition: STOFFOLEParser.hxx:180