the main class to read the structures part of MacWrite Pro file More...
#include <MacWrtProStructures.hxx>
Public Member Functions | |
| MacWrtProStructures (MacWrtProParser &mainParser) | |
| constructor | |
| virtual | ~MacWrtProStructures () |
| destructor | |
| int | version () const |
| returns the file version. | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| bool | createZones (std::shared_ptr< MWAWStream > &stream, int numPages) |
| finds the different objects zones | |
| bool | createZonesII (std::shared_ptr< MWAWStream > &stream, int numPages) |
| finds the different objects zones in a MacWriteII file | |
| int | numPages () const |
| returns the number of pages | |
| bool | sendMainZone () |
| send the main zone | |
| void | updatePageSpan (int page, bool hasTitlePage, MWAWPageSpan &pageSpan) |
| update the page span | |
| void | flushExtra () |
| flush not send zones | |
| void | buildPageStructures () |
| look for pages structures | |
| void | buildTableStructures () |
| look for tables structures and if so, prepare data | |
| bool | readStyles (std::shared_ptr< MWAWStream > &stream) |
| try to read the paragraph styles zone which begins at address 0x200 | |
| bool | readStyle (std::shared_ptr< MWAWStream > &stream, int styleId) |
| try to read a style | |
| bool | readCharStyles (std::shared_ptr< MWAWStream > &stream) |
| try to read the character styles zone | |
| bool | readParagraphs (std::shared_ptr< MWAWStream > &stream) |
| try to read a list of paragraph | |
| bool | readParagraph (std::shared_ptr< MWAWStream > &stream, MacWrtProStructuresInternal::Paragraph ¶) |
| try to read a paragraph | |
| bool | readGraphicsList (std::shared_ptr< MWAWStream > &stream, int nuumPages) |
| try to read the list of graphic entries: 1.0 1.5 | |
| std::shared_ptr< MacWrtProStructuresInternal::Graphic > | readGraphic (std::shared_ptr< MWAWStream > &stream) |
| try to read a graphic entry: 1.0, 1.5 | |
| bool | readPagesListII (std::shared_ptr< MWAWStream > const &stream, int numPages) |
| try to parse the list of page: II | |
| bool | readPageII (std::shared_ptr< MWAWStream > const &stream, int wh, MacWrtProStructuresInternal::Page &page) |
| try to read a page entry: II | |
| bool | readGraphicII (std::shared_ptr< MWAWStream > const &stream, int id, bool mainGraphic, MacWrtProStructuresInternal::Graphic &graphic) |
| try to read a graphic structure: II | |
| bool | readFontsName (std::shared_ptr< MWAWStream > &stream) |
| try to read the fonts zone | |
| bool | readFontsDef (std::shared_ptr< MWAWStream > &stream) |
| try to read the list of fonts | |
| bool | readFont (std::shared_ptr< MWAWStream > &stream, MacWrtProStructuresInternal::Font &font) |
| try to read a font | |
| bool | readSections (std::shared_ptr< MWAWStream > &stream, std::vector< MacWrtProStructuresInternal::Section > §ions) |
| try to read the section info ? | |
| bool | readSelection (std::shared_ptr< MWAWStream > &stream) |
| try to read a 16 bytes the zone which follow the char styles zone ( the selection?) | |
| bool | readStructB (std::shared_ptr< MWAWStream > &stream) |
| try to read a zone which follow the fonts zone(checkme) | |
| bool | getColor (int colId, MWAWColor &color) const |
| try to return the color corresponding to colId | |
| bool | getPattern (int patId, float &patternPercent) const |
| try to return the pattern corresponding to patId | |
| bool | getColor (int colId, int patId, MWAWColor &color) const |
| try to return the color corresponding to colId and patId | |
| bool | isSent (int graphicId) |
| returns true if the graphic is already sent ( or does not exists) | |
| bool | send (int graphicId, bool mainZone=false) |
| try to send a graphic which corresponds to graphicid | |
| MWAWTextListenerPtr & | getTextListener () |
| returns the actual listener | |
Static Protected Member Functions | |
| static bool | readString (MWAWInputStreamPtr input, std::string &res) |
| try to read a string | |
Protected Attributes | |
| MWAWParserStatePtr | m_parserState |
| the parser state | |
| MacWrtProParser & | m_mainParser |
| the main parser | |
| std::shared_ptr< MacWrtProStructuresInternal::State > | m_state |
| the state | |
| std::string | m_asciiName |
| the debug file name | |
Friends | |
| class | MacWrtProParser |
| class | MacWrtProParserInternal::SubDocument |
| struct | MacWrtProStructuresInternal::Cell |
| class | MacWrtProStructuresListenerState |
the main class to read the structures part of MacWrite Pro file
|
explicit |
constructor
Referenced by MacWrtProParser::init(), and MacWrtProStructuresListenerState.
|
virtual |
destructor
|
protected |
look for pages structures
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
look for tables structures and if so, prepare data
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
finds the different objects zones
Referenced by MacWrtProStructuresListenerState.
|
protected |
finds the different objects zones in a MacWriteII file
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
flush not send zones
Referenced by MacWrtProStructuresListenerState.
|
protected |
try to return the color corresponding to colId and patId
|
protected |
try to return the color corresponding to colId
Referenced by getColor(), MacWrtProStructuresListenerState, readFont(), and readGraphic().
|
protected |
try to return the pattern corresponding to patId
Referenced by getColor(), and MacWrtProStructuresListenerState.
|
protected |
returns the actual listener
Referenced by MacWrtProStructuresListenerState.
|
protected |
inits all internal variables
Referenced by MacWrtProStructures(), and MacWrtProStructuresListenerState.
|
protected |
returns true if the graphic is already sent ( or does not exists)
Referenced by MacWrtProStructuresListenerState.
|
protected |
returns the number of pages
Referenced by createZones(), createZonesII(), MacWrtProStructuresListenerState, readGraphicsList(), and readPagesListII().
|
protected |
try to read the character styles zone
Referenced by createZones(), createZonesII(), and MacWrtProStructuresListenerState.
|
protected |
try to read a font
Referenced by MacWrtProStructuresListenerState, readCharStyles(), readFontsDef(), and readStyle().
|
protected |
try to read the list of fonts
Referenced by createZones(), createZonesII(), and MacWrtProStructuresListenerState.
|
protected |
try to read the fonts zone
Referenced by createZones(), createZonesII(), and MacWrtProStructuresListenerState.
|
protected |
try to read a graphic entry: 1.0, 1.5
Referenced by MacWrtProStructuresListenerState, and readGraphicsList().
|
protected |
try to read a graphic structure: II
Referenced by MacWrtProStructuresListenerState, and readPageII().
|
protected |
try to read the list of graphic entries: 1.0 1.5
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
try to read a page entry: II
Referenced by MacWrtProStructuresListenerState, and readPagesListII().
|
protected |
try to parse the list of page: II
Referenced by createZonesII(), and MacWrtProStructuresListenerState.
|
protected |
try to read a paragraph
seems difficult to set bottom a percentage of the line unit, so do the strict minimum...
Referenced by MacWrtProStructuresListenerState, readParagraphs(), and readStyle().
|
protected |
try to read a list of paragraph
Referenced by createZones(), createZonesII(), and MacWrtProStructuresListenerState.
|
protected |
try to read the section info ?
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
try to read a 16 bytes the zone which follow the char styles zone ( the selection?)
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
staticprotected |
try to read a string
Referenced by createZones(), MacWrtProStructuresListenerState, and readGraphicsList().
|
protected |
try to read a zone which follow the fonts zone(checkme)
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
try to read a style
Referenced by MacWrtProStructuresListenerState, and readStyles().
|
protected |
try to read the paragraph styles zone which begins at address 0x200
Referenced by createZones(), and MacWrtProStructuresListenerState.
|
protected |
try to send a graphic which corresponds to graphicid
note: graphicId=-noteId to send footnote in MW2
Referenced by flushExtra(), MacWrtProStructuresListenerState, MacWrtProStructuresInternal::Cell::sendContent(), and sendMainZone().
|
protected |
send the main zone
Referenced by MacWrtProStructuresListenerState.
|
protected |
update the page span
Referenced by MacWrtProStructuresListenerState.
| int MacWrtProStructures::version | ( | ) | const |
returns the file version.
this version is only correct after the header is parsed
Referenced by createZones(), createZonesII(), flushExtra(), getColor(), getPattern(), MacWrtProStructuresListenerState, readCharStyles(), readFont(), readFontsDef(), readFontsName(), readParagraph(), readParagraphs(), send(), sendMainZone(), and updatePageSpan().
|
friend |
Referenced by MacWrtProParser, MacWrtProStructures(), and MacWrtProStructuresListenerState.
|
friend |
|
friend |
|
friend |
Referenced by MacWrtProStructuresListenerState, and sendMainZone().
|
protected |
the debug file name
Referenced by MacWrtProStructures().
|
protected |
the main parser
Referenced by buildPageStructures(), createZonesII(), MacWrtProStructures(), readGraphicsList(), send(), and updatePageSpan().
|
protected |
the parser state
Referenced by flushExtra(), getTextListener(), MacWrtProStructures(), readCharStyles(), readFontsDef(), readFontsName(), readStyle(), send(), and version().
|
protected |
the state
Referenced by buildPageStructures(), buildTableStructures(), createZones(), createZonesII(), flushExtra(), init(), isSent(), MacWrtProStructures(), numPages(), readFontsDef(), readGraphic(), readGraphicsList(), readPagesListII(), readParagraphs(), send(), sendMainZone(), updatePageSpan(), and version().