37 #ifndef HAN_MAC_WRD_K_PARSER
38 # define HAN_MAC_WRD_K_PARSER
44 #include <librevenge/librevenge.h>
127 static std::string
name(
int type);
201 void parse(librevenge::RVNGTextInterface *documentInterface);
208 void createDocument(librevenge::RVNGTextInterface *documentInterface);
241 bool readZone(shared_ptr<HanMacWrdKZone> zone);
243 shared_ptr<HanMacWrdKZone>
decodeZone(shared_ptr<HanMacWrdKZone> zone);
249 bool readZone6(shared_ptr<HanMacWrdKZone> zone);
251 bool readZone8(shared_ptr<HanMacWrdKZone> zone);
253 bool readZonea(shared_ptr<HanMacWrdKZone> zone);
257 bool readZonec(shared_ptr<HanMacWrdKZone> zone);
264 shared_ptr<HanMacWrdKParserInternal::State>
m_state;
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:441
libmwaw::DebugFile & ascii() const
returns the debug file
Definition: HanMacWrdKParser.hxx:133
shared_ptr< libmwaw::DebugFile > m_asciiFilePtr
the file pointer
Definition: HanMacWrdKParser.hxx:170
long fileBeginPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:91
Internal: the subdocument of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:85
bool readZonesList()
try to read the zones list
Definition: HanMacWrdKParser.cxx:334
shared_ptr< HanMacWrdKGraph > m_graphParser
the graph parser
Definition: HanMacWrdKParser.hxx:267
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
HanMacWrdKZone & operator=(HanMacWrdKZone const &orig)
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
bool readZone(shared_ptr< HanMacWrdKZone > zone)
try to read a generic zone
Definition: HanMacWrdKParser.cxx:428
~HanMacWrdKZone()
destructor
Definition: HanMacWrdKParser.cxx:1193
long end() const
returns the last position in the input
Definition: HanMacWrdKParser.hxx:72
int m_type
the type : 1(text), ....
Definition: HanMacWrdKParser.hxx:139
bool sendZone(long zId)
send a zone
Definition: HanMacWrdKParser.cxx:179
bool readZonea(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type a
Definition: HanMacWrdKParser.cxx:784
shared_ptr< HanMacWrdKParserInternal::State > m_state
the state
Definition: HanMacWrdKParser.hxx:264
the class to store a color
Definition: libmwaw_internal.hxx:177
long m_endFilePos
the end of the entry
Definition: HanMacWrdKParser.hxx:161
long m_subId
the zone subId
Definition: HanMacWrdKParser.hxx:145
bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdKParser.cxx:169
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: HanMacWrdKParser.cxx:194
bool readFramesUnkn(shared_ptr< HanMacWrdKZone > zone)
try to read a zone storing a list of ?, frameType
Definition: HanMacWrdKParser.cxx:638
void setFilePositions(long begPos, long endPos)
sets the begin/end file pos
Definition: HanMacWrdKParser.hxx:111
long length() const
returns the zone size
Definition: HanMacWrdKParser.hxx:77
bool readZone6(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 6
Definition: HanMacWrdKParser.cxx:707
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:449
bool canSendTextAsGraphic(long id, long subId)
check if we can send a textzone as graphic
Definition: HanMacWrdKParser.cxx:174
long m_filePos
the begin of the entry
Definition: HanMacWrdKParser.hxx:158
bool valid() const
returns true if the zone data exists
Definition: HanMacWrdKParser.hxx:83
bool createZones()
finds the different objects zones
Definition: HanMacWrdKParser.cxx:302
shared_ptr< HanMacWrdKZone > decodeZone(shared_ptr< HanMacWrdKZone > zone)
try to decode a zone
Definition: HanMacWrdKParser.cxx:969
HanMacWrdKParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: HanMacWrdKParser.cxx:142
MWAWInputStreamPtr m_input
the main input
Definition: HanMacWrdKParser.hxx:148
shared_ptr< HanMacWrdKText > m_textParser
the text parser
Definition: HanMacWrdKParser.hxx:270
libmwaw::DebugFile * m_asciiFile
the debug file
Definition: HanMacWrdKParser.hxx:167
Internal: the structures of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:62
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:284
librevenge::RVNGBinaryData m_data
the storage (if needed)
Definition: HanMacWrdKParser.hxx:164
std::string name() const
returns the zone name
Definition: HanMacWrdKParser.hxx:122
the main class to read a HanMac Word-K file
Definition: HanMacWrdKParser.hxx:185
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:439
bool readZone8(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 8
Definition: HanMacWrdKParser.cxx:751
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: HanMacWrdKParser.cxx:1080
librevenge::RVNGBinaryData & getBinaryData()
returns a pointer to the binary data
Definition: HanMacWrdKParser.hxx:117
the main class to read the text part of HanMac Word file
Definition: HanMacWrdKText.hxx:61
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: HanMacWrdKParser.cxx:219
the main class to read the graphic part of a HanMac Word file
Definition: HanMacWrdKGraph.hxx:77
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdKParser.cxx:186
void init()
inits all internal variables
Definition: HanMacWrdKParser.cxx:152
void setFileBeginPos(long begPos)
sets the begin file pos
Definition: HanMacWrdKParser.hxx:101
bool readPrintInfo(HanMacWrdKZone &zone)
try to read a printinfo zone (type 7)
Definition: HanMacWrdKParser.cxx:527
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
void newPage(int number)
adds a new page
Definition: HanMacWrdKParser.cxx:203
bool readZoneb(HanMacWrdKZone &zone)
try to read a unknown zone of type b
Definition: HanMacWrdKParser.cxx:828
long begin() const
returns the first position in the input
Definition: HanMacWrdKParser.hxx:67
friend std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
operator <<
Definition: HanMacWrdKParser.cxx:1199
long fileEndPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:96
bool readZonec(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type c
Definition: HanMacWrdKParser.cxx:886
HanMacWrdKZone(MWAWInputStreamPtr input, libmwaw::DebugFile &asciiFile)
constructor given an input and an asciiFile
Definition: HanMacWrdKParser.cxx:1183
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: HanMacWrdKParser.cxx:255
long m_id
the zone id
Definition: HanMacWrdKParser.hxx:142
void setFileLength(long len)
sets the file length
Definition: HanMacWrdKParser.hxx:106
std::string m_extra
some extra data
Definition: HanMacWrdKParser.hxx:151
virtual ~HanMacWrdKParser()
destructor
Definition: HanMacWrdKParser.cxx:148