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, std::function< int(std::string const &)> const &dirToIdFunc=getIdFromDirectory) | |
constructor More... | |
~WPSOLEParser () | |
destructor More... | |
bool | parse (RVNGInputStreamPtr fileInput) |
tries to parse basic OLE (excepted mainName) More... | |
std::vector< std::string > const & | getNotParse () const |
returns the list of unknown ole More... | |
std::map< int, WPSEmbeddedObject > const & | getObjectsMap () const |
returns the list of data positions which have been read More... | |
Protected Member Functions | |
bool | readCompObj (RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii) |
the "CompObj" contains : UserType,ClipName,ProgIdName More... | |
Static Protected Member Functions | |
static bool | readOle (RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii) |
the "Ole" small structure : unknown contain More... | |
static bool | readMM (RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii) |
the "MM" small structure : seems to contain the file versions More... | |
static bool | readObjInfo (RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii) |
the "ObjInfo" small structure : seems to contain 3 ints=0,3,4 More... | |
static bool | isOlePres (RVNGInputStreamPtr &ip, std::string const &oleName) |
the OlePres001 seems to contain standart picture file and size More... | |
static bool | readOlePres (RVNGInputStreamPtr &ip, WPSEmbeddedObject &obj, libwps::DebugFile &ascii) |
extracts the picture of OlePres001 if it is possible More... | |
static bool | isOle10Native (RVNGInputStreamPtr &ip, std::string const &oleName) |
theOle10Native : basic Windows' picture, with no size More... | |
static bool | readOle10Native (RVNGInputStreamPtr &ip, WPSEmbeddedObject &obj, libwps::DebugFile &ascii) |
extracts the picture if it is possible More... | |
static bool | readContents (RVNGInputStreamPtr &input, std::string const &oleName, WPSEmbeddedObject &obj, 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 More... | |
static bool | readCONTENTS (RVNGInputStreamPtr &input, std::string const &oleName, WPSEmbeddedObject &obj, libwps::DebugFile &ascii) |
the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same header)... More... | |
static bool | readMN0AndCheckWKS (RVNGInputStreamPtr &input, std::string const &oleName, WPSEmbeddedObject &obj, libwps::DebugFile &ascii) |
the "MN0" small structure : can contains a WKS file... More... | |
static int | getIdFromDirectory (std::string const &dirName) |
the default function which uses the last integer of dirName to return the final id, ie. More... | |
Protected Attributes | |
std::function< int(std::string const &)> | m_directoryToIdFunction |
the function used to convert a directory name in a id More... | |
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::map< int, WPSEmbeddedObject > | m_idToObjectMap |
map id to object More... | |
std::shared_ptr< WPSOLEParserInternal::CompObj > | m_compObjIdName |
a smart ptr used to stored the list of compobj id->name More... | |
a class used to parse some basic oles Tries to read the different ole parts and stores their contents in form of picture.
|
explicit |
constructor
mainName | name of the main ole, we must avoid to parse |
WPSOLEParser::~WPSOLEParser | ( | ) |
destructor
|
staticprotected |
the default function which uses the last integer of dirName to return the final id, ie.
it converts "MatOST/MatadorObject1", "Object 1" in 1
|
inline |
returns the list of unknown ole
Referenced by WPS8Parser::createOLEStructures(), and WPS4Parser::createOLEStructures().
|
inline |
returns the list of data positions which have been read
Referenced by WPS8Parser::createOLEStructures(), and WPS4Parser::createOLEStructures().
|
staticprotected |
theOle10Native : basic Windows' picture, with no size
Referenced by parse(), and readOle10Native().
|
staticprotected |
the OlePres001 seems to contain standart picture file and size
Referenced by parse(), and readOlePres().
bool WPSOLEParser::parse | ( | RVNGInputStreamPtr | fileInput | ) |
tries to parse basic OLE (excepted mainName)
Referenced by WPS8Parser::createOLEStructures(), WPS4Parser::createOLEStructures(), and QuattroParser::readOLEZones().
|
protected |
the "CompObj" contains : UserType,ClipName,ProgIdName
Referenced by parse().
|
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().
|
staticprotected |
the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same header)...
Referenced by parse().
|
staticprotected |
the "MM" small structure : seems to contain the file versions
Referenced by parse().
|
staticprotected |
the "MN0" small structure : can contains a WKS file...
Referenced by parse().
|
staticprotected |
the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
Referenced by parse().
|
staticprotected |
the "Ole" small structure : unknown contain
Referenced by parse().
|
staticprotected |
extracts the picture if it is possible
Referenced by parse().
|
staticprotected |
extracts the picture of OlePres001 if it is possible
Referenced by parse().
|
protected |
if filled, does not parse content with this name
Referenced by parse().
|
protected |
a smart ptr used to stored the list of compobj id->name
Referenced by parse(), and readCompObj().
|
protected |
the function used to convert a directory name in a id
Referenced by parse().
|
protected |
map id to object
Referenced by getObjectsMap(), and parse().
|
protected |
list of ole which can not be parsed
Referenced by getNotParse(), and parse().