the main class to read the graphic part of a HanMac Word-J file More...
#include <GWGraph.hxx>
Public Member Functions | |
GWGraph (GWParser &parser) | |
constructor | |
virtual | ~GWGraph () |
destructor | |
int | version () const |
returns the file version | |
int | numPages () const |
returns the number of pages | |
Protected Member Functions | |
bool | sendPageGraphics () |
try to send the page graphic | |
void | flushExtra () |
sends the data which have not yet been sent to the listener | |
bool | readPatterns (MWAWEntry const &entry) |
read a pattern list block ( PAT# resource block ) | |
bool | readPalettes (MWAWEntry const &entry) |
read a list of color and maybe patterns ( PlTT resource block: v2 ) | |
bool | sendPageFrames (GWGraphInternal::Zone const &zone) |
try to send all data corresponding to a zone | |
bool | sendFrame (shared_ptr< GWGraphInternal::Frame > frame, GWGraphInternal::Zone const &zone) |
try to send a frame | |
bool | sendGroup (GWGraphInternal::FrameGroup const &group, GWGraphInternal::Zone const &zone, MWAWPosition const &pos) |
try to send a group | |
void | sendGroupChild (GWGraphInternal::FrameGroup const &group, GWGraphInternal::Zone const &zone, MWAWPosition const &pos) |
try to send a group elements by elemenys | |
bool | canCreateGraphic (GWGraphInternal::FrameGroup const &group, GWGraphInternal::Zone const &zone) |
check if we can send a group as graphic | |
void | sendGroup (GWGraphInternal::FrameGroup const &group, GWGraphInternal::Zone const &zone, MWAWGraphicListenerPtr &listener) |
send the group as a graphic zone | |
bool | sendTextbox (GWGraphInternal::FrameText const &text, GWGraphInternal::Zone const &zone, MWAWPosition const &pos) |
try to send a textbox | |
bool | sendTextboxAsGraphic (Box2f const &box, GWGraphInternal::FrameText const &text, MWAWGraphicStyle const &style) |
try to send a textbox via a graphiclistener | |
bool | sendTextbox (MWAWEntry const &entry, bool inGraphic) |
try to send the textbox text (via the mainParser) | |
bool | sendPicture (MWAWEntry const &entry, MWAWPosition pos) |
try to send a picture | |
bool | sendShape (GWGraphInternal::FrameShape const &graph, GWGraphInternal::Zone const &zone, MWAWPosition const &pos) |
try to send a basic picture | |
bool | readGraphicZone () |
try to read the graphic zone ( draw file or end of v2 text file) | |
bool | isGraphicZone () |
return true if this corresponds to a graphic zone | |
bool | findGraphicZone () |
try to find the beginning of the next graphic zone | |
bool | isPageFrames () |
check if a zone is or not a page frame zone | |
bool | readPageFrames () |
try to read a list of page frame ( picture, texture or basic ) | |
shared_ptr < GWGraphInternal::Frame > | readFrameHeader () |
try to read a basic frame header | |
bool | readFrameExtraData (GWGraphInternal::Frame &frame, int id, long endPos=-1) |
try to read a frame extra data zone | |
bool | readStyle (MWAWGraphicStyle &style) |
try to read a zone style | |
bool | readLineFormat (std::string &extra) |
try to read a line format style? in v1 | |
bool | readFrameExtraDataRec (GWGraphInternal::Zone &zone, int id, std::set< int > &seens, long endPos=-1) |
try to read a frame extra data zone recursively ( draw method) | |
bool | checkGraph (GWGraphInternal::Zone &zone, int id, std::set< int > &seens) |
check if the graph of zones is ok (ie. does not form loop) | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
shared_ptr < GWGraphInternal::State > | m_state |
the state | |
GWParser * | m_mainParser |
the main parser; | |
Private Member Functions | |
GWGraph (GWGraph const &orig) | |
GWGraph & | operator= (GWGraph const &orig) |
Friends | |
class | GWParser |
class | GWGraphInternal::SubDocument |
the main class to read the graphic part of a HanMac Word-J file
GWGraph::GWGraph | ( | GWParser & | parser | ) |
constructor
GWGraph::~GWGraph | ( | ) | [virtual] |
destructor
GWGraph::GWGraph | ( | GWGraph const & | orig | ) | [private] |
bool GWGraph::canCreateGraphic | ( | GWGraphInternal::FrameGroup const & | group, |
GWGraphInternal::Zone const & | zone | ||
) | [protected] |
check if we can send a group as graphic
Referenced by sendGroupChild().
bool GWGraph::checkGraph | ( | GWGraphInternal::Zone & | zone, |
int | id, | ||
std::set< int > & | seens | ||
) | [protected] |
check if the graph of zones is ok (ie. does not form loop)
Referenced by readPageFrames().
bool GWGraph::findGraphicZone | ( | ) | [protected] |
try to find the beginning of the next graphic zone
Referenced by readGraphicZone().
void GWGraph::flushExtra | ( | ) | [protected] |
sends the data which have not yet been sent to the listener
bool GWGraph::isGraphicZone | ( | ) | [protected] |
return true if this corresponds to a graphic zone
Referenced by findGraphicZone(), and readGraphicZone().
bool GWGraph::isPageFrames | ( | ) | [protected] |
check if a zone is or not a page frame zone
Referenced by isGraphicZone(), and readPageFrames().
int GWGraph::numPages | ( | ) | const |
returns the number of pages
bool GWGraph::readFrameExtraData | ( | GWGraphInternal::Frame & | frame, |
int | id, | ||
long | endPos = -1 |
||
) | [protected] |
try to read a frame extra data zone
Referenced by readFrameExtraDataRec(), and readPageFrames().
bool GWGraph::readFrameExtraDataRec | ( | GWGraphInternal::Zone & | zone, |
int | id, | ||
std::set< int > & | seens, | ||
long | endPos = -1 |
||
) | [protected] |
try to read a frame extra data zone recursively ( draw method)
Referenced by readPageFrames().
shared_ptr< GWGraphInternal::Frame > GWGraph::readFrameHeader | ( | ) | [protected] |
try to read a basic frame header
Referenced by readPageFrames().
bool GWGraph::readGraphicZone | ( | ) | [protected] |
try to read the graphic zone ( draw file or end of v2 text file)
bool GWGraph::readLineFormat | ( | std::string & | extra | ) | [protected] |
try to read a line format style? in v1
Referenced by readGraphicZone(), readPageFrames(), and readStyle().
bool GWGraph::readPageFrames | ( | ) | [protected] |
try to read a list of page frame ( picture, texture or basic )
Referenced by readGraphicZone().
bool GWGraph::readPalettes | ( | MWAWEntry const & | entry | ) | [protected] |
read a list of color and maybe patterns ( PlTT resource block: v2 )
bool GWGraph::readPatterns | ( | MWAWEntry const & | entry | ) | [protected] |
read a pattern list block ( PAT# resource block )
bool GWGraph::readStyle | ( | MWAWGraphicStyle & | style | ) | [protected] |
try to read a zone style
Referenced by readGraphicZone(), and readPageFrames().
bool GWGraph::sendFrame | ( | shared_ptr< GWGraphInternal::Frame > | frame, |
GWGraphInternal::Zone const & | zone | ||
) | [protected] |
try to send a frame
Referenced by sendGroup(), sendGroupChild(), and sendPageFrames().
bool GWGraph::sendGroup | ( | GWGraphInternal::FrameGroup const & | group, |
GWGraphInternal::Zone const & | zone, | ||
MWAWPosition const & | pos | ||
) | [protected] |
try to send a group
Referenced by sendFrame(), sendGroup(), and sendGroupChild().
void GWGraph::sendGroup | ( | GWGraphInternal::FrameGroup const & | group, |
GWGraphInternal::Zone const & | zone, | ||
MWAWGraphicListenerPtr & | listener | ||
) | [protected] |
send the group as a graphic zone
void GWGraph::sendGroupChild | ( | GWGraphInternal::FrameGroup const & | group, |
GWGraphInternal::Zone const & | zone, | ||
MWAWPosition const & | pos | ||
) | [protected] |
try to send a group elements by elemenys
Referenced by sendGroup().
bool GWGraph::sendPageFrames | ( | GWGraphInternal::Zone const & | zone | ) | [protected] |
try to send all data corresponding to a zone
Referenced by flushExtra(), and sendPageGraphics().
bool GWGraph::sendPageGraphics | ( | ) | [protected] |
try to send the page graphic
bool GWGraph::sendPicture | ( | MWAWEntry const & | entry, |
MWAWPosition | pos | ||
) | [protected] |
try to send a picture
Referenced by sendFrame().
bool GWGraph::sendShape | ( | GWGraphInternal::FrameShape const & | graph, |
GWGraphInternal::Zone const & | zone, | ||
MWAWPosition const & | pos | ||
) | [protected] |
try to send a basic picture
Referenced by sendFrame().
bool GWGraph::sendTextbox | ( | GWGraphInternal::FrameText const & | text, |
GWGraphInternal::Zone const & | zone, | ||
MWAWPosition const & | pos | ||
) | [protected] |
try to send a textbox
Referenced by GWGraphInternal::SubDocument::parse(), and sendFrame().
bool GWGraph::sendTextbox | ( | MWAWEntry const & | entry, |
bool | inGraphic | ||
) | [protected] |
try to send the textbox text (via the mainParser)
bool GWGraph::sendTextboxAsGraphic | ( | Box2f const & | box, |
GWGraphInternal::FrameText const & | text, | ||
MWAWGraphicStyle const & | style | ||
) | [protected] |
try to send a textbox via a graphiclistener
Referenced by sendGroup(), sendGroupChild(), and sendTextbox().
int GWGraph::version | ( | ) | const |
returns the file version
Referenced by findGraphicZone(), isGraphicZone(), isPageFrames(), readFrameHeader(), readGraphicZone(), readPageFrames(), and readStyle().
friend class GWGraphInternal::SubDocument [friend] |
friend class GWParser [friend] |
GWParser* GWGraph::m_mainParser [protected] |
the main parser;
Referenced by canCreateGraphic(), findGraphicZone(), isGraphicZone(), isPageFrames(), readGraphicZone(), readPageFrames(), readPalettes(), readPatterns(), sendFrame(), sendGroupChild(), and sendTextbox().
MWAWParserStatePtr GWGraph::m_parserState [protected] |
the parser state
Referenced by findGraphicZone(), flushExtra(), isGraphicZone(), isPageFrames(), readFrameExtraData(), readFrameExtraDataRec(), readFrameHeader(), readGraphicZone(), readLineFormat(), readPageFrames(), readStyle(), sendFrame(), sendGroup(), sendGroupChild(), sendPageFrames(), sendPageGraphics(), sendPicture(), sendShape(), sendTextbox(), sendTextboxAsGraphic(), and version().
shared_ptr<GWGraphInternal::State> GWGraph::m_state [protected] |
the state
Referenced by flushExtra(), numPages(), readPageFrames(), and sendPageGraphics().