the main class to read a Writerperfect file More...
#include <WriterPlsParser.hxx>
Public Member Functions | |
| WriterPlsParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header) | |
| constructor | |
| virtual | ~WriterPlsParser () |
| destructor | |
| bool | checkHeader (MWAWHeader *header, bool strict=false) |
| checks if the document header is correct (or not) | |
| void | parse (librevenge::RVNGTextInterface *documentInterface) |
| virtual function used to parse the input | |
Protected Member Functions | |
| void | init () |
| inits all internal variables | |
| void | createDocument (librevenge::RVNGTextInterface *documentInterface) |
| creates the listener which will be associated to the document | |
| bool | createZones () |
| finds the different objects zones | |
| bool | readPrintInfo () |
| read the print info zone | |
| bool | readWindowsInfo (int zone) |
| read the main info for zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER ) | |
| bool | sendWindow (int zone, MWAWVec2i limits=MWAWVec2i(-1,-1)) |
| send a zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER ) | |
| bool | readWindowsZone (int zone) |
| read the page info zone | |
| bool | readPageInfo (int zone) |
| read the page info zone | |
| bool | readColInfo (int zone) |
| read the col info zone ? | |
| bool | readParagraphInfo (int zone) |
| read the paragraph info zone | |
| bool | findSection (int zone, MWAWVec2i limits, MWAWSection &sec) |
| try to find the data which correspond to a section ( mainly column ) | |
| bool | readSection (WriterPlsParserInternal::ParagraphInfo const &info, bool mainBlock) |
| read a section | |
| bool | readText (WriterPlsParserInternal::ParagraphInfo const &info) |
| read a text | |
| bool | readTable (WriterPlsParserInternal::ParagraphInfo const &info) |
| read a table | |
| bool | readGraphic (WriterPlsParserInternal::ParagraphInfo const &info) |
| read a graphic | |
| bool | readUnknown (WriterPlsParserInternal::ParagraphInfo const &info) |
| read a unknown section | |
| double | getTextHeight () const |
| returns the page height, ie. paper size less margin (in inches) and header/footer | |
| void | newPage (int number) |
| adds a new page | |
| bool | readParagraphData (WriterPlsParserInternal::ParagraphInfo const &info, bool hasFonts, WriterPlsParserInternal::ParagraphData &data) |
| reads a paragraph data | |
| MWAWParagraph | getParagraph (WriterPlsParserInternal::ParagraphData const &data) |
| returns a paragraph corresponding to a paragraph data | |
| bool | readFonts (int nFonts, int type, std::vector< WriterPlsParserInternal::Font > &fonts) |
| reads a list of font (with position) | |
| bool | readLines (WriterPlsParserInternal::ParagraphInfo const &info, int nLines, std::vector< WriterPlsParserInternal::Line > &lines) |
| reads a list of line (with position) | |
Protected Attributes | |
| shared_ptr < WriterPlsParserInternal::State > | m_state |
| the state | |
Friends | |
| class | WriterPlsParserInternal::SubDocument |
the main class to read a Writerperfect file
| WriterPlsParser::WriterPlsParser | ( | MWAWInputStreamPtr | input, |
| MWAWRSRCParserPtr | rsrcParser, | ||
| MWAWHeader * | header | ||
| ) |
constructor
| WriterPlsParser::~WriterPlsParser | ( | ) | [virtual] |
destructor
| bool WriterPlsParser::checkHeader | ( | MWAWHeader * | header, |
| bool | strict = false |
||
| ) | [virtual] |
| void WriterPlsParser::createDocument | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [protected] |
creates the listener which will be associated to the document
Referenced by parse().
| bool WriterPlsParser::createZones | ( | ) | [protected] |
finds the different objects zones
Referenced by parse().
| bool WriterPlsParser::findSection | ( | int | zone, |
| MWAWVec2i | limits, | ||
| MWAWSection & | sec | ||
| ) | [protected] |
try to find the data which correspond to a section ( mainly column )
Referenced by sendWindow().
| MWAWParagraph WriterPlsParser::getParagraph | ( | WriterPlsParserInternal::ParagraphData const & | data | ) | [protected] |
returns a paragraph corresponding to a paragraph data
Referenced by readText().
| double WriterPlsParser::getTextHeight | ( | ) | const [protected] |
returns the page height, ie. paper size less margin (in inches) and header/footer
Referenced by readPageInfo().
| void WriterPlsParser::init | ( | ) | [protected] |
inits all internal variables
Referenced by WriterPlsParser().
| void WriterPlsParser::newPage | ( | int | number | ) | [protected] |
adds a new page
Referenced by sendWindow().
| void WriterPlsParser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) | [virtual] |
virtual function used to parse the input
Implements MWAWTextParser.
| bool WriterPlsParser::readColInfo | ( | int | zone | ) | [protected] |
read the col info zone ?
Referenced by readWindowsZone().
| bool WriterPlsParser::readFonts | ( | int | nFonts, |
| int | type, | ||
| std::vector< WriterPlsParserInternal::Font > & | fonts | ||
| ) | [protected] |
reads a list of font (with position)
Referenced by readParagraphData().
| bool WriterPlsParser::readGraphic | ( | WriterPlsParserInternal::ParagraphInfo const & | info | ) | [protected] |
read a graphic
Referenced by sendWindow().
| bool WriterPlsParser::readLines | ( | WriterPlsParserInternal::ParagraphInfo const & | info, |
| int | nLines, | ||
| std::vector< WriterPlsParserInternal::Line > & | lines | ||
| ) | [protected] |
reads a list of line (with position)
Referenced by readText().
| bool WriterPlsParser::readPageInfo | ( | int | zone | ) | [protected] |
read the page info zone
Referenced by readWindowsZone().
| bool WriterPlsParser::readParagraphData | ( | WriterPlsParserInternal::ParagraphInfo const & | info, |
| bool | hasFonts, | ||
| WriterPlsParserInternal::ParagraphData & | data | ||
| ) | [protected] |
reads a paragraph data
Referenced by readGraphic(), readSection(), readTable(), readText(), and readUnknown().
| bool WriterPlsParser::readParagraphInfo | ( | int | zone | ) | [protected] |
read the paragraph info zone
Referenced by readWindowsZone().
| bool WriterPlsParser::readPrintInfo | ( | ) | [protected] |
read the print info zone
Referenced by createZones().
| bool WriterPlsParser::readSection | ( | WriterPlsParserInternal::ParagraphInfo const & | info, |
| bool | mainBlock | ||
| ) | [protected] |
read a section
Referenced by sendWindow().
| bool WriterPlsParser::readTable | ( | WriterPlsParserInternal::ParagraphInfo const & | info | ) | [protected] |
read a table
Referenced by sendWindow().
| bool WriterPlsParser::readText | ( | WriterPlsParserInternal::ParagraphInfo const & | info | ) | [protected] |
read a text
Referenced by sendWindow().
| bool WriterPlsParser::readUnknown | ( | WriterPlsParserInternal::ParagraphInfo const & | info | ) | [protected] |
read a unknown section
Referenced by sendWindow().
| bool WriterPlsParser::readWindowsInfo | ( | int | zone | ) | [protected] |
read the main info for zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Referenced by checkHeader(), and createZones().
| bool WriterPlsParser::readWindowsZone | ( | int | zone | ) | [protected] |
read the page info zone
Referenced by createZones().
| bool WriterPlsParser::sendWindow | ( | int | zone, |
| MWAWVec2i | limits = MWAWVec2i(-1,-1) |
||
| ) | [protected] |
send a zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Referenced by parse(), and WriterPlsParserInternal::SubDocument::parse().
friend class WriterPlsParserInternal::SubDocument [friend] |
shared_ptr<WriterPlsParserInternal::State> WriterPlsParser::m_state [protected] |
the state
Referenced by checkHeader(), createDocument(), createZones(), findSection(), getTextHeight(), init(), newPage(), readColInfo(), readPageInfo(), readParagraphInfo(), readWindowsInfo(), readWindowsZone(), and sendWindow().