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 #ifndef MOR_TEXT
00039 # define MOR_TEXT
00040
00041 #include <set>
00042
00043 #include "libmwaw_internal.hxx"
00044 #include "MWAWDebug.hxx"
00045
00046 struct MWAWListLevel;
00047
00048 namespace MORTextInternal
00049 {
00050 struct Outline;
00051 struct Paragraph;
00052 struct State;
00053
00054 class SubDocument;
00055 }
00056
00057 class MORParser;
00058
00064 class MORText
00065 {
00066 friend class MORParser;
00067 friend class MORTextInternal::SubDocument;
00068 public:
00070 MORText(MORParser &parser);
00072 virtual ~MORText();
00073
00075 int version() const;
00076
00078 int numPages() const;
00079
00080 protected:
00082 bool createZones();
00084 bool sendMainText();
00085
00087 shared_ptr<MWAWSubDocument> getHeaderFooter(bool header);
00088
00089
00090
00091
00092
00094 bool readTopic(MWAWEntry const &entry);
00095
00097 int getLastTopicChildId(int tId) const;
00098
00101 int checkTopicList(size_t tId, std::set<size_t> &parent);
00102
00104 bool readComment(MWAWEntry const &entry);
00105
00107 bool readSpeakerNote(MWAWEntry const &entry);
00108
00110 bool sendText(MWAWEntry const &entry, MWAWFont const &font);
00111
00113 bool sendComment(int cId);
00114
00116 bool sendSpeakerNote(int nId);
00117
00119 bool sendTopic(int tId, int dLevel, std::vector<MWAWParagraph> ¶Stack);
00120
00122 bool readFonts(MWAWEntry const &entry);
00123
00125 bool readOutlineList(MWAWEntry const &entry);
00126
00128 bool readOutline(MWAWEntry const &entry, MORTextInternal::Outline &outline);
00129
00134 bool readFont(MWAWEntry const &entry, std::string &fName, int &fId);
00136 bool readTabs(MWAWEntry const &entry, MORTextInternal::Paragraph ¶, std::string &mess);
00138 bool readCustomListLevel(MWAWEntry const &entry, MWAWListLevel &level);
00139
00141 bool parseUnknown(MWAWEntry const &entry, long fDecal);
00142
00143 private:
00144 MORText(MORText const &orig);
00145 MORText &operator=(MORText const &orig);
00146
00147 protected:
00148
00149
00150
00152 MWAWParserStatePtr m_parserState;
00153
00155 shared_ptr<MORTextInternal::State> m_state;
00156
00158 MORParser *m_mainParser;
00159 };
00160 #endif
00161