37 #ifndef HAN_MAC_WRD_K_PARSER 38 # define HAN_MAC_WRD_K_PARSER 44 #include <librevenge/librevenge.h> 69 return m_asciiFilePtr ? 0 : m_filePos;
74 return m_asciiFilePtr ? (long) m_data.size() : m_endFilePos;
79 if (m_asciiFilePtr)
return (
long) m_data.size();
80 return m_endFilePos-m_filePos;
103 m_filePos = m_endFilePos = begPos;
108 m_endFilePos = m_filePos+len;
114 m_endFilePos = endPos;
127 static std::string name(
int type);
198 bool checkHeader(
MWAWHeader *header,
bool strict=
false);
201 void parse(librevenge::RVNGTextInterface *documentInterface);
208 void createDocument(librevenge::RVNGTextInterface *documentInterface);
217 void newPage(
int number);
225 bool canSendTextAsGraphic(
long id,
long subId);
230 bool sendZone(
long zId);
239 bool readZonesList();
241 bool readZone(shared_ptr<HanMacWrdKZone> zone);
243 shared_ptr<HanMacWrdKZone> decodeZone(shared_ptr<HanMacWrdKZone> zone);
245 bool readFramesUnkn(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:491
libmwaw::DebugFile & ascii() const
returns the debug file
Definition: HanMacWrdKParser.hxx:133
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: HanMacWrdKParser.cxx:118
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
shared_ptr< HanMacWrdKGraph > m_graphParser
the graph parser
Definition: HanMacWrdKParser.hxx:267
std::ostream & operator<<(std::ostream &o, Shape const &shape)
Definition: BeagleWksDRParser.cxx:98
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
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
shared_ptr< HanMacWrdKParserInternal::State > m_state
the state
Definition: HanMacWrdKParser.hxx:264
the class to store a color
Definition: libmwaw_internal.hxx:176
long m_endFilePos
the end of the entry
Definition: HanMacWrdKParser.hxx:161
long m_subId
the zone subId
Definition: HanMacWrdKParser.hxx:145
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
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:499
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
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:489
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
bool getColor(int color, MWAWColor &col)
try to convert a file data to a color
Definition: FullWrtStruct.cxx:45
the main class to read the graphic part of a HanMac Word file
Definition: HanMacWrdKGraph.hxx:77
void setFileBeginPos(long begPos)
sets the begin file pos
Definition: HanMacWrdKParser.hxx:101
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
long begin() const
returns the first position in the input
Definition: HanMacWrdKParser.hxx:67
long fileEndPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:96
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