HMWJParser Class Reference

the main class to read a HanMac Word-J file More...

#include <HMWJParser.hxx>

Inheritance diagram for HMWJParser:
MWAWParser

Public Member Functions

 HMWJParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor More...
 
virtual ~HMWJParser ()
 destructor More...
 
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not) More...
 
void parse (WPXDocumentInterface *documentInterface)
 virtual function used to parse the input More...
 
- Public Member Functions inherited from MWAWParser
virtual ~MWAWParser ()
 virtual destructor More...
 
int version () const
 returns the works version More...
 
void setVersion (int vers)
 sets the works version More...
 

Protected Member Functions

void init ()
 inits all internal variables More...
 
void createDocument (WPXDocumentInterface *documentInterface)
 creates the listener which will be associated to the document More...
 
bool createZones ()
 finds the different objects zones in a Hapanese File More...
 
Vec2f getPageLeftTop () const
 returns the page left top point ( in inches) More...
 
void newPage (int number)
 adds a new page More...
 
bool sendText (long id, long cPos, bool asGraphic=false)
 send a text zone More...
 
bool canSendTextAsGraphic (long id, long cPos)
 check if we can send a textzone as graphic More...
 
bool sendZone (long zId)
 send a zone More...
 
bool getColor (int colId, int patternId, MWAWColor &color) const
 returns the color associated with a pattern More...
 
bool checkEntry (MWAWEntry &entry)
 look in entry.begin() to see if a entry exists at this position, if so fills entry.end(), entry.id(), ... More...
 
bool readZonesList ()
 try to read the zones list More...
 
bool readZone (MWAWEntry &entry)
 try to read a generic zone More...
 
bool readClassicHeader (HMWJZoneHeader &header, long endPos=-1)
 try to read a header of classic zone More...
 
bool decodeZone (MWAWEntry const &entry, WPXBinaryData &data)
 try to decode a zone More...
 
bool readPrintInfo (MWAWEntry const &entry)
 try to read a printinfo zone More...
 
bool readHeaderEnd ()
 try to read a unknown zone, just after the header (simillar to HMW Zoneb) More...
 
bool readZoneA (MWAWEntry const &entry)
 try to read the zone A ( a big zone containing 5 sub zone ? ) More...
 
bool readZoneB (MWAWEntry const &entry)
 try to read the zone B More...
 
- Protected Member Functions inherited from MWAWParser
 MWAWParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor (protected) More...
 
 MWAWParser (MWAWParserStatePtr state)
 constructor using a state More...
 
MWAWParserStatePtr getParserState ()
 returns the parser state More...
 
MWAWHeadergetHeader ()
 returns the header More...
 
MWAWInputStreamPtrgetInput ()
 returns the actual input More...
 
MWAWGraphicListenerPtrgetGraphicListener ()
 returns the graphic listener More...
 
MWAWContentListenerPtrgetListener ()
 returns the listener More...
 
MWAWPageSpan const & getPageSpan () const
 returns the actual page dimension More...
 
MWAWPageSpangetPageSpan ()
 returns the actual page dimension More...
 
double getFormLength () const
 returns the form length More...
 
double getFormWidth () const
 returns the form width More...
 
double getPageLength () const
 returns the page length (form length without margin ) More...
 
double getPageWidth () const
 returns the page width (form width without margin ) More...
 
MWAWRSRCParserPtrgetRSRCParser ()
 returns the rsrc parser More...
 
void setListener (MWAWContentListenerPtr &listener)
 sets the listener More...
 
void resetListener ()
 resets the listener More...
 
MWAWFontConverterPtrgetFontConverter ()
 returns the font converter More...
 
void setFontConverter (MWAWFontConverterPtr fontConverter)
 sets the font convertor More...
 
libmwaw::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document More...
 
void setAsciiName (char const *name)
 Debugging: change the default ascii file. More...
 
std::string const & asciiName () const
 return the ascii file name More...
 

Protected Attributes

shared_ptr
< HMWJParserInternal::State
m_state
 the state More...
 
shared_ptr< HMWJGraphm_graphParser
 the graph parser More...
 
shared_ptr< HMWJTextm_textParser
 the text parser More...
 

Friends

class HMWJGraph
 
class HMWJText
 
class HMWJParserInternal::SubDocument
 

Detailed Description

the main class to read a HanMac Word-J file

Constructor & Destructor Documentation

HMWJParser::HMWJParser ( MWAWInputStreamPtr  input,
MWAWRSRCParserPtr  rsrcParser,
MWAWHeader header 
)

constructor

HMWJParser::~HMWJParser ( )
virtual

destructor

Member Function Documentation

bool HMWJParser::canSendTextAsGraphic ( long  id,
long  cPos 
)
protected

check if we can send a textzone as graphic

Referenced by HMWJGraph::canCreateGraphic(), HMWJGraph::sendFrame(), and HMWJGraph::sendGroupChild().

bool HMWJParser::checkEntry ( MWAWEntry entry)
protected

look in entry.begin() to see if a entry exists at this position, if so fills entry.end(), entry.id(), ...

Referenced by createZones(), and readZonesList().

bool HMWJParser::checkHeader ( MWAWHeader header,
bool  strict = false 
)
virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

void HMWJParser::createDocument ( WPXDocumentInterface *  documentInterface)
protected

creates the listener which will be associated to the document

Referenced by parse().

bool HMWJParser::createZones ( )
protected

finds the different objects zones in a Hapanese File

Referenced by parse().

bool HMWJParser::decodeZone ( MWAWEntry const &  entry,
WPXBinaryData &  data 
)
protected

try to decode a zone

Referenced by HMWJText::computeNumPages(), and HMWJText::sendText().

bool HMWJParser::getColor ( int  colId,
int  patternId,
MWAWColor color 
) const
protected

returns the color associated with a pattern

Referenced by HMWJText::readFont(), and HMWJText::readParagraph().

Vec2f HMWJParser::getPageLeftTop ( ) const
protected

returns the page left top point ( in inches)

void HMWJParser::init ( )
protected

inits all internal variables

Referenced by HMWJParser().

void HMWJParser::newPage ( int  number)
protected

adds a new page

Referenced by HMWJText::sendText().

void HMWJParser::parse ( WPXDocumentInterface *  documentInterface)
virtual

virtual function used to parse the input

Implements MWAWParser.

bool HMWJParser::readHeaderEnd ( )
protected

try to read a unknown zone, just after the header (simillar to HMW Zoneb)

Referenced by createZones().

bool HMWJParser::readPrintInfo ( MWAWEntry const &  entry)
protected

try to read a printinfo zone

Referenced by checkHeader().

bool HMWJParser::readZone ( MWAWEntry entry)
protected

try to read a generic zone

Referenced by createZones().

bool HMWJParser::readZoneA ( MWAWEntry const &  entry)
protected

try to read the zone A ( a big zone containing 5 sub zone ? )

Referenced by readZone().

bool HMWJParser::readZoneB ( MWAWEntry const &  entry)
protected

try to read the zone B

Referenced by readZone().

bool HMWJParser::readZonesList ( )
protected

try to read the zones list

Referenced by createZones().

bool HMWJParser::sendText ( long  id,
long  cPos,
bool  asGraphic = false 
)
protected

send a text zone

Referenced by HMWJGraph::sendText().

bool HMWJParser::sendZone ( long  zId)
protected

send a zone

Referenced by HMWJText::sendText().

Friends And Related Function Documentation

friend class HMWJGraph
friend

Referenced by init().

friend class HMWJParserInternal::SubDocument
friend
friend class HMWJText
friend

Referenced by init().

Member Data Documentation

shared_ptr<HMWJGraph> HMWJParser::m_graphParser
protected

the graph parser

Referenced by createDocument(), createZones(), getColor(), init(), parse(), readZone(), and sendZone().

shared_ptr<HMWJParserInternal::State> HMWJParser::m_state
protected
shared_ptr<HMWJText> HMWJParser::m_textParser
protected

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

Generated on Tue Mar 10 2015 17:32:09 for libmwaw by doxygen 1.8.5