StudentWritingCParser Class Referencefinal

the main class to read a Student Writing Center file More...

#include <StudentWritingCParser.hxx>

Inheritance diagram for StudentWritingCParser:
MWAWTextParser MWAWParser

Public Member Functions

 StudentWritingCParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor
 ~StudentWritingCParser () final
 destructor
bool checkHeader (MWAWHeader *header, bool strict=false) final
 checks if the document header is correct (or not)
void parse (librevenge::RVNGTextInterface *documentInterface) final
 virtual function used to parse the input
Public Member Functions inherited from MWAWTextParser
 ~MWAWTextParser () override
 destructor
Public Member Functions inherited from MWAWParser
virtual ~MWAWParser ()
 virtual destructor
int version () const
 returns the works version
MWAWParserStatePtr getParserState ()
 returns the parser state
MWAWHeadergetHeader ()
 returns the header
MWAWInputStreamPtrgetInput ()
 returns the actual input
MWAWListenerPtr getMainListener ()
 returns the main listener
MWAWGraphicListenerPtrgetGraphicListener ()
 returns the graphic listener
MWAWPresentationListenerPtrgetPresentationListener ()
 returns the presentation listener
MWAWSpreadsheetListenerPtrgetSpreadsheetListener ()
 returns the spreadsheet listener
MWAWTextListenerPtrgetTextListener ()
 returns the text listener
MWAWFontConverterPtrgetFontConverter ()
 returns the font converter
MWAWFontManagerPtrgetFontManager ()
 returns the font manager
MWAWPageSpan const & getPageSpan () const
 returns the actual page dimension
MWAWPageSpangetPageSpan ()
 returns the actual page dimension
double getFormLength () const
 returns the form length
double getFormWidth () const
 returns the form width
double getPageLength () const
 returns the page length (form length without margin )
double getPageWidth () const
 returns the page width (form width without margin )
MWAWRSRCParserPtrgetRSRCParser ()
 returns the rsrc parser
libmwaw::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document

Protected Member Functions

void createDocument (librevenge::RVNGTextInterface *documentInterface)
 creates the listener which will be associated to the document
bool createZones ()
 finds the different objects zones
bool readTextZone (StudentWritingCParserInternal::Zone const &zone)
 try to read a text zone with type=1
bool readFrame (StudentWritingCParserInternal::Zone &zone)
 try to read a frame zone with type=3
bool readParagraph (StudentWritingCParserInternal::Zone &zone)
 try to read the paragraph zone with type=4
bool readPicture (StudentWritingCParserInternal::Zone &zone)
 try to read a picture zone with type=6
bool readFontsList (MWAWEntry const &entry)
 try to read the font list: the first entry of a zone with type=7
bool readPrintInfo ()
 try to read the printer information
bool sendZone (int id)
 try to send a zone knowing its id
bool sendText (StudentWritingCParserInternal::Zone const &zone, StudentWritingCParserInternal::Zone const &parent, bool isMain=false)
 try to send the text(s) corresponding to a zone of type 5
bool sendPicture (MWAWPosition const &pos, int id)
 try to send a picture: type 6
MWAWInputStreamPtr decode ()
 low level: try to uncompress the different compressed zone
Protected Member Functions inherited from MWAWTextParser
 MWAWTextParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected)
 MWAWTextParser (MWAWParserStatePtr const &state)
 constructor using a state
Protected Member Functions inherited from MWAWParser
 MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
 constructor (protected)
 MWAWParser (MWAWParserStatePtr const &state)
 constructor using a state
void setVersion (int vers)
 sets the document's version
void setGraphicListener (MWAWGraphicListenerPtr &listener)
 sets the graphic listener
void resetGraphicListener ()
 resets the listener
void setPresentationListener (MWAWPresentationListenerPtr &listener)
 sets the presentation listener
void resetPresentationListener ()
 resets the listener
void setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
 sets the spreadsheet listener
void resetSpreadsheetListener ()
 resets the listener
void setTextListener (MWAWTextListenerPtr &listener)
 sets the text listener
void resetTextListener ()
 resets the listener
void setAsciiName (char const *name)
 Debugging: change the default ascii file.
std::string const & asciiName () const
 return the ascii file name

Protected Attributes

std::shared_ptr< StudentWritingCParserInternal::Statem_state
 the state

Friends

class StudentWritingCParserInternal::SubDocument

Detailed Description

the main class to read a Student Writing Center file

Constructor & Destructor Documentation

◆ StudentWritingCParser()

StudentWritingCParser::StudentWritingCParser ( MWAWInputStreamPtr const & input,
MWAWRSRCParserPtr const & rsrcParser,
MWAWHeader * header )

constructor

◆ ~StudentWritingCParser()

StudentWritingCParser::~StudentWritingCParser ( )
final

destructor

Member Function Documentation

◆ checkHeader()

bool StudentWritingCParser::checkHeader ( MWAWHeader * header,
bool strict = false )
finalvirtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

◆ createDocument()

void StudentWritingCParser::createDocument ( librevenge::RVNGTextInterface * documentInterface)
protected

creates the listener which will be associated to the document

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

◆ createZones()

bool StudentWritingCParser::createZones ( )
protected

finds the different objects zones

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

◆ decode()

MWAWInputStreamPtr StudentWritingCParser::decode ( )
protected

low level: try to uncompress the different compressed zone

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

◆ parse()

void StudentWritingCParser::parse ( librevenge::RVNGTextInterface * documentInterface)
finalvirtual

virtual function used to parse the input

Implements MWAWTextParser.

Referenced by StudentWritingCParserInternal::SubDocument.

◆ readFontsList()

bool StudentWritingCParser::readFontsList ( MWAWEntry const & entry)
protected

try to read the font list: the first entry of a zone with type=7

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ readFrame()

bool StudentWritingCParser::readFrame ( StudentWritingCParserInternal::Zone & zone)
protected

try to read a frame zone with type=3

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ readParagraph()

bool StudentWritingCParser::readParagraph ( StudentWritingCParserInternal::Zone & zone)
protected

try to read the paragraph zone with type=4

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ readPicture()

bool StudentWritingCParser::readPicture ( StudentWritingCParserInternal::Zone & zone)
protected

try to read a picture zone with type=6

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ readPrintInfo()

bool StudentWritingCParser::readPrintInfo ( )
protected

try to read the printer information

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ readTextZone()

bool StudentWritingCParser::readTextZone ( StudentWritingCParserInternal::Zone const & zone)
protected

try to read a text zone with type=1

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

◆ sendPicture()

bool StudentWritingCParser::sendPicture ( MWAWPosition const & pos,
int id )
protected

try to send a picture: type 6

Referenced by sendZone(), and StudentWritingCParserInternal::SubDocument.

◆ sendText()

bool StudentWritingCParser::sendText ( StudentWritingCParserInternal::Zone const & zone,
StudentWritingCParserInternal::Zone const & parent,
bool isMain = false )
protected

try to send the text(s) corresponding to a zone of type 5

Referenced by sendZone(), and StudentWritingCParserInternal::SubDocument.

◆ sendZone()

bool StudentWritingCParser::sendZone ( int id)
protected

try to send a zone knowing its id

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

◆ StudentWritingCParserInternal::SubDocument

Member Data Documentation

◆ m_state


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

Generated on Sun Jun 29 2025 04:36:29 for libmwaw by doxygen 1.14.0