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>
62 explicit HanMacWrdKZone(std::shared_ptr<libmwaw::DebugFile>
const &asciiFile);
127 static std::string
name(
int type);
bool valid() const
returns true if the zone data exists
Definition: HanMacWrdKParser.hxx:83
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
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
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
Internal: the subdocument of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:91
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: HanMacWrdKParser.cxx:118
std::shared_ptr< libmwaw::DebugFile > m_asciiFilePtr
the file pointer
Definition: HanMacWrdKParser.hxx:170
long fileEndPos() const
returns the file begin position
Definition: HanMacWrdKParser.hxx:96
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:305
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
int m_type
the type : 1(text), ....
Definition: HanMacWrdKParser.hxx:139
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
@ 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:79
State()
constructor
Definition: HanMacWrdKParser.cxx:68
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
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:1221
bool canSendTextAsGraphic(long id, long subId)
check if we can send a textzone as graphic
Definition: HanMacWrdKParser.cxx:177
bool readZonea(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type a
Definition: HanMacWrdKParser.cxx:787
long m_id
the zone id
Definition: HanMacWrdKParser.hxx:142
int m_numPages
the number of page of the final document
Definition: HanMacWrdKParser.cxx:83
std::string m_extra
some extra data
Definition: HanMacWrdKParser.hxx:151
HanMacWrdKZone(MWAWInputStreamPtr const &input, libmwaw::DebugFile &asciiFile)
constructor given an input and an asciiFile
Definition: HanMacWrdKParser.cxx:1185
bool readFramesUnkn(std::shared_ptr< HanMacWrdKZone > zone)
try to read a zone storing a list of ?, frameType
Definition: HanMacWrdKParser.cxx:641
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
PrinterRect paper() const
returns the paper rectangle
Definition: MWAWPrinter.cxx:222
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
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:208
~HanMacWrdKZone()
destructor
Definition: HanMacWrdKParser.cxx:1215
the class to store a color
Definition: libmwaw_internal.hxx:192
bool readZonec(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type c
Definition: HanMacWrdKParser.cxx:889
bool readZone(std::shared_ptr< HanMacWrdKZone > zone)
try to read a generic zone
Definition: HanMacWrdKParser.cxx:430
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: HanMacWrdKParser.cxx:197
bool readPrintInfo(HanMacWrdKZone &zone)
try to read a printinfo zone (type 7)
Definition: HanMacWrdKParser.cxx:530
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
HanMacWrdKZone(HanMacWrdKZone const &orig)=delete
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
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:206
std::multimap< long, std::shared_ptr< HanMacWrdKZone > > m_zonesMap
a map of entry: zoneId->zone
Definition: HanMacWrdKParser.cxx:81
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
void init()
inits all internal variables
Definition: HanMacWrdKParser.cxx:155
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
Defines MWAWCell (cell content and format)
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:178
bool readZoneb(HanMacWrdKZone &zone)
try to read a unknown zone of type b
Definition: HanMacWrdKParser.cxx:831
SubDocumentType
Definition: libmwaw_internal.hxx:188
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: HanMacWrdKParser.cxx:222
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
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:113
bool readZonesList()
try to read the zones list
Definition: HanMacWrdKParser.cxx:336
T y() const
second element
Definition: libmwaw_internal.hxx:673
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
T x() const
first element
Definition: libmwaw_internal.hxx:668
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
std::shared_ptr< HanMacWrdKText > m_textParser
the text parser
Definition: HanMacWrdKParser.hxx:270
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:188
@ PageBreak
Definition: MWAWListener.hxx:58
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
void setFilePositions(long begPos, long endPos)
sets the begin/end file pos
Definition: HanMacWrdKParser.hxx:111
Definition: libmwaw_internal.hxx:144
std::ostream & operator<<(std::ostream &o, HanMacWrdKZone const &zone)
Definition: HanMacWrdKParser.cxx:1221
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
std::shared_ptr< HanMacWrdKZone > decodeZone(std::shared_ptr< HanMacWrdKZone > zone)
try to decode a zone
Definition: HanMacWrdKParser.cxx:971
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: HanMacWrdKParser.cxx:258
int m_footerHeight
the footer height if known
Definition: HanMacWrdKParser.cxx:85
long m_filePos
the begin of the entry
Definition: HanMacWrdKParser.hxx:158
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
Internal: the structures of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:63
@ Char
Definition: MWAWPosition.hxx:51
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWInputStreamPtr m_input
the main input
Definition: HanMacWrdKParser.hxx:148
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: HanMacWrdKParser.cxx:101
int m_headerHeight
the header height if known
Definition: HanMacWrdKParser.cxx:84
~HanMacWrdKParser() final
destructor
Definition: HanMacWrdKParser.cxx:151
bool readZone8(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 8
Definition: HanMacWrdKParser.cxx:754
the main class to read the graphic part of a HanMac Word file
Definition: HanMacWrdKGraph.hxx:78
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: HanMacWrdKParser.cxx:1082
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
Defines MWAWTextListener: the libmwaw word processor listener.
bool sendText(long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
send a text zone
Definition: HanMacWrdKParser.cxx:172
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
SubDocument(HanMacWrdKParser &pars, MWAWInputStreamPtr const &input, long zoneId)
Definition: HanMacWrdKParser.cxx:93
bool getColor(int colId, int patternId, MWAWColor &color) const
returns the color associated with a pattern
Definition: HanMacWrdKParser.cxx:189
std::shared_ptr< HanMacWrdKParserInternal::State > m_state
the state
Definition: HanMacWrdKParser.hxx:264
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
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:198
PrinterRect page() const
returns the page rectangle
Definition: MWAWPrinter.cxx:218
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
~SubDocument() final
destructor
Definition: HanMacWrdKParser.cxx:98
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
Internal: the state of a HanMacWrdKParser.
Definition: HanMacWrdKParser.cxx:66
bool readZone6(std::shared_ptr< HanMacWrdKZone > zone)
try to read a unknown zone of type 6
Definition: HanMacWrdKParser.cxx:710
friend class HanMacWrdKText
Definition: HanMacWrdKParser.hxx:188
friend class HanMacWrdKGraph
Definition: HanMacWrdKParser.hxx:187
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Definition: MWAWDocument.hxx:57
Small class used to store the decoded zone of HanMacWrdKParser.
Definition: HanMacWrdKParser.hxx:58
bool sendZone(long zId)
send a zone
Definition: HanMacWrdKParser.cxx:182
bool m_parsed
true if the zone is sended
Definition: HanMacWrdKParser.hxx:154
std::shared_ptr< HanMacWrdKGraph > m_graphParser
the graph parser
Definition: HanMacWrdKParser.hxx:267
HanMacWrdKZone & operator=(HanMacWrdKZone const &orig)=delete
long m_endFilePos
the end of the entry
Definition: HanMacWrdKParser.hxx:161
int m_actPage
the actual page
Definition: HanMacWrdKParser.cxx:83
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
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 const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: HanMacWrdKParser.cxx:142
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20