MSK4Parser Class Reference

the main class to read a MS Works document v4 More...

`#include <MSK4Parser.hxx>`

Inheritance diagram for MSK4Parser:

## Public Member Functions

| MSK4Parser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
| construtor More...
virtual | ~MSK4Parser ()
| destructor More...
bool | checkHeader (MWAWHeader *header, bool strict=false)
| checks if the document header is correct (or not) More...
virtual void | parse (WPXDocumentInterface *documentInterface)
| the main parse function, called with the documentInterface More...
Public Member Functions inherited from MWAWParser
virtual | ~MWAWParser ()
| virtual destructor More...
int | version () const
| returns the works version More...
void | setVersion (int vers)
| sets the works version More...

## Protected Member Functions

bool | createStructures ()
| finds the principal ole zone: Ole pictures and MN0, then tries to find the main structures. More...
void | flushExtra ()
| tries to parse the ole zones which have not yet been parsed More...
void | sendFootNote (int id)
| creates a subdocument corresponding to a footnote (indicated by id) More...
void | sendFrameText (MWAWEntry const &entry, std::string const &frame)
| send the frame text More...
void | sendOLE (int id, MWAWPosition const &pos, WPXPropertyList frameExtras)
| send an OLE zone More...
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
| constructor (protected) More...
| MWAWParser (MWAWParserStatePtr state)
| constructor using a state More...
MWAWParserStatePtr | getParserState ()
| returns the parser state More...
MWAWHeader * | getHeader ()
| returns the header More...
MWAWInputStreamPtr & | getInput ()
| returns the actual input More...
MWAWContentListenerPtr & | getListener ()
| returns the listener More...
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension More...
MWAWPageSpan & | getPageSpan ()
| returns the actual page dimension More...
double | getFormLength () const
| returns the form length More...
double | getFormWidth () const
| returns the form width More...
double | getPageLength () const
| returns the page length (form length without margin ) More...
double | getPageWidth () const
| returns the page width (form width without margin ) More...
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser More...
void | setListener (MWAWContentListenerPtr &listener)
| sets the listener More...
void | resetListener ()
| resets the listener More...
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter More...
void | setFontConverter (MWAWFontConverterPtr fontConverter)
| sets the font convertor More...
libmwaw::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document More...
void | setAsciiName (char const *name)
| Debugging: change the default ascii file. More...
std::string const & | asciiName () const
| return the ascii file name More...

## Protected Attributes

shared_ptr < MSK4ParserInternal::State > | m_state
| the state More...

## Private Member Functions

| MSK4Parser (MSK4Parser const &orig)
MSK4Parser & | operator= (MSK4Parser const &orig)

## Friends

class | MSK4ParserInternal::SubDocument
class | MSK4Zone

## Detailed Description

the main class to read a MS Works document v4

This class is associated with a MSK4Parser which reads: the main Ole zones MN0, MacWorks/QHdr, MacWorks/QFtr, MacWorks/QFootnotes and which parses MacWorks/QFrm<number>. It also uses an MWAWOleParser in order to find pictures in the other Ole zones.

## Constructor & Destructor Documentation

MSK4Parser::MSK4Parser | ( | MWAWInputStreamPtr | input,
|  | MWAWRSRCParserPtr | rsrcParser,
|  | MWAWHeader * | header
| ) |  |

construtor

MSK4Parser::~MSK4Parser | ( |  | ) |

virtual

destructor

MSK4Parser::MSK4Parser | ( | MSK4Parser const & | orig | ) |

private

## Member Function Documentation

bool MSK4Parser::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = `false`
| ) |  |

virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by createStructures().

bool MSK4Parser::createStructures | ( |  | ) |

protected

finds the principal ole zone: Ole pictures and MN0, then tries to find the main structures.

Finally, parses the document

Referenced by parse().

void MSK4Parser::flushExtra | ( |  | ) |

protected

tries to parse the ole zones which have not yet been parsed

Referenced by parse().

MSK4Parser& MSK4Parser::operator= | ( | MSK4Parser const & | orig | ) |

private

void MSK4Parser::parse | ( | WPXDocumentInterface * | documentInterface | ) |

virtual

the main parse function, called with the documentInterface

Implements MWAWParser.

void MSK4Parser::sendFootNote | ( | int | id | ) |

protected

creates a subdocument corresponding to a footnote (indicated by id)

Note
  if id < 0 meaning that the text corresponding to the note was not found, an empty footnote will be created

Referenced by MSK4Zone::sendFootNote().

void MSK4Parser::sendFrameText | ( | MWAWEntry const & | entry,
|  | std::string const & | frame
| ) |  |

protected

send the frame text

Referenced by MSK4Zone::sendFrameText().

void MSK4Parser::sendOLE | ( | int | id,
|  | MWAWPosition const & | pos,
|  | WPXPropertyList | frameExtras
| ) |  |

protected

send an OLE zone

Referenced by MSK4Zone::sendOLE().

## Friends And Related Function Documentation

friend class MSK4ParserInternal::SubDocument

friend

friend class MSK4Zone

friend

Referenced by createStructures(), and flushExtra().

## Member Data Documentation

shared_ptr<MSK4ParserInternal::State> MSK4Parser::m_state

protected

the state

Referenced by createStructures(), flushExtra(), MSK4Parser(), parse(), sendFootNote(), sendFrameText(), and sendOLE().

The documentation for this class was generated from the following files:

- MSK4Parser.hxx
- MSK4Parser.cxx