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 <librevenge-stream/librevenge-stream.h>
00070
00071 #include "libmwaw_internal.hxx"
00072 #include "MWAWInputStream.hxx"
00073
00074 #include "MWAWDebug.hxx"
00075
00076 namespace MWAWOLEParserInternal
00077 {
00078 class CompObj;
00079 }
00080
00084 class MWAWOLEParser
00085 {
00086 public:
00089 MWAWOLEParser(std::string mainName);
00090
00092 ~MWAWOLEParser();
00093
00096 bool parse(MWAWInputStreamPtr fileInput);
00097
00099 std::vector<std::string> const &getNotParse() const
00100 {
00101 return m_unknownOLEs;
00102 }
00103
00105 std::vector<int> const &getObjectsId() const
00106 {
00107 return m_objectsId;
00108 }
00110 std::vector<MWAWPosition> const &getObjectsPosition() const
00111 {
00112 return m_objectsPosition;
00113 }
00115 std::vector<librevenge::RVNGBinaryData> const &getObjects() const
00116 {
00117 return m_objects;
00118 }
00120 std::vector<std::string> const &getObjectsType() const
00121 {
00122 return m_objectsType;
00123 }
00124
00126 bool getObject(int id, librevenge::RVNGBinaryData &obj, MWAWPosition &pos, std::string &type) const;
00127
00131 void setObject(int id, librevenge::RVNGBinaryData const &obj, MWAWPosition const &pos,
00132 std::string const &type);
00133
00134 protected:
00135
00137 static bool readOle(MWAWInputStreamPtr ip, std::string const &oleName,
00138 libmwaw::DebugFile &ascii);
00140 static bool readMM(MWAWInputStreamPtr input, std::string const &oleName,
00141 libmwaw::DebugFile &ascii);
00143 static bool readObjInfo(MWAWInputStreamPtr input, std::string const &oleName,
00144 libmwaw::DebugFile &ascii);
00146 bool readCompObj(MWAWInputStreamPtr ip, std::string const &oleName,
00147 libmwaw::DebugFile &ascii);
00148
00150 static bool isOlePres(MWAWInputStreamPtr ip, std::string const &oleName);
00152 static bool readOlePres(MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data, MWAWPosition &pos,
00153 libmwaw::DebugFile &ascii);
00154
00156 static bool isOle10Native(MWAWInputStreamPtr ip, std::string const &oleName);
00158 static bool readOle10Native(MWAWInputStreamPtr ip, librevenge::RVNGBinaryData &data,
00159 libmwaw::DebugFile &ascii);
00160
00164 bool readContents(MWAWInputStreamPtr input, std::string const &oleName,
00165 librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii);
00166
00172 bool readCONTENTS(MWAWInputStreamPtr input, std::string const &oleName,
00173 librevenge::RVNGBinaryData &pict, MWAWPosition &pos, libmwaw::DebugFile &ascii);
00174
00175
00177 std::string m_avoidOLE;
00179 std::vector<std::string> m_unknownOLEs;
00180
00182 std::vector<librevenge::RVNGBinaryData> m_objects;
00184 std::vector<MWAWPosition> m_objectsPosition;
00186 std::vector<int> m_objectsId;
00188 std::vector<std::string> m_objectsType;
00189
00191 shared_ptr<MWAWOLEParserInternal::CompObj> m_compObjIdName;
00192
00193 };
00194
00195 #endif
00196