WriterPlsParser Class Reference

the main class to read a Writerperfect file More...

#include <WriterPlsParser.hxx>

Inheritance diagram for WriterPlsParser:
MWAWTextParser MWAWParser

List of all members.

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

Detailed Description

the main class to read a Writerperfect file


Constructor & Destructor Documentation

constructor

destructor


Member Function Documentation

bool WriterPlsParser::checkHeader ( MWAWHeader header,
bool  strict = false 
) [virtual]

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

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().

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().

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().

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().

read a table

Referenced by sendWindow().

read a text

Referenced by sendWindow().

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().


Friends And Related Function Documentation

friend class WriterPlsParserInternal::SubDocument [friend]

Member Data Documentation


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