Go to the documentation of this file.
55 #ifndef WPS_OLE_PARSER_H
56 #define WPS_OLE_PARSER_H
63 #include <librevenge-stream/librevenge-stream.h>
101 void updateMetaData(librevenge::RVNGPropertyList &metaData)
const;
104 std::vector<std::string>
const &
getNotParse()
const;
106 std::map<int,WPSEmbeddedObject>
const &
getObjectsMap()
const;
111 librevenge::RVNGPropertyList &pList,
171 std::shared_ptr<WPSOLEParserInternal::State>
m_state;
std::string m_name
the complete name
Definition: WPSOLEParser.cpp:231
std::string m_avoidOLE
if filled, does not parse content with this name
Definition: WPSOLEParser.h:169
static std::string str()
Definition: WPSDebug.h:200
static bool open(std::string const &)
Definition: WPSDebug.h:215
std::map< unsigned long, char const * > m_mapCls
map CLSId <-> name
Definition: WPSOLEParser.cpp:107
static void addPos(long)
Definition: WPSDebug.h:220
bool readCompObj(RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii)
the "CompObj" contains : UserType,ClipName,ProgIdName
Definition: WPSOLEParser.cpp:545
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
libwps_tools_win::Font::Type m_fontType
the default font type
Definition: WPSOLEParser.cpp:248
std::map< int, WPSEmbeddedObject > const & getObjectsMap() const
returns the list of data positions which have been read
Definition: WPSOLEParser.cpp:281
Definition: libwps_internal.cpp:39
char const * getCLSName(unsigned long v)
return the CLS Name corresponding to an identifier
Definition: WPSOLEParser.cpp:99
std::vector< std::string > const & getNotParse() const
returns the list of unknown ole
Definition: WPSOLEParser.cpp:276
static void reset()
Definition: WPSDebug.h:224
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: WPSOLEParser.h:86
static void skipZone(long, long)
Definition: WPSDebug.h:226
bool readSummaryInformation(RVNGInputStreamPtr input, std::string const &oleName, librevenge::RVNGPropertyList &pList, libwps::DebugFile &ascii) const
the summary information and the doc summary information
Definition: WPSOLEParser.cpp:1160
Internal: internal method to keep ole definition.
Definition: WPSOLEParser.cpp:224
std::function< int(std::string const &)> m_directoryToIdFunction
the function used to convert a directory name in a id
Definition: WPSOLEParser.cpp:250
static bool readOlePres(RVNGInputStreamPtr &ip, WPSEmbeddedObject &obj, libwps::DebugFile &ascii)
extracts the picture of OlePres001 if it is possible
Definition: WPSOLEParser.cpp:720
std::map< int, WPSEmbeddedObject > m_idToObjectMap
map id to object
Definition: WPSOLEParser.cpp:256
Vec2f m_size
the picture size in inches(if known)
Definition: libwps_internal.h:1120
bool parse(RVNGInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: WPSOLEParser.cpp:318
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
static bool readOle(RVNGInputStreamPtr &ip, std::string const &oleName, libwps::DebugFile &ascii)
the "Ole" small structure : unknown contain
Definition: WPSOLEParser.cpp:433
static int getIdFromDirectory(std::string const &dirName)
the default function which uses the last integer of dirName to return the final id,...
Definition: WPSOLEParser.cpp:295
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
std::shared_ptr< WPSOLEParserInternal::CompObj > m_compObjIdName
a smart ptr used to stored the list of compobj id->name
Definition: WPSOLEParser.cpp:259
static bool readSummaryPropertyLong(RVNGInputStreamPtr input, long endPos, int type, long &value, libwps::DebugStream &f)
try to read a summary property: type 2,3,9,12,
Definition: WPSOLEParser.cpp:1336
std::shared_ptr< WPSOLEParserInternal::State > m_state
the main state
Definition: WPSOLEParser.h:171
Internal: the state of a WPSOLEParser.
Definition: WPSOLEParser.cpp:236
static bool isOlePres(RVNGInputStreamPtr &ip, std::string const &oleName)
the OlePres001 seems to contain standart picture file and size
Definition: WPSOLEParser.cpp:675
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
bool readSummaryProperty(RVNGInputStreamPtr input, long endPos, int type, libwps::DebugFile &ascii, libwps::DebugStream &f) const
try to read a summary property
Definition: WPSOLEParser.cpp:1362
static void addNote(char const *)
Definition: WPSDebug.h:221
static bool isOle10Native(RVNGInputStreamPtr &ip, std::string const &oleName)
theOle10Native : basic Windows' picture, with no size
Definition: WPSOLEParser.cpp:833
static bool readObjInfo(RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii)
the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
Definition: WPSOLEParser.cpp:468
@ WPS_SPREADSHEET
Definition: WPSDocument.h:62
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
bool isEmpty() const
return true if the picture contains no data
Definition: libwps_internal.h:1095
void add(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
add a picture
Definition: libwps_internal.h:1105
OleDef()
Definition: WPSOLEParser.cpp:225
small class use to define a embedded object
Definition: libwps_internal.h:1077
Definition: WPSDebug.h:192
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
State(libwps_tools_win::Font::Type fontType, std::function< int(std::string const &)> const &dirToIdFunc)
constructor
Definition: WPSOLEParser.cpp:238
WPSOLEParser(const std::string &mainName, libwps_tools_win::Font::Type fontType, std::function< int(std::string const &)> const &dirToIdFunc=getIdFromDirectory)
constructor
Definition: WPSOLEParser.cpp:264
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 pictur...
Definition: WPSOLEParser.cpp:893
void updateMetaData(librevenge::RVNGPropertyList &metaData) const
update the meta data, using information find in SummaryInformation
Definition: WPSOLEParser.cpp:285
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:332
std::string m_dir
the directory
Definition: WPSOLEParser.cpp:231
int m_id
main id
Definition: WPSOLEParser.cpp:230
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 heade...
Definition: WPSOLEParser.cpp:1015
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
~WPSOLEParser()
destructor
Definition: WPSOLEParser.cpp:271
static bool readOle10Native(RVNGInputStreamPtr &ip, WPSEmbeddedObject &obj, libwps::DebugFile &ascii)
extracts the picture if it is possible
Definition: WPSOLEParser.cpp:849
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
bool readDataToEnd(RVNGInputStreamPtr &input, librevenge::RVNGBinaryData &data)
try to read the last bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:346
void initCLSMap()
initialise a map CLSId <-> name
Definition: WPSOLEParser.cpp:110
Definition: WPSOLEParser.cpp:86
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
static bool readMM(RVNGInputStreamPtr &input, std::string const &oleName, libwps::DebugFile &ascii)
the "MM" small structure : seems to contain the file versions
Definition: WPSOLEParser.cpp:489
std::vector< std::string > m_unknownOLEs
list of ole which can not be parsed
Definition: WPSOLEParser.cpp:254
std::string m_base
the base name
Definition: WPSOLEParser.cpp:231
CompObj()
the constructor
Definition: WPSOLEParser.cpp:92
Internal: internal method to compobj definition.
Definition: WPSOLEParser.cpp:89
static bool readMN0AndCheckWKS(RVNGInputStreamPtr &input, std::string const &oleName, WPSEmbeddedObject &obj, libwps::DebugFile &ascii)
the "MN0" small structure : can contains a WKS file...
Definition: WPSOLEParser.cpp:1132
Definition: WPSDebug.h:208
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: WPSOLEParser.cpp:252
bool readSummaryPropertyString(RVNGInputStreamPtr input, long endPos, int type, librevenge::RVNGString &string, libwps::DebugStream &f) const
try to read a summary property: type 1e
Definition: WPSOLEParser.cpp:1306
Generated on Sat Sep 5 2020 04:52:14 for libwps by
doxygen 1.8.20