The class which parses the main zones of a mac MS Works document v4. More...
#include <MsWks4Zone.hxx>
Public Member Functions | |
| MsWks4Zone (MWAWInputStreamPtr input, MWAWParserStatePtr parserState, MWAWParser &parser, std::string const &oleName) | |
| constructor | |
| ~MsWks4Zone () | |
| destructor | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| MWAWInputStreamPtr | getInput () |
| returns the actual input | |
| bool | parseHeaderIndex (MWAWInputStreamPtr &input) |
| tries to find the beginning of the list of indices, then try to find all entries in this list. | |
| bool | parseHeaderIndexEntry (MWAWInputStreamPtr &input) |
| parses an index entry | |
| bool | createZones (bool mainOle) |
| finds and parses all the zones to prepare the data | |
| void | readContentZones (MWAWEntry const &entry, bool mainOle) |
| final reading of a text zone | |
| MWAWTextListenerPtr | createListener (librevenge::RVNGTextInterface *interface) |
| creates the main listener | |
| double | getTextHeight () const |
| returns the page height, ie. paper size less margin (in inches) less header/footer size | |
| void | newPage (int number, bool soft=false) |
| adds a new page | |
| void | readFootNote (int id) |
| sends text corresponding to the footnote id to the listener (via MsWks4Text) | |
| MWAWEntry | getTextPosition () const |
| return the text positions ( used for frame text) | |
| bool | readPRNT (MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page) |
| reads the PRNT zone which contains the printer properties ( page dimension, margins, ...) | |
| bool | readDOP (MWAWInputStreamPtr input, MWAWEntry const &entry, MWAWPageSpan &page) |
| parses the DIO zone which contains the document properties (dimension, ...) | |
| bool | readFRAM (MWAWInputStreamPtr input, MWAWEntry const &entry) |
| parses the FRAM zone which contains some information about frames (header, footer, ...) | |
| bool | readRLRB (MWAWInputStreamPtr input, MWAWEntry const &entry) |
| parses the RLRB zone which seems to contain some position in the page ? | |
| bool | readSELN (MWAWInputStreamPtr input, MWAWEntry const &entry) |
| parses the SELN zone which seems to contain some information about the actual | |
| void | setAscii (std::string const &oleName) |
| inits the ascii file | |
| libmwaw::DebugFile & | ascii () |
| a DebugFile used to write what we recognize when we parse the document | |
Protected Attributes | |
| MWAWParser * | m_mainParser |
| the main parser | |
| shared_ptr< MWAWParserState > | m_parserState |
| the parser state | |
| shared_ptr < MsWks4ZoneInternal::State > | m_state |
| the internal state | |
| shared_ptr< MsWksDocument > | m_document |
| the zone data | |
Private Member Functions | |
| MsWks4Zone (MsWks4Zone const &orig) | |
| MsWks4Zone & | operator= (MsWks4Zone const &orig) |
Friends | |
| class | MsWksDocument |
| class | MsWksDRParser |
| class | MsWksParser |
| class | MsWks4Text |
The class which parses the main zones of a mac MS Works document v4.
This class must be associated with a MsWksParser or a MsWksDocument, 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 MsWksGraph, a MsWks4Text to parse the the graphic and the text parts.
It reads the entries:
| MsWks4Zone::MsWks4Zone | ( | MWAWInputStreamPtr | input, |
| MWAWParserStatePtr | parserState, | ||
| MWAWParser & | parser, | ||
| std::string const & | oleName | ||
| ) |
constructor
destructor
| MsWks4Zone::MsWks4Zone | ( | MsWks4Zone const & | orig | ) | [private] |
| libmwaw::DebugFile & MsWks4Zone::ascii | ( | ) | [protected] |
a DebugFile used to write what we recognize when we parse the document
| MWAWTextListenerPtr MsWks4Zone::createListener | ( | librevenge::RVNGTextInterface * | interface | ) | [protected] |
creates the main listener
| bool MsWks4Zone::createZones | ( | bool | mainOle | ) | [protected] |
finds and parses all the zones to prepare the data
Referenced by MsWksDocument::sendTextbox().
| MWAWInputStreamPtr MsWks4Zone::getInput | ( | ) | [protected] |
returns the actual input
| double MsWks4Zone::getTextHeight | ( | ) | const [protected] |
returns the page height, ie. paper size less margin (in inches) less header/footer size
Referenced by createListener().
| MWAWEntry MsWks4Zone::getTextPosition | ( | ) | const [protected] |
return the text positions ( used for frame text)
Referenced by MsWksDocument::sendTextbox().
| void MsWks4Zone::init | ( | ) | [protected] |
inits all internal variables
Referenced by MsWks4Zone().
| void MsWks4Zone::newPage | ( | int | number, |
| bool | soft = false |
||
| ) | [protected] |
adds a new page
Referenced by readContentZones().
| MsWks4Zone& MsWks4Zone::operator= | ( | MsWks4Zone const & | orig | ) | [private] |
| bool MsWks4Zone::parseHeaderIndex | ( | MWAWInputStreamPtr & | input | ) | [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().
| bool MsWks4Zone::parseHeaderIndexEntry | ( | MWAWInputStreamPtr & | input | ) | [protected] |
parses an index entry
Referenced by parseHeaderIndex().
| void MsWks4Zone::readContentZones | ( | MWAWEntry const & | entry, |
| bool | mainOle | ||
| ) | [protected] |
final reading of a text zone
Referenced by MsWksDocument::sendTextbox().
| bool MsWks4Zone::readDOP | ( | MWAWInputStreamPtr | input, |
| MWAWEntry const & | entry, | ||
| MWAWPageSpan & | page | ||
| ) | [protected] |
parses the DIO zone which contains the document properties (dimension, ...)
Referenced by createZones().
| void MsWks4Zone::readFootNote | ( | int | id | ) | [protected] |
sends text corresponding to the footnote id to the listener (via MsWks4Text)
| bool MsWks4Zone::readFRAM | ( | MWAWInputStreamPtr | input, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
parses the FRAM zone which contains some information about frames (header, footer, ...)
Referenced by createZones().
| bool MsWks4Zone::readPRNT | ( | MWAWInputStreamPtr | input, |
| MWAWEntry const & | entry, | ||
| MWAWPageSpan & | page | ||
| ) | [protected] |
reads the PRNT zone which contains the printer properties ( page dimension, margins, ...)
Referenced by createZones().
| bool MsWks4Zone::readRLRB | ( | MWAWInputStreamPtr | input, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
parses the RLRB zone which seems to contain some position in the page ?
Referenced by createZones().
| bool MsWks4Zone::readSELN | ( | MWAWInputStreamPtr | input, |
| MWAWEntry const & | entry | ||
| ) | [protected] |
parses the SELN zone which seems to contain some information about the actual
Referenced by createZones().
| void MsWks4Zone::setAscii | ( | std::string const & | oleName | ) | [protected] |
inits the ascii file
Referenced by MsWks4Zone().
friend class MsWks4Text [friend] |
friend class MsWksDocument [friend] |
Referenced by MsWks4Zone().
friend class MsWksDRParser [friend] |
friend class MsWksParser [friend] |
shared_ptr<MsWksDocument> MsWks4Zone::m_document [protected] |
the zone data
Referenced by ascii(), createListener(), createZones(), getInput(), getTextPosition(), init(), MsWks4Zone(), newPage(), parseHeaderIndex(), parseHeaderIndexEntry(), readContentZones(), readDOP(), readFootNote(), readFRAM(), readPRNT(), readRLRB(), readSELN(), and setAscii().
MWAWParser* MsWks4Zone::m_mainParser [protected] |
the main parser
Referenced by readContentZones().
shared_ptr<MWAWParserState> MsWks4Zone::m_parserState [protected] |
the parser state
Referenced by createListener(), createZones(), getTextHeight(), MsWks4Zone(), newPage(), and readContentZones().
shared_ptr<MsWks4ZoneInternal::State> MsWks4Zone::m_state [protected] |
the internal state
Referenced by createListener(), createZones(), getTextHeight(), init(), newPage(), readContentZones(), readDOP(), and readFRAM().