Go to the documentation of this file.
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;
bool valid() const
returns true if the zone data exists
Definition: HanMacWrdKParser.hxx:83
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVec2i size() const
returns the size
Definition: MWAWPrinter.hxx:56
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
Internal: the subdocument of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:86
long fileEndPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:96
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
the main class to read a HanMac Word-K file
Definition: HanMacWrdKParser.hxx:186
MWAWVec2i pos(int i) const
returns the position ( 0: leftTop, 1:rightBottom )
Definition: MWAWPrinter.hxx:61
bool createZones()
finds the different objects zones
Definition: HanMacWrdKParser.cxx:302
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
int m_type
the type : 1(text), ....
Definition: HanMacWrdKParser.hxx:139
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
@ MWAW_T_HANMACWORDK
HanMac Word-K (v2.0.5-2.0.6)
Definition: MWAWDocument.hxx:118
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
long m_zonesListBegin
the list of zone begin
Definition: HanMacWrdKParser.cxx:74
State()
constructor
Definition: HanMacWrdKParser.cxx:68
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
libmwaw::DebugFile & ascii() const
returns the debug file
Definition: HanMacWrdKParser.hxx:133
friend std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
operator <<
Definition: HanMacWrdKParser.cxx:1199
bool canSendTextAsGraphic(long id, long subId)
check if we can send a textzone as graphic
Definition: HanMacWrdKParser.cxx:174
long m_id
the zone id
Definition: HanMacWrdKParser.hxx:142
int m_numPages
the number of page of the final document
Definition: HanMacWrdKParser.cxx:78
std::string m_extra
some extra data
Definition: HanMacWrdKParser.hxx:151
librevenge::RVNGBinaryData m_data
the storage (if needed)
Definition: HanMacWrdKParser.hxx:164
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
SubDocument(HanMacWrdKParser &pars, MWAWInputStreamPtr input, long zoneId)
Definition: HanMacWrdKParser.cxx:88
PrinterRect paper() const
returns the paper rectangle
Definition: MWAWPrinter.cxx:205
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
shared_ptr< HanMacWrdKZone > decodeZone(shared_ptr< HanMacWrdKZone > zone)
try to decode a zone
Definition: HanMacWrdKParser.cxx:969
the main class to read the text part of HanMac Word file
Definition: HanMacWrdKText.hxx:62
libmwaw::DebugFile * m_asciiFile
the debug file
Definition: HanMacWrdKParser.hxx:167
std::string name() const
returns the zone name
Definition: HanMacWrdKParser.hxx:122
librevenge::RVNGBinaryData & getBinaryData()
returns a pointer to the binary data
Definition: HanMacWrdKParser.hxx:117
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
~HanMacWrdKZone()
destructor
Definition: HanMacWrdKParser.cxx:1193
the class to store a color
Definition: libmwaw_internal.hxx:182
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: HanMacWrdKParser.cxx:95
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
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: HanMacWrdKParser.cxx:194
bool readPrintInfo(HanMacWrdKZone &zone)
try to read a printinfo zone (type 7)
Definition: HanMacWrdKParser.cxx:527
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
void newPage(int number)
adds a new page
Definition: HanMacWrdKParser.cxx:203
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
HanMacWrdKZone & operator=(HanMacWrdKZone const &orig)
void init()
inits all internal variables
Definition: HanMacWrdKParser.cxx:152
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: HanMacWrdKParser.cxx:219
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
void setFileBeginPos(long begPos)
sets the begin file pos
Definition: HanMacWrdKParser.hxx:101
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
bool readZoneb(HanMacWrdKZone &zone)
try to read a unknown zone of type b
Definition: HanMacWrdKParser.cxx:828
SubDocumentType
Definition: libmwaw_internal.hxx:178
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
HanMacWrdKZone(HanMacWrdKZone const &orig)
bool readZonesList()
try to read the zones list
Definition: HanMacWrdKParser.cxx:334
T y() const
second element
Definition: libmwaw_internal.hxx:620
shared_ptr< HanMacWrdKGraph > m_graphParser
the graph parser
Definition: HanMacWrdKParser.hxx:267
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
T x() const
first element
Definition: libmwaw_internal.hxx:615
long m_id
the subdocument id
Definition: HanMacWrdKParser.cxx:115
long end() const
returns the last position in the input
Definition: HanMacWrdKParser.hxx:72
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
long m_subId
the zone subId
Definition: HanMacWrdKParser.hxx:145
virtual ~SubDocument()
destructor
Definition: HanMacWrdKParser.cxx:92
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:178
bool readZone(shared_ptr< HanMacWrdKZone > zone)
try to read a generic zone
Definition: HanMacWrdKParser.cxx:428
bool readZonec(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type c
Definition: HanMacWrdKParser.cxx:886
@ PageBreak
Definition: MWAWListener.hxx:58
void setFilePositions(long begPos, long endPos)
sets the begin/end file pos
Definition: HanMacWrdKParser.hxx:111
Definition: libmwaw_internal.hxx:142
std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
Definition: HanMacWrdKParser.cxx:1199
long begin() const
returns the first position in the input
Definition: HanMacWrdKParser.hxx:67
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: HanMacWrdKParser.cxx:255
int m_footerHeight
the footer height if known
Definition: HanMacWrdKParser.cxx:80
long m_filePos
the begin of the entry
Definition: HanMacWrdKParser.hxx:158
virtual ~HanMacWrdKParser()
destructor
Definition: HanMacWrdKParser.cxx:148
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
Internal: the structures of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:63
@ Char
Definition: MWAWPosition.hxx:51
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
HanMacWrdKZone(MWAWInputStreamPtr input, libmwaw::DebugFile &asciiFile)
constructor given an input and an asciiFile
Definition: HanMacWrdKParser.cxx:1183
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWInputStreamPtr m_input
the main input
Definition: HanMacWrdKParser.hxx:148
int m_headerHeight
the header height if known
Definition: HanMacWrdKParser.cxx:79
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
the main class to read the graphic part of a HanMac Word file
Definition: HanMacWrdKGraph.hxx:78
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
std::multimap< long, shared_ptr< HanMacWrdKZone > > m_zonesMap
a map of entry: zoneId->zone
Definition: HanMacWrdKParser.cxx:76
bool readZonea(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type a
Definition: HanMacWrdKParser.cxx:784
bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdKParser.cxx:169
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdKParser.cxx:186
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
long fileBeginPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:91
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
PrinterRect page() const
returns the page rectangle
Definition: MWAWPrinter.cxx:201
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
shared_ptr< HanMacWrdKParserInternal::State > m_state
the state
Definition: HanMacWrdKParser.hxx:264
Internal: the state of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:66
friend class HanMacWrdKText
Definition: HanMacWrdKParser.hxx:188
friend class HanMacWrdKGraph
Definition: HanMacWrdKParser.hxx:187
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
bool sendZone(long zId)
send a zone
Definition: HanMacWrdKParser.cxx:179
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
shared_ptr< HanMacWrdKText > m_textParser
the text parser
Definition: HanMacWrdKParser.hxx:270
long m_endFilePos
the end of the entry
Definition: HanMacWrdKParser.hxx:161
int m_actPage
the actual page
Definition: HanMacWrdKParser.cxx:78
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
bool readFramesUnkn(shared_ptr< HanMacWrdKZone > zone)
try to read a zone storing a list of ?, frameType
Definition: HanMacWrdKParser.cxx:638
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: HanMacWrdKParser.cxx:105
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
void setFileLength(long len)
sets the file length
Definition: HanMacWrdKParser.hxx:106
long length() const
returns the zone size
Definition: HanMacWrdKParser.hxx:77
HanMacWrdKParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: HanMacWrdKParser.cxx:142
bool readZone6(shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 6
Definition: HanMacWrdKParser.cxx:707
Generated on Wed Jun 17 2020 06:30:10 for libmwaw by
doxygen 1.8.18