STOFFOLEParser 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 <STOFFOLEParser.hxx>`

## Classes

struct | OleContent
| structure use to store an object content More...
struct | OleDirectory
| Internal: internal method to keep ole directory and their content. More...

## Public Member Functions

| STOFFOLEParser ()
| constructor
| ~STOFFOLEParser ()
| destructor
bool | parse (STOFFInputStreamPtr fileInput)
| tries to parse basic OLE (excepted mainName)
std::vector< std::shared_ptr< OleDirectory > > & | getDirectoryList ()
| returns the list of directory ole
std::shared_ptr< OleDirectory > | getDirectory (std::string const &dir)
| returns a OleDirectory corresponding to a dir if found
bool | getCompObjName (STOFFInputStreamPtr fileInput, std::string &programName)
| returns the main compobj program name

## Protected Member Functions

bool | readCompObj (STOFFInputStreamPtr ip, OleDirectory &directory)
| parse the "CompObj" contains : UserType,ClipName,ProgIdName
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 picture, which are not sucefull read
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 header)...

## Static Protected Member Functions

static bool | readSummaryInformation (STOFFInputStreamPtr input, std::string const &oleName, libstoff::DebugFile &ascii)
| the summary information
static bool | readOle (STOFFInputStreamPtr ip, std::string const &oleName, libstoff::DebugFile &ascii)
| the "Ole" small structure : unknown contain
static bool | readObjInfo (STOFFInputStreamPtr input, std::string const &oleName, libstoff::DebugFile &ascii)
| the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
static bool | isOlePres (STOFFInputStreamPtr ip, std::string const &oleName)
| the OlePres001 seems to contain standart picture file and size
static bool | readOlePres (STOFFInputStreamPtr ip, OleContent &content)
| extracts the picture of OlePres001 if it is possible.
static bool | isOle10Native (STOFFInputStreamPtr ip, std::string const &oleName)
| theOle10Native : basic Windows© picture, with no size
static bool | readOle10Native (STOFFInputStreamPtr ip, OleContent &content)
| extracts the picture if it is possible.

## Protected Attributes

std::shared_ptr< STOFFOLEParserInternal::State > | m_state
| the class state

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

## STOFFOLEParser()

STOFFOLEParser::STOFFOLEParser | ( |  | ) |

constructor

## ~STOFFOLEParser()

STOFFOLEParser::~STOFFOLEParser | ( |  | ) |

destructor

## Member Function Documentation

## getCompObjName()

bool STOFFOLEParser::getCompObjName | ( | STOFFInputStreamPtr | fileInput,
|  | std::string & | programName )

returns the main compobj program name

Referenced by SDAParser::checkHeader().

## getDirectory()

std::shared_ptr< STOFFOLEParser::OleDirectory > STOFFOLEParser::getDirectory | ( | std::string const & | dir | ) |

returns a OleDirectory corresponding to a dir if found

## getDirectoryList()

std::vector< std::shared_ptr< STOFFOLEParser::OleDirectory > > & STOFFOLEParser::getDirectoryList | ( |  | ) |

returns the list of directory ole

## isOle10Native()

bool STOFFOLEParser::isOle10Native | ( | STOFFInputStreamPtr | ip,
|  | std::string const & | oleName )

static protected

theOle10Native : basic Windows© picture, with no size

Referenced by parse(), and readOle10Native().

## isOlePres()

bool STOFFOLEParser::isOlePres | ( | STOFFInputStreamPtr | ip,
|  | std::string const & | oleName )

static protected

the OlePres001 seems to contain standart picture file and size

Referenced by parse(), and readOlePres().

## parse()

bool STOFFOLEParser::parse | ( | STOFFInputStreamPtr | fileInput | ) |

tries to parse basic OLE (excepted mainName)

Returns
  false if fileInput is not an Ole file

## readCompObj()

bool STOFFOLEParser::readCompObj | ( | STOFFInputStreamPtr | ip,
|  | STOFFOLEParser::OleDirectory & | directory )

protected

parse the "CompObj" contains : UserType,ClipName,ProgIdName

Referenced by getCompObjName(), and parse().

## readCONTENTS()

bool STOFFOLEParser::readCONTENTS | ( | STOFFInputStreamPtr | input,
|  | STOFFOLEParser::OleContent & | content )

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

## readContents()

bool STOFFOLEParser::readContents | ( | STOFFInputStreamPtr | input,
|  | STOFFOLEParser::OleContent & | content )

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

## readObjInfo()

bool STOFFOLEParser::readObjInfo | ( | STOFFInputStreamPtr | input,
|  | std::string const & | oleName,
|  | libstoff::DebugFile & | ascii )

static protected

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

Referenced by parse().

## readOle()

bool STOFFOLEParser::readOle | ( | STOFFInputStreamPtr | ip,
|  | std::string const & | oleName,
|  | libstoff::DebugFile & | ascii )

static protected

the "Ole" small structure : unknown contain

Referenced by parse().

## readOle10Native()

bool STOFFOLEParser::readOle10Native | ( | STOFFInputStreamPtr | ip,
|  | STOFFOLEParser::OleContent & | content )

static protected

extracts the picture if it is possible.

Note
  it does not set the image position

Referenced by parse().

## readOlePres()

bool STOFFOLEParser::readOlePres | ( | STOFFInputStreamPtr | ip,
|  | STOFFOLEParser::OleContent & | content )

static protected

extracts the picture of OlePres001 if it is possible.

Note
  it only sets the image size with setNaturalSize.

Referenced by parse().

## readSummaryInformation()

bool STOFFOLEParser::readSummaryInformation | ( | STOFFInputStreamPtr | input,
|  | std::string const & | oleName,
|  | libstoff::DebugFile & | ascii )

static protected

the summary information

Referenced by parse().

## Member Data Documentation

## m_state

std::shared_ptr<STOFFOLEParserInternal::State> STOFFOLEParser::m_state

protected

the class state

Referenced by getDirectory(), getDirectoryList(), parse(), readCompObj(), and STOFFOLEParser().

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

- STOFFOLEParser.hxx
- STOFFOLEParser.cxx