MWAWOLEParser Class Reference

a class used to parse some basic oles Tries to read the different ole parts and stores their contents in form of picture. More...

#include <MWAWOLEParser.hxx>

Public Member Functions

 MWAWOLEParser (std::string mainName)
 constructor More...
 
 ~MWAWOLEParser ()
 destructor More...
 
bool parse (MWAWInputStreamPtr fileInput)
 tries to parse basic OLE (excepted mainName) More...
 
std::vector< std::string > const & getNotParse () const
 returns the list of unknown ole More...
 
std::vector< int > const & getObjectsId () const
 returns the list of id for which we have find a representation More...
 
std::vector< MWAWPosition > const & getObjectsPosition () const
 returns the list of data positions which have been read More...
 
std::vector
< librevenge::RVNGBinaryData >
const & 
getObjects () const
 returns the list of data which have been read More...
 
std::vector< std::string > const & getObjectsType () const
 returns the list of data type More...
 
bool getObject (int id, librevenge::RVNGBinaryData &obj, MWAWPosition &pos, std::string &type) const
 returns the picture corresponding to an id More...
 
void setObject (int id, librevenge::RVNGBinaryData const &obj, MWAWPosition const &pos, std::string const &type)
 sets an object just in case, the external parsing find another representation More...
 

Protected Member Functions

bool readCompObj (MWAWInputStreamPtr ip, std::string const &oleName, libmwaw::DebugFile &ascii)
 the "CompObj" contains : UserType,ClipName,ProgIdName More...
 
bool readContents (MWAWInputStreamPtr input, std::string const &oleName, librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii)
 the Contents : in general a picture : a PNG, an JPEG, a basic metafile, I find also a Word art picture, which are not sucefull read More...
 
bool readCONTENTS (MWAWInputStreamPtr input, std::string const &oleName, librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii)
 the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same header)... More...
 

Static Protected Member Functions

static bool readOle (MWAWInputStreamPtr ip, std::string const &oleName, libmwaw::DebugFile &ascii)
 the "Ole" small structure : unknown contain More...
 
static bool readMM (MWAWInputStreamPtr input, std::string const &oleName, libmwaw::DebugFile &ascii)
 the "MM" small structure : seems to contain the file versions More...
 
static bool readObjInfo (MWAWInputStreamPtr input, std::string const &oleName, libmwaw::DebugFile &ascii)
 the "ObjInfo" small structure : seems to contain 3 ints=0,3,4 More...
 
static bool isOlePres (MWAWInputStreamPtr ip, std::string const &oleName)
 the OlePres001 seems to contain standart picture file and size More...
 
static bool readOlePres (MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data, MWAWPosition &pos, libmwaw::DebugFile &ascii)
 extracts the picture of OlePres001 if it is possible More...
 
static bool isOle10Native (MWAWInputStreamPtr ip, std::string const &oleName)
 theOle10Native : basic Windows© picture, with no size More...
 
static bool readOle10Native (MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data, libmwaw::DebugFile &ascii)
 extracts the picture if it is possible More...
 

Protected Attributes

std::string m_avoidOLE
 if filled, does not parse content with this name More...
 
std::vector< std::string > m_unknownOLEs
 list of ole which can not be parsed More...
 
std::vector
< librevenge::RVNGBinaryData > 
m_objects
 list of pictures read More...
 
std::vector< MWAWPositionm_objectsPosition
 list of picture size ( if known) More...
 
std::vector< int > m_objectsId
 list of pictures id More...
 
std::vector< std::string > m_objectsType
 list of picture type More...
 
shared_ptr
< MWAWOLEParserInternal::CompObj
m_compObjIdName
 a smart ptr used to stored the list of compobj id->name More...
 

Detailed Description

a class used to parse some basic oles Tries to read the different ole parts and stores their contents in form of picture.

Constructor & Destructor Documentation

MWAWOLEParser::MWAWOLEParser ( std::string  mainName)

constructor

Parameters
mainNamename of the main ole, we must avoid to parse
MWAWOLEParser::~MWAWOLEParser ( )

destructor

Member Function Documentation

std::vector<std::string> const& MWAWOLEParser::getNotParse ( ) const
inline

returns the list of unknown ole

bool MWAWOLEParser::getObject ( int  id,
librevenge::RVNGBinaryData &  obj,
MWAWPosition pos,
std::string &  type 
) const

returns the picture corresponding to an id

std::vector<librevenge::RVNGBinaryData> const& MWAWOLEParser::getObjects ( ) const
inline

returns the list of data which have been read

std::vector<int> const& MWAWOLEParser::getObjectsId ( ) const
inline

returns the list of id for which we have find a representation

std::vector<MWAWPosition> const& MWAWOLEParser::getObjectsPosition ( ) const
inline

returns the list of data positions which have been read

std::vector<std::string> const& MWAWOLEParser::getObjectsType ( ) const
inline

returns the list of data type

bool MWAWOLEParser::isOle10Native ( MWAWInputStreamPtr  ip,
std::string const &  oleName 
)
staticprotected

theOle10Native : basic Windows© picture, with no size

Referenced by parse(), and readOle10Native().

bool MWAWOLEParser::isOlePres ( MWAWInputStreamPtr  ip,
std::string const &  oleName 
)
staticprotected

the OlePres001 seems to contain standart picture file and size

Referenced by parse(), and readOlePres().

bool MWAWOLEParser::parse ( MWAWInputStreamPtr  fileInput)

tries to parse basic OLE (excepted mainName)

Returns
false if fileInput is not an Ole file

first check if this is a mac pict as other oles may not be understand by openOffice, ...

bool MWAWOLEParser::readCompObj ( MWAWInputStreamPtr  ip,
std::string const &  oleName,
libmwaw::DebugFile ascii 
)
protected

the "CompObj" contains : UserType,ClipName,ProgIdName

Referenced by parse().

bool MWAWOLEParser::readContents ( MWAWInputStreamPtr  input,
std::string const &  oleName,
librevenge::RVNGBinaryData &  pict,
MWAWPosition pos,
libmwaw::DebugFile ascii 
)
protected

the Contents : in general a picture : a PNG, an JPEG, a basic metafile, I find also a Word art picture, which are not sucefull read

Referenced by parse().

bool MWAWOLEParser::readCONTENTS ( MWAWInputStreamPtr  input,
std::string const &  oleName,
librevenge::RVNGBinaryData &  pict,
MWAWPosition pos,
libmwaw::DebugFile ascii 
)
protected

the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same header)...

Note
I only find such lib in 2 files, so the parsing may be incomplete and many such Ole rejected

Referenced by parse().

bool MWAWOLEParser::readMM ( MWAWInputStreamPtr  input,
std::string const &  oleName,
libmwaw::DebugFile ascii 
)
staticprotected

the "MM" small structure : seems to contain the file versions

Referenced by parse().

bool MWAWOLEParser::readObjInfo ( MWAWInputStreamPtr  input,
std::string const &  oleName,
libmwaw::DebugFile ascii 
)
staticprotected

the "ObjInfo" small structure : seems to contain 3 ints=0,3,4

Referenced by parse().

bool MWAWOLEParser::readOle ( MWAWInputStreamPtr  ip,
std::string const &  oleName,
libmwaw::DebugFile ascii 
)
staticprotected

the "Ole" small structure : unknown contain

Referenced by parse().

bool MWAWOLEParser::readOle10Native ( MWAWInputStreamPtr  ip,
librevenge::RVNGBinaryData &  data,
libmwaw::DebugFile ascii 
)
staticprotected

extracts the picture if it is possible

Referenced by parse().

bool MWAWOLEParser::readOlePres ( MWAWInputStreamPtr  ip,
librevenge::RVNGBinaryData &  data,
MWAWPosition pos,
libmwaw::DebugFile ascii 
)
staticprotected

extracts the picture of OlePres001 if it is possible

Referenced by parse().

void MWAWOLEParser::setObject ( int  id,
librevenge::RVNGBinaryData const &  obj,
MWAWPosition const &  pos,
std::string const &  type 
)

sets an object just in case, the external parsing find another representation

Member Data Documentation

std::string MWAWOLEParser::m_avoidOLE
protected

if filled, does not parse content with this name

Referenced by parse().

shared_ptr<MWAWOLEParserInternal::CompObj> MWAWOLEParser::m_compObjIdName
protected

a smart ptr used to stored the list of compobj id->name

Referenced by parse(), and readCompObj().

std::vector<librevenge::RVNGBinaryData> MWAWOLEParser::m_objects
protected

list of pictures read

Referenced by getObject(), getObjects(), parse(), and setObject().

std::vector<int> MWAWOLEParser::m_objectsId
protected

list of pictures id

Referenced by getObject(), getObjectsId(), parse(), and setObject().

std::vector<MWAWPosition> MWAWOLEParser::m_objectsPosition
protected

list of picture size ( if known)

Referenced by getObject(), getObjectsPosition(), parse(), and setObject().

std::vector<std::string> MWAWOLEParser::m_objectsType
protected

list of picture type

Referenced by getObject(), getObjectsType(), parse(), and setObject().

std::vector<std::string> MWAWOLEParser::m_unknownOLEs
protected

list of ole which can not be parsed

Referenced by getNotParse(), and parse().


The documentation for this class was generated from the following files:

Generated on Thu Jul 9 2015 20:26:39 for libmwaw by doxygen 1.8.8