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 #ifndef MSK4_ZONE
00035 # define MSK4_ZONE
00036
00037 #include <map>
00038 #include <string>
00039
00040 #include "MWAWDebug.hxx"
00041 #include "MWAWEntry.hxx"
00042 #include "MWAWInputStream.hxx"
00043
00044 #include "MSKParser.hxx"
00045
00046 class MSK4Parser;
00047 class MSK4Text;
00048 class MSKGraph;
00049
00050 namespace MSK4ZoneInternal
00051 {
00052 struct State;
00053 }
00054 namespace MSK4ParserInternal
00055 {
00056 class SubDocument;
00057 }
00058
00076 class MSK4Zone : public MSKParser
00077 {
00078 friend class MSK4ParserInternal::SubDocument;
00079 friend class MSK4Parser;
00080 friend class MSKGraph;
00081 friend class MSK4Text;
00082
00083 public:
00085 MSK4Zone(MWAWInputStreamPtr input, MWAWParserStatePtr parserState,
00086 MSK4Parser &parser, std::string const &oleName);
00088 ~MSK4Zone();
00089
00090 protected:
00092 void init();
00093
00098 bool parseHeaderIndex(MWAWInputStreamPtr &input);
00099
00101 bool parseHeaderIndexEntry(MWAWInputStreamPtr &input);
00102
00104 bool createZones(bool mainOle);
00105
00109 void readContentZones(MWAWEntry const &entry, bool mainOle);
00110
00112 MWAWContentListenerPtr createListener
00113 (WPXDocumentInterface *interface,
00114 MWAWSubDocumentPtr &header, MWAWSubDocumentPtr &footer);
00115
00117 double getTextHeight() const;
00118
00120 Vec2f getPageLeftTop() const;
00121
00123 void newPage(int number);
00124
00128 void sendFootNote(int id);
00130 void readFootNote(int id);
00131
00133 void sendFrameText(MWAWEntry const &entry, std::string const &frame);
00134
00136 void sendRBIL(int id, Vec2i const &sz);
00137
00139 void sendOLE(int id, MWAWPosition const &pos, WPXPropertyList frameExtras);
00140
00142 MWAWEntry getTextPosition() const;
00143
00145 void parse(WPXDocumentInterface *) {
00146 MWAW_DEBUG_MSG(("MSK4Zone::parse: must not be called\n"));
00147 }
00149 bool checkHeader(MWAWHeader *, bool) {
00150 MWAW_DEBUG_MSG(("MSK4Zone::checkHeader: must not be called\n"));
00151 return false;
00152 }
00153
00154
00155
00156
00157
00159 bool readPRNT(MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page);
00160
00164 bool readDOP(MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page);
00165
00169 bool readFRAM(MWAWInputStreamPtr input, MWAWEntry const &entry);
00170
00174 bool readRLRB(MWAWInputStreamPtr input, MWAWEntry const &entry);
00175
00179 bool readSELN(MWAWInputStreamPtr input, MWAWEntry const &entry);
00180
00182 void setAscii(std::string const &oleName);
00183
00184 private:
00185 MSK4Zone(MSK4Zone const &orig);
00186 MSK4Zone &operator=(MSK4Zone const &orig);
00187 protected:
00188
00189
00190
00191
00193 MSK4Parser *m_mainParser;
00194
00196 shared_ptr<MSK4ZoneInternal::State> m_state;
00197
00199 std::multimap<std::string, MWAWEntry> m_entryMap;
00200
00202 shared_ptr<MSK4Text> m_textParser;
00203
00205 shared_ptr<MSKGraph> m_graphParser;
00206 };
00207 #endif
00208