The class which parses the main zones of a mac MS Works document v4. More...
#include <MSK4Zone.hxx>
Public Member Functions | |
MSK4Zone (MWAWInputStreamPtr input, MWAWParserStatePtr parserState, MSK4Parser &parser, std::string const &oleName) | |
constructor More... | |
~MSK4Zone () | |
destructor More... | |
![]() | |
MSKParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
constructor More... | |
MSKParser (MWAWInputStreamPtr input, MWAWParserStatePtr parserState) | |
constructor using the parser state More... | |
virtual | ~MSKParser () |
destructor More... | |
MWAWInputStreamPtr & | getInput () |
returns the actual input More... | |
bool | getColor (int id, MWAWColor &col, int vers=-1) const |
return the color which correspond to an index More... | |
libmwaw::DebugFile & | ascii () |
a DebugFile used to write what we recognize when we parse the document More... | |
![]() | |
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 | |
void | init () |
inits all internal variables More... | |
bool | parseHeaderIndex (MWAWInputStreamPtr &input) |
tries to find the beginning of the list of indices, then try to find all entries in this list. More... | |
bool | parseHeaderIndexEntry (MWAWInputStreamPtr &input) |
parses an index entry More... | |
bool | createZones (bool mainOle) |
finds and parses all the zones to prepare the data More... | |
void | readContentZones (MWAWEntry const &entry, bool mainOle) |
final reading of a text zone More... | |
MWAWContentListenerPtr | createListener (WPXDocumentInterface *interface, MWAWSubDocumentPtr &header, MWAWSubDocumentPtr &footer) |
creates the main listener More... | |
double | getTextHeight () const |
returns the page height, ie. paper size less margin (in inches) less header/footer size More... | |
Vec2f | getPageLeftTop () const |
returns the page top left point More... | |
void | newPage (int number) |
adds a new page More... | |
void | sendFootNote (int id) |
creates a document for a footnote which some id (via MSK4Parser ) More... | |
void | readFootNote (int id) |
sends text corresponding to the footnote id to the listener (via MSK4Text) More... | |
void | sendFrameText (MWAWEntry const &entry, std::string const &frame) |
send the frame text More... | |
void | sendRBIL (int id, Vec2i const &sz) |
send a rbil zone More... | |
void | sendOLE (int id, MWAWPosition const &pos, WPXPropertyList frameExtras) |
send an OLE zone More... | |
MWAWEntry | getTextPosition () const |
return the text positions ( used for frame text) More... | |
void | parse (WPXDocumentInterface *) |
empty implementation of the parse function ( to make the class not virtual) More... | |
bool | checkHeader (MWAWHeader *, bool) |
empty implementation of the checkHeader function ( to make the class not virtual) More... | |
bool | readPRNT (MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page) |
reads the PRNT zone which contains the printer properties ( page dimension, margins, ...) More... | |
bool | readDOP (MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page) |
parses the DIO zone which contains the document properties (dimension, ...) More... | |
bool | readFRAM (MWAWInputStreamPtr input, MWAWEntry const &entry) |
parses the FRAM zone which contains some information about frames (header, footer, ...) More... | |
bool | readRLRB (MWAWInputStreamPtr input, MWAWEntry const &entry) |
parses the RLRB zone which seems to contain some position in the page ? More... | |
bool | readSELN (MWAWInputStreamPtr input, MWAWEntry const &entry) |
parses the SELN zone which seems to contain some information about the actual More... | |
void | setAscii (std::string const &oleName) |
inits the ascii file More... | |
![]() | |
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... | |
MWAWGraphicListenerPtr & | getGraphicListener () |
returns the graphic listener 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 | |
MSK4Parser * | m_mainParser |
the main parser More... | |
shared_ptr < MSK4ZoneInternal::State > | m_state |
the internal state More... | |
std::multimap< std::string, MWAWEntry > | m_entryMap |
the list of entries, name->entry More... | |
shared_ptr< MSK4Text > | m_textParser |
the text parser More... | |
shared_ptr< MSKGraph > | m_graphParser |
the graph parser More... | |
![]() | |
MWAWInputStreamPtr | m_input |
the input which can be an OLE in MSWorks 4 file More... | |
libmwaw::DebugFile | m_asciiFile |
the debug file of the actual input More... | |
Private Member Functions | |
MSK4Zone (MSK4Zone const &orig) | |
MSK4Zone & | operator= (MSK4Zone const &orig) |
Friends | |
class | MSK4ParserInternal::SubDocument |
class | MSK4Parser |
class | MSKGraph |
class | MSK4Text |
Additional Inherited Members | |
![]() | |
static std::vector< MWAWColor > const & | getPalette (int vers) |
return a list of color corresponding to a version More... | |
The class which parses the main zones of a mac MS Works document v4.
This class must be associated with a MSK4Parser, which gives it the oles to parse. This oles can be MN0, MacWorks/QHdr, MacWorks/QFtr, MacWorks/QFootnotes and MacWorks/QFrm<number> .
It creates a MSKGraph, a MSK4Text to parse the the graphic and the text parts.
It reads the entries:
MSK4Zone::MSK4Zone | ( | MWAWInputStreamPtr | input, |
MWAWParserStatePtr | parserState, | ||
MSK4Parser & | parser, | ||
std::string const & | oleName | ||
) |
constructor
MSK4Zone::~MSK4Zone | ( | ) |
destructor
|
private |
|
inlineprotectedvirtual |
empty implementation of the checkHeader function ( to make the class not virtual)
Implements MWAWParser.
|
protected |
creates the main listener
|
protected |
finds and parses all the zones to prepare the data
Referenced by MSK4ParserInternal::SubDocument::parse(), and MSK4Parser::sendFrameText().
|
protectedvirtual |
returns the page top left point
Implements MSKParser.
|
protected |
returns the page height, ie. paper size less margin (in inches) less header/footer size
|
protected |
return the text positions ( used for frame text)
Referenced by MSK4Parser::sendFrameText().
|
protected |
inits all internal variables
Referenced by MSK4Zone().
|
protected |
adds a new page
Referenced by readContentZones(), and MSK4Text::readText().
|
inlineprotectedvirtual |
empty implementation of the parse function ( to make the class not virtual)
Implements MWAWParser.
|
protected |
tries to find the beginning of the list of indices, then try to find all entries in this list.
Stores result in nameTable, offsetTable
Referenced by createZones().
|
protected |
parses an index entry
Referenced by parseHeaderIndex().
|
protected |
final reading of a text zone
Referenced by MSK4ParserInternal::SubDocument::parse(), and MSK4Parser::sendFrameText().
|
protected |
parses the DIO zone which contains the document properties (dimension, ...)
Referenced by createZones().
|
protected |
sends text corresponding to the footnote id to the listener (via MSK4Text)
Referenced by MSK4ParserInternal::SubDocument::parse().
|
protected |
parses the FRAM zone which contains some information about frames (header, footer, ...)
Referenced by createZones().
|
protected |
reads the PRNT zone which contains the printer properties ( page dimension, margins, ...)
Referenced by createZones().
|
protected |
parses the RLRB zone which seems to contain some position in the page ?
Referenced by createZones().
|
protected |
parses the SELN zone which seems to contain some information about the actual
Referenced by createZones().
|
protected |
creates a document for a footnote which some id (via MSK4Parser )
Referenced by MSK4Text::readText().
|
protectedvirtual |
send the frame text
Reimplemented from MSKParser.
|
protectedvirtual |
send an OLE zone
Reimplemented from MSKParser.
|
protected |
send a rbil zone
Referenced by MSK4Text::readText().
|
protected |
inits the ascii file
Referenced by MSK4Zone().
|
friend |
|
friend |
|
protected |
the list of entries, name->entry
Referenced by createZones(), MSK4Text::findFDPStructures(), MSK4Text::findFDPStructuresByHand(), parseHeaderIndex(), parseHeaderIndexEntry(), readContentZones(), and MSK4Text::readStructures().
|
protected |
the graph parser
Referenced by createZones(), init(), newPage(), readContentZones(), and sendRBIL().
|
protected |
the main parser
Referenced by sendFootNote(), sendFrameText(), and sendOLE().
|
protected |
the internal state
Referenced by createZones(), getPageLeftTop(), getTextHeight(), init(), newPage(), readContentZones(), readDOP(), and readFRAM().
|
protected |
the text parser
Referenced by createZones(), getTextPosition(), init(), readContentZones(), and readFootNote().