HMWJParser Class Reference

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

#include <HMWJParser.hxx>

Inheritance diagram for HMWJParser:
MWAWParser

List of all members.

Public Member Functions

 HMWJParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor
virtual ~HMWJParser ()
 destructor
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not)
void parse (WPXDocumentInterface *documentInterface)
 virtual function used to parse the input

Protected Member Functions

void init ()
 inits all internal variables
void createDocument (WPXDocumentInterface *documentInterface)
 creates the listener which will be associated to the document
bool createZones ()
 finds the different objects zones in a Hapanese File
Vec2f getPageLeftTop () const
 returns the page left top point ( in inches)
void newPage (int number)
 adds a new page
bool sendText (long id, long cPos, bool asGraphic=false)
 send a text zone
bool canSendTextAsGraphic (long id, long cPos)
 check if we can send a textzone as graphic
bool sendZone (long zId)
 send a zone
bool getColor (int colId, int patternId, MWAWColor &color) const
 returns the color associated with a pattern
bool checkEntry (MWAWEntry &entry)
 look in entry.begin() to see if a entry exists at this position, if so fills entry.end(), entry.id(), ...
bool readZonesList ()
 try to read the zones list
bool readZone (MWAWEntry &entry)
 try to read a generic zone
bool readClassicHeader (HMWJZoneHeader &header, long endPos=-1)
 try to read a header of classic zone
bool decodeZone (MWAWEntry const &entry, WPXBinaryData &data)
 try to decode a zone
bool readPrintInfo (MWAWEntry const &entry)
 try to read a printinfo zone
bool readHeaderEnd ()
 try to read a unknown zone, just after the header (simillar to HMW Zoneb)
bool readZoneA (MWAWEntry const &entry)
 try to read the zone A ( a big zone containing 5 sub zone ? )
bool readZoneB (MWAWEntry const &entry)
 try to read the zone B

Protected Attributes

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

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


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