WPSOLEParser Class Reference documentation

WPSOLEParser 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 <WPSOLEParser.h>`

## Public Member Functions
| WPSOLEParser (const std::string &mainName)
| constructor
| ~WPSOLEParser ()
| destructor
bool | parse (RVNGInputStreamPtr fileInput)
| tries to parse basic OLE (excepted mainName)
std::vector< std::string > const & | getNotParse () const
| returns the list of unknown ole
std::vector< int > const & | getObjectsId () const
| returns the list of id for which we have find a representation
std::vector< WPSOLEParserObject > const & | getObjects () const
| returns the list of data positions which have been read

## Protected Member Functions
bool | readCompObj (RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii)
| the "CompObj" contains : UserType,ClipName,ProgIdName

## Static Protected Member Functions
static bool | readOle (RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii)
| the "Ole" small structure : unknown contain
static bool | readMM (RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii)
| the "MM" small structure : seems to contain the file versions
static bool | readObjInfo (RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii)
| the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
static bool | isOlePres (RVNGInputStreamPtr &ip, std::string const &oleName)
| the OlePres001 seems to contain standart picture file and size
static bool | readOlePres (RVNGInputStreamPtr &ip, librevenge::RVNGBinaryData &data, WPSPosition &pos, libwps::DebugFile &ascii)
| extracts the picture of OlePres001 if it is possible
static bool | isOle10Native (RVNGInputStreamPtr &ip, std::string const &oleName)
| theOle10Native : basic Windows' picture, with no size
static bool | readOle10Native (RVNGInputStreamPtr &ip, librevenge::RVNGBinaryData &data, libwps::DebugFile &ascii)
| extracts the picture if it is possible
static bool | readContents (RVNGInputStreamPtr &input, std::string const &oleName, librevenge::RVNGBinaryData &pict, WPSPosition &pos, libwps::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 sucefully read
static bool | readCONTENTS (RVNGInputStreamPtr &input, std::string const &oleName, librevenge::RVNGBinaryData &pict, WPSPosition &pos, libwps::DebugFile &ascii)
| the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same header)...
static bool | readMN0AndCheckWKS (RVNGInputStreamPtr &input, std::string const &oleName, librevenge::RVNGBinaryData &wksData, libwps::DebugFile &ascii)
| the "MN0" small structure : can contains a WKS file...

## Protected Attributes
std::string | m_avoidOLE
| if filled, does not parse content with this name
std::vector< std::string > | m_unknownOLEs
| list of ole which can not be parsed
std::vector< WPSOLEParserObject > | m_objects
| list of pictures read
std::vector< int > | m_objectsId
| list of pictures id
shared_ptr< WPSOLEParserInternal::CompObj > | m_compObjIdName
| a smart ptr used to stored the list of compobj id->name

## 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

## ◆ WPSOLEParser()

WPSOLEParser::WPSOLEParser | ( | const std::string & | mainName | ) |
| explicit

constructor

Parameters

  mainName | name of the main ole, we must avoid to parse

## ◆ ~WPSOLEParser()

WPSOLEParser::~WPSOLEParser | ( |  | ) |

destructor

## Member Function Documentation

## ◆ getNotParse()

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

returns the list of unknown ole

Referenced by WPS4Parser::createOLEStructures(), and WPS8Parser::createOLEStructures().

## ◆ getObjects()

std::vector< WPSOLEParserObject > const & WPSOLEParser::getObjects | ( |  | ) | const
| inline

returns the list of data positions which have been read

Referenced by WPS4Parser::createOLEStructures(), and WPS8Parser::createOLEStructures().

## ◆ getObjectsId()

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

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

Referenced by WPS4Parser::createOLEStructures(), and WPS8Parser::createOLEStructures().

## ◆ isOle10Native()

bool WPSOLEParser::isOle10Native | ( | RVNGInputStreamPtr & | ip,
|  | std::string const & | oleName )
| staticprotected

theOle10Native : basic Windows' picture, with no size

Referenced by parse(), and readOle10Native().

## ◆ isOlePres()

bool WPSOLEParser::isOlePres | ( | RVNGInputStreamPtr & | ip,
|  | std::string const & | oleName )
| staticprotected

the OlePres001 seems to contain standart picture file and size

Referenced by parse(), and readOlePres().

## ◆ parse()

bool WPSOLEParser::parse | ( | RVNGInputStreamPtr | fileInput | ) |

tries to parse basic OLE (excepted mainName)

Returns
  false if fileInput is not an Ole file

Referenced by WPS4Parser::createOLEStructures(), and WPS8Parser::createOLEStructures().

## ◆ readCompObj()

bool WPSOLEParser::readCompObj | ( | RVNGInputStreamPtr & | ip,
|  | std::string const & | oleName,
|  | libwps::DebugFile & | ascii )
| protected

the "CompObj" contains : UserType,ClipName,ProgIdName

Referenced by parse().

## ◆ readCONTENTS()

bool WPSOLEParser::readCONTENTS | ( | RVNGInputStreamPtr & | input,
|  | std::string const & | oleName,
|  | librevenge::RVNGBinaryData & | pict,
|  | WPSPosition & | pos,
|  | libwps::DebugFile & | ascii )
| staticprotected

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().

## ◆ readContents()

bool WPSOLEParser::readContents | ( | RVNGInputStreamPtr & | input,
|  | std::string const & | oleName,
|  | librevenge::RVNGBinaryData & | pict,
|  | WPSPosition & | pos,
|  | libwps::DebugFile & | ascii )
| staticprotected

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

Referenced by parse().

## ◆ readMM()

bool WPSOLEParser::readMM | ( | RVNGInputStreamPtr & | input,
|  | std::string const & | oleName,
|  | libwps::DebugFile & | ascii )
| staticprotected

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

Referenced by parse().

## ◆ readMN0AndCheckWKS()

bool WPSOLEParser::readMN0AndCheckWKS | ( | RVNGInputStreamPtr & | input,
|  | std::string const & | oleName,
|  | librevenge::RVNGBinaryData & | wksData,
|  | libwps::DebugFile & | ascii )
| staticprotected

the "MN0" small structure : can contains a WKS file...

Referenced by parse().

## ◆ readObjInfo()

bool WPSOLEParser::readObjInfo | ( | RVNGInputStreamPtr & | input,
|  | std::string const & | oleName,
|  | libwps::DebugFile & | ascii )
| staticprotected

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

Referenced by parse().

## ◆ readOle()

bool WPSOLEParser::readOle | ( | RVNGInputStreamPtr & | ip,
|  | std::string const & | oleName,
|  | libwps::DebugFile & | ascii )
| staticprotected

the "Ole" small structure : unknown contain

Referenced by parse().

## ◆ readOle10Native()

bool WPSOLEParser::readOle10Native | ( | RVNGInputStreamPtr & | ip,
|  | librevenge::RVNGBinaryData & | data,
|  | libwps::DebugFile & | ascii )
| staticprotected

extracts the picture if it is possible

Referenced by parse().

## ◆ readOlePres()

bool WPSOLEParser::readOlePres | ( | RVNGInputStreamPtr & | ip,
|  | librevenge::RVNGBinaryData & | data,
|  | WPSPosition & | pos,
|  | libwps::DebugFile & | ascii )
| staticprotected

extracts the picture of OlePres001 if it is possible

Referenced by parse().

## Member Data Documentation

## ◆ m_avoidOLE

std::string WPSOLEParser::m_avoidOLE
| protected

if filled, does not parse content with this name

Referenced by parse(), and WPSOLEParser().

## ◆ m_compObjIdName

shared_ptr<WPSOLEParserInternal::CompObj> WPSOLEParser::m_compObjIdName
| protected

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

Referenced by parse(), readCompObj(), and WPSOLEParser().

## ◆ m_objects

std::vector<WPSOLEParserObject> WPSOLEParser::m_objects
| protected

list of pictures read

Referenced by getObjects(), parse(), and WPSOLEParser().

## ◆ m_objectsId

std::vector<int> WPSOLEParser::m_objectsId
| protected

list of pictures id

Referenced by getObjectsId(), parse(), and WPSOLEParser().

## ◆ m_unknownOLEs

std::vector<std::string> WPSOLEParser::m_unknownOLEs
| protected

list of ole which can not be parsed

Referenced by getNotParse(), parse(), and WPSOLEParser().

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

- WPSOLEParser.h
- WPSOLEParser.cpp