STOFFOLEParser Class Reference documentation

Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
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 More...
| ~STOFFOLEParser ()
| destructor More...
bool | parse (STOFFInputStreamPtr fileInput)
| tries to parse basic OLE (excepted mainName) More...
std::vector< std::shared_ptr< OleDirectory > > & | getDirectoryList ()
| returns the list of directory ole More...
std::shared_ptr< OleDirectory > | getDirectory (std::string const &dir)
| returns a OleDirectory corresponding to a dir if found More...
bool | getCompObjName (STOFFInputStreamPtr fileInput, std::string &programName)
| returns the main compobj program name More...

## Protected Member Functions
bool | readCompObj (STOFFInputStreamPtr ip, OleDirectory &directory)
| parse the "CompObj" contains : UserType,ClipName,ProgIdName More...
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 More...
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)... More...

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

## Protected Attributes
std::shared_ptr< STOFFOLEParserInternal::State > | m_state
| the class state 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

## ◆ 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
| ) |  |
| staticprotected

theOle10Native : basic Windows© picture, with no size

Referenced by parse(), and readOle10Native().

## ◆ isOlePres()

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

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

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

## ◆ readObjInfo()

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

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
| ) |  |
| staticprotected

the "Ole" small structure : unknown contain

Referenced by parse().

## ◆ readOle10Native()

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

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
| ) |  |
| staticprotected

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
| ) |  |
| staticprotected

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(), and readCompObj().

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

- STOFFOLEParser.hxx
- STOFFOLEParser.cxx