63#ifndef STOFF_OLE_PARSER_H
64#define STOFF_OLE_PARSER_H
69#include <librevenge-stream/librevenge-stream.h>
104 std::shared_ptr<OleDirectory>
getDirectory(std::string
const &dir);
152 bool getImageData(librevenge::RVNGBinaryData &data, std::string &type)
const
164 void setImageData(librevenge::RVNGBinaryData
const &data, std::string
const &type)
208 std::vector<std::string> res;
210 if (c.isParsed())
continue;
211 res.push_back(c.getOleName());
280 std::shared_ptr<STOFFOLEParserInternal::State>
m_state;
This class provides all the functions an application would need to parse StarOffice documents.
Definition STOFFDocument.hxx:56
Kind
an enum to define the kind of document
Definition STOFFDocument.hxx:66
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition STOFFOLEParser.hxx:87
bool getCompObjName(STOFFInputStreamPtr fileInput, std::string &programName)
returns the main compobj program name
Definition STOFFOLEParser.cxx:372
STOFFOLEParser()
constructor
Definition STOFFOLEParser.cxx:236
static bool readOle(STOFFInputStreamPtr ip, std::string const &oleName, libstoff::DebugFile &ascii)
the "Ole" small structure : unknown contain
Definition STOFFOLEParser.cxx:388
static bool isOle10Native(STOFFInputStreamPtr ip, std::string const &oleName)
theOle10Native : basic Windows© picture, with no size
Definition STOFFOLEParser.cxx:842
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:1013
bool parse(STOFFInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition STOFFOLEParser.cxx:263
std::shared_ptr< STOFFOLEParserInternal::State > m_state
the class state
Definition STOFFOLEParser.hxx:280
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:904
static bool isOlePres(STOFFInputStreamPtr ip, std::string const &oleName)
the OlePres001 seems to contain standart picture file and size
Definition STOFFOLEParser.cxx:687
~STOFFOLEParser()
destructor
Definition STOFFOLEParser.cxx:241
static bool readOlePres(STOFFInputStreamPtr ip, OleContent &content)
extracts the picture of OlePres001 if it is possible.
Definition STOFFOLEParser.cxx:732
std::shared_ptr< OleDirectory > getDirectory(std::string const &dir)
returns a OleDirectory corresponding to a dir if found
Definition STOFFOLEParser.cxx:250
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:541
static bool readSummaryInformation(STOFFInputStreamPtr input, std::string const &oleName, libstoff::DebugFile &ascii)
the summary information
Definition STOFFOLEParser.cxx:421
std::vector< std::shared_ptr< OleDirectory > > & getDirectoryList()
returns the list of directory ole
Definition STOFFOLEParser.cxx:245
static bool readOle10Native(STOFFInputStreamPtr ip, OleContent &content)
extracts the picture if it is possible.
Definition STOFFOLEParser.cxx:858
bool readCompObj(STOFFInputStreamPtr ip, OleDirectory &directory)
parse the "CompObj" contains : UserType,ClipName,ProgIdName
Definition STOFFOLEParser.cxx:561
Class to define the position of an object (textbox, picture, ..) in the document.
Definition STOFFPosition.hxx:48
Definition STOFFDebug.hxx:211
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition libstaroffice_internal.hxx:489
Low level: namespace used to define/store the data used by STOFFOLEParser.
Definition STOFFOLEParser.cxx:94
structure use to store an object content
Definition STOFFOLEParser.hxx:109
OleContent(std::string const &dir, std::string const &base)
constructor
Definition STOFFOLEParser.hxx:111
bool m_isParsed
true if the data has been parsed
Definition STOFFOLEParser.hxx:175
bool isParsed() const
returns true if the object if parsed
Definition STOFFOLEParser.hxx:132
void setPosition(STOFFPosition const &pos)
set the image position
Definition STOFFOLEParser.hxx:147
void setParsed(bool flag=true)
sets the parsed flag
Definition STOFFOLEParser.hxx:137
STOFFPosition m_position
the image position (if known)
Definition STOFFOLEParser.hxx:177
librevenge::RVNGBinaryData m_imageData
the image content ( if known )
Definition STOFFOLEParser.hxx:179
std::string m_imageType
the image type ( if known)
Definition STOFFOLEParser.hxx:181
std::string m_dir
the directory
Definition STOFFOLEParser.hxx:171
STOFFPosition const & getPosition() const
return the image position
Definition STOFFOLEParser.hxx:142
std::string getOleName() const
returns the ole name
Definition STOFFOLEParser.hxx:126
void setImageData(librevenge::RVNGBinaryData const &data, std::string const &type)
sets the image data
Definition STOFFOLEParser.hxx:164
std::string getBaseName()
returns the base name
Definition STOFFOLEParser.hxx:121
std::string m_base
the base name
Definition STOFFOLEParser.hxx:173
bool getImageData(librevenge::RVNGBinaryData &data, std::string &type) const
returns the image data
Definition STOFFOLEParser.hxx:152
Internal: internal method to keep ole directory and their content.
Definition STOFFOLEParser.hxx:185
bool m_parsed
a flag to know if the directory is parsed or not
Definition STOFFOLEParser.hxx:230
STOFFInputStreamPtr m_input
the main input
Definition STOFFOLEParser.hxx:216
STOFFDocument::Kind m_kind
the ole kind
Definition STOFFOLEParser.hxx:222
void addNewBase(std::string const &base)
add a new base file
Definition STOFFOLEParser.hxx:198
bool m_inUse
a flag to know if the directory is currently used
Definition STOFFOLEParser.hxx:232
std::vector< std::string > getUnparsedOles() const
returns the list of unknown ole
Definition STOFFOLEParser.hxx:206
bool m_hasCompObj
true if the directory contains a compobj object
Definition STOFFOLEParser.hxx:224
std::string m_clsName
the compobj CLSname
Definition STOFFOLEParser.hxx:226
std::string m_clipName
the compobj clipname
Definition STOFFOLEParser.hxx:228
std::string m_dir
the dir name
Definition STOFFOLEParser.hxx:218
std::vector< OleContent > m_contentList
the list of base name
Definition STOFFOLEParser.hxx:220
OleDirectory(STOFFInputStreamPtr &input, std::string const &dir)
constructor
Definition STOFFOLEParser.hxx:187