Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 #ifndef MWAW_OLE_PARSER_H
00064 #define MWAW_OLE_PARSER_H
00065
00066 #include <string>
00067 #include <vector>
00068
00069 #include <libwpd-stream/libwpd-stream.h>
00070
00071 #include "libmwaw_internal.hxx"
00072 #include "MWAWInputStream.hxx"
00073
00074 #include "MWAWDebug.hxx"
00075
00076 class WPXBinaryData;
00077
00078 namespace MWAWOLEParserInternal
00079 {
00080 class CompObj;
00081 }
00082
00086 class MWAWOLEParser
00087 {
00088 public:
00091 MWAWOLEParser(std::string mainName);
00092
00094 ~MWAWOLEParser();
00095
00098 bool parse(MWAWInputStreamPtr fileInput);
00099
00101 std::vector<std::string> const &getNotParse() const {
00102 return m_unknownOLEs;
00103 }
00104
00106 std::vector<int> const &getObjectsId() const {
00107 return m_objectsId;
00108 }
00110 std::vector<MWAWPosition> const &getObjectsPosition() const {
00111 return m_objectsPosition;
00112 }
00114 std::vector<WPXBinaryData> const &getObjects() const {
00115 return m_objects;
00116 }
00118 std::vector<std::string> const &getObjectsType() const {
00119 return m_objectsType;
00120 }
00121
00123 bool getObject(int id, WPXBinaryData &obj, MWAWPosition &pos, std::string &type) const;
00124
00128 void setObject(int id, WPXBinaryData const &obj, MWAWPosition const &pos,
00129 std::string const &type);
00130
00131 protected:
00132
00134 static bool readOle(MWAWInputStreamPtr ip, std::string const &oleName,
00135 libmwaw::DebugFile &ascii);
00137 static bool readMM(MWAWInputStreamPtr input, std::string const &oleName,
00138 libmwaw::DebugFile &ascii);
00140 static bool readObjInfo(MWAWInputStreamPtr input, std::string const &oleName,
00141 libmwaw::DebugFile &ascii);
00143 bool readCompObj(MWAWInputStreamPtr ip, std::string const &oleName,
00144 libmwaw::DebugFile &ascii);
00145
00147 static bool isOlePres(MWAWInputStreamPtr ip, std::string const &oleName);
00149 static bool readOlePres(MWAWInputStreamPtr ip, WPXBinaryData &data, MWAWPosition &pos,
00150 libmwaw::DebugFile &ascii);
00151
00153 static bool isOle10Native(MWAWInputStreamPtr ip, std::string const &oleName);
00155 static bool readOle10Native(MWAWInputStreamPtr ip, WPXBinaryData &data,
00156 libmwaw::DebugFile &ascii);
00157
00161 bool readContents(MWAWInputStreamPtr input, std::string const &oleName,
00162 WPXBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii);
00163
00169 bool readCONTENTS(MWAWInputStreamPtr input, std::string const &oleName,
00170 WPXBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii);
00171
00172
00174 std::string m_avoidOLE;
00176 std::vector<std::string> m_unknownOLEs;
00177
00179 std::vector<WPXBinaryData> m_objects;
00181 std::vector<MWAWPosition> m_objectsPosition;
00183 std::vector<int> m_objectsId;
00185 std::vector<std::string> m_objectsType;
00186
00188 shared_ptr<MWAWOLEParserInternal::CompObj> m_compObjIdName;
00189
00190 };
00191
00192 #endif
00193