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 HMWK_TEXT
00039 # define HMWK_TEXT
00040
00041 #include <map>
00042
00043 #include "libmwaw_internal.hxx"
00044 #include "MWAWDebug.hxx"
00045
00046 namespace HMWKTextInternal
00047 {
00048 struct Paragraph;
00049 struct Token;
00050 struct State;
00051 }
00052
00053 struct HMWKZone;
00054 class HMWKParser;
00055
00061 class HMWKText
00062 {
00063 friend class HMWKParser;
00064 public:
00066 HMWKText(HMWKParser &parser);
00068 virtual ~HMWKText();
00069
00071 int version() const;
00072
00074 int numPages() const;
00075
00076 protected:
00078 bool sendMainText();
00080 bool sendText(long id, long subId, bool asGraphic=false);
00082 bool canSendTextAsGraphic(long id, long subId);
00084 void flushExtra();
00086 void updateTextZoneTypes(std::map<long,int> const &idTypeMap);
00088 std::vector<long> const &getTokenIdList() const;
00090 void getHeaderFooterId(long &headerId, long &footerId) const;
00091
00092
00093
00094
00095
00097 bool readTextZone(shared_ptr<HMWKZone> zone);
00099 bool readFontNames(shared_ptr<HMWKZone> zone);
00101 bool readStyles(shared_ptr<HMWKZone> zone);
00103 bool readSections(shared_ptr<HMWKZone> zone);
00104
00106 bool sendText(HMWKZone &zone, bool asGraphic=false);
00108 bool canSendTextAsGraphic(HMWKZone &zone);
00109
00110
00111
00112
00114 bool readFont(HMWKZone &zone, MWAWFont &font);
00115
00117 bool readParagraph(HMWKZone &zone, HMWKTextInternal::Paragraph ¶);
00119 void setProperty(HMWKTextInternal::Paragraph const ¶, float width);
00120
00122 bool readToken(HMWKZone &zone, HMWKTextInternal::Token &token);
00123
00124 private:
00125 HMWKText(HMWKText const &orig);
00126 HMWKText &operator=(HMWKText const &orig);
00127
00128 protected:
00129
00130
00131
00133 MWAWParserStatePtr m_parserState;
00134
00136 shared_ptr<HMWKTextInternal::State> m_state;
00137
00139 HMWKParser *m_mainParser;
00140 };
00141 #endif
00142