Go to the documentation of this file.
63 #ifndef MWAW_OLE_PARSER_H
64 #define MWAW_OLE_PARSER_H
69 #include <librevenge-stream/librevenge-stream.h>
102 void updateMetaData(librevenge::RVNGPropertyList &metaData)
const;
106 std::vector<std::string>
const &
getNotParse()
const;
112 std::vector<librevenge::RVNGBinaryData>
const &
getObjects()
const;
123 std::string
const &type);
128 int &encoding, librevenge::RVNGPropertyList &pList,
183 std::shared_ptr<MWAWOLEParserInternal::State>
m_state;
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
std::vector< MWAWPosition > m_objectsPosition
list of picture size ( if known)
Definition: MWAWOLEParser.cxx:232
bool getObject(int id, librevenge::RVNGBinaryData &obj, MWAWPosition &pos, std::string &type) const
returns the picture corresponding to an id
Definition: MWAWOLEParser.cxx:293
static bool readMM(MWAWInputStreamPtr input, std::string const &oleName, libmwaw::DebugFile &ascii)
the "MM" small structure : seems to contain the file versions
Definition: MWAWOLEParser.cxx:596
MWAWVec2f const & naturalSize() const
returns the natural size (if known)
Definition: MWAWPosition.hxx:140
bool readSummaryPropertyString(MWAWInputStreamPtr input, long endPos, int type, librevenge::RVNGString &string, libmwaw::DebugStream &f) const
try to read a summary property: type 1e
Definition: MWAWOLEParser.cxx:911
float getInvUnitScale(librevenge::RVNGUnit fromUnit) const
returns a float which can be used to scale some data in object unit
Definition: MWAWPosition.hxx:199
std::shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition: libmwaw_internal.hxx:543
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::vector< std::string > const & getNotParse() const
returns the list of unknown ole
Definition: MWAWOLEParser.cxx:268
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
std::shared_ptr< MWAWOLEParserInternal::CompObj > m_compObjIdName
a smart ptr used to stored the list of compobj id->name
Definition: MWAWOLEParser.cxx:239
static bool readOlePres(MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data, MWAWPosition &pos, libmwaw::DebugFile &ascii)
extracts the picture of OlePres001 if it is possible
Definition: MWAWOLEParser.cxx:1132
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
bool readSummaryPropertyLong(MWAWInputStreamPtr input, long endPos, int type, long &value, libmwaw::DebugStream &f) const
try to read a summary property: type 2,3,9,12,
Definition: MWAWOLEParser.cxx:943
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
static bool isOlePres(MWAWInputStreamPtr ip, std::string const &oleName)
the OlePres001 seems to contain standart picture file and size
Definition: MWAWOLEParser.cxx:1087
void setUnit(librevenge::RVNGUnit newUnit)
sets the dimension unit
Definition: MWAWPosition.hxx:225
CompObj()
the constructor
Definition: MWAWOLEParser.cxx:59
std::vector< librevenge::RVNGBinaryData > m_objects
list of pictures read
Definition: MWAWOLEParser.cxx:230
std::vector< MWAWPosition > const & getObjectsPosition() const
returns the list of data positions which have been read
Definition: MWAWOLEParser.cxx:278
void setObject(int id, librevenge::RVNGBinaryData const &obj, MWAWPosition const &pos, std::string const &type)
sets an object just in case, the external parsing find another representation
Definition: MWAWOLEParser.cxx:306
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
bool readCONTENTS(MWAWInputStreamPtr input, std::string const &oleName, librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii)
the CONTENTS : seems to store a header size, the header and then a object in EMF (with the same heade...
Definition: MWAWOLEParser.cxx:1384
std::string m_dir
the directory
Definition: MWAWOLEParser.cxx:199
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:220
std::string m_avoidOLE
if filled, does not parse content with this name
Definition: MWAWOLEParser.hxx:181
bool readSummaryInformation(MWAWInputStreamPtr input, std::string const &oleName, int &encoding, librevenge::RVNGPropertyList &pList, libmwaw::DebugFile &ascii) const
the summary information and the doc summary information
Definition: MWAWOLEParser.cxx:772
Internal: internal method to compobj definition.
Definition: MWAWOLEParser.cxx:56
int m_encoding
the font encoding
Definition: MWAWOLEParser.cxx:223
std::vector< std::string > m_objectsType
list of picture type
Definition: MWAWOLEParser.cxx:236
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
static bool isOle10Native(MWAWInputStreamPtr ip, std::string const &oleName)
theOle10Native : basic Windows© picture, with no size
Definition: MWAWOLEParser.cxx:1233
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
T y() const
second element
Definition: libmwaw_internal.hxx:673
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
std::vector< int > const & getObjectsId() const
returns the list of id for which we have find a representation
Definition: MWAWOLEParser.cxx:273
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
State(MWAWFontConverterPtr const &fontConverter, int fId)
constructor
Definition: MWAWOLEParser.cxx:205
bool readContents(MWAWInputStreamPtr input, std::string const &oleName, librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii)
the Contents : in general a picture : a PNG, an JPEG, a basic metafile, I find also a Word art pictur...
Definition: MWAWOLEParser.cxx:1287
T x() const
first element
Definition: libmwaw_internal.hxx:668
void updateMetaData(librevenge::RVNGPropertyList &metaData) const
update the meta data, using information find in SummaryInformation
Definition: MWAWOLEParser.cxx:259
char const * getCLSName(unsigned long v)
return the CLS Name corresponding to an identifier
Definition: MWAWOLEParser.cxx:66
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
std::vector< librevenge::RVNGBinaryData > const & getObjects() const
returns the list of data which have been read
Definition: MWAWOLEParser.cxx:283
std::map< unsigned long, char const * > m_mapCls
map CLSId <-> name
Definition: MWAWOLEParser.cxx:74
int m_fontId
the font id used to decode string
Definition: MWAWOLEParser.cxx:221
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
std::vector< std::string > const & getObjectsType() const
returns the list of data type
Definition: MWAWOLEParser.cxx:288
void initCLSMap()
initialise a map CLSId <-> name
Definition: MWAWOLEParser.cxx:77
~MWAWOLEParser()
destructor
Definition: MWAWOLEParser.cxx:250
bool readCompObj(MWAWInputStreamPtr ip, std::string const &oleName, libmwaw::DebugFile &ascii)
the "CompObj" contains : UserType,ClipName,ProgIdName
Definition: MWAWOLEParser.cxx:652
bool readSummaryProperty(MWAWInputStreamPtr input, long endPos, int type, libmwaw::DebugFile &ascii, libmwaw::DebugStream &f) const
try to read a summary property
Definition: MWAWOLEParser.cxx:968
int getFontEncoding() const
returns the font encoding find in SummaryInformation or -1
Definition: MWAWOLEParser.cxx:254
@ Char
Definition: MWAWPosition.hxx:51
std::vector< std::string > m_unknownOLEs
list of ole which can not be parsed
Definition: MWAWOLEParser.cxx:227
static bool readObjInfo(MWAWInputStreamPtr input, std::string const &oleName, libmwaw::DebugFile &ascii)
the "ObjInfo" small structure : seems to contain 3 ints=0,3,4
Definition: MWAWOLEParser.cxx:575
Low level: namespace used to define/store the data used by MWAWOLEParser.
Definition: MWAWOLEParser.cxx:53
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
static bool readOle10Native(MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data, libmwaw::DebugFile &ascii)
extracts the picture if it is possible
Definition: MWAWOLEParser.cxx:1249
int m_subId
subsversion id
Definition: MWAWOLEParser.cxx:198
Internal: internal state of a MWAWOLEParser.
Definition: MWAWOLEParser.cxx:203
MWAWFontConverterPtr m_fontConverter
the font converter
Definition: MWAWOLEParser.cxx:219
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::string m_name
the complete name
Definition: MWAWOLEParser.cxx:199
MWAWOLEParser(std::string const &mainName, MWAWFontConverterPtr const &fontConverter, int fontId)
constructor
Definition: MWAWOLEParser.cxx:244
librevenge::RVNGUnit unit() const
returns the unit
Definition: MWAWPosition.hxx:155
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
librevenge::RVNGPropertyList m_metaData
the meta data
Definition: MWAWOLEParser.cxx:225
std::string m_base
the base
Definition: MWAWOLEParser.cxx:199
Internal: internal method to keep ole definition.
Definition: MWAWOLEParser.cxx:189
static bool readOle(MWAWInputStreamPtr ip, std::string const &oleName, libmwaw::DebugFile &ascii)
the "Ole" small structure : unknown contain
Definition: MWAWOLEParser.cxx:542
std::vector< int > m_objectsId
list of pictures id
Definition: MWAWOLEParser.cxx:234
std::shared_ptr< MWAWOLEParserInternal::State > m_state
the main state
Definition: MWAWOLEParser.hxx:183
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
int m_id
main id
Definition: MWAWOLEParser.cxx:198
OleDef()
Definition: MWAWOLEParser.cxx:190
bool parse(MWAWInputStreamPtr fileInput)
tries to parse basic OLE (excepted mainName)
Definition: MWAWOLEParser.cxx:323
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20