HMWJGraph Class Reference

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

#include <HMWJGraph.hxx>

List of all members.

Public Member Functions

 HMWJGraph (HMWJParser &parser)
 constructor
virtual ~HMWJGraph ()
 destructor
int version () const
 returns the file version
int numPages () const
 returns the number of pages

Protected Member Functions

bool getColor (int colId, int patternId, MWAWColor &color) const
 returns the color associated with a pattern
void prepareStructures ()
 check the group structures, the linked textbox
bool sendPageGraphics (std::vector< long > const &doNotSendIds)
 try to send the page graphic
void flushExtra ()
 sends the data which have not yet been sent to the listener
bool readFrames (MWAWEntry const &entry)
 try to read the frames definition (type 3)
shared_ptr
< HMWJGraphInternal::Frame
readFrame (int id)
 try to read a frame
shared_ptr
< HMWJGraphInternal::ShapeGraph
readShapeGraph (HMWJGraphInternal::Frame const &header, long endPos)
 try to read the basic graph data
shared_ptr
< HMWJGraphInternal::CommentFrame
readCommentData (HMWJGraphInternal::Frame const &header, long endPos)
 try to read the comment data
shared_ptr
< HMWJGraphInternal::PictureFrame
readPictureData (HMWJGraphInternal::Frame const &header, long endPos)
 try to read the picture data
shared_ptr
< HMWJGraphInternal::TableFrame
readTableData (HMWJGraphInternal::Frame const &header, long endPos)
 try to read the table data
shared_ptr
< HMWJGraphInternal::TextboxFrame
readTextboxData (HMWJGraphInternal::Frame const &header, long endPos)
 try to read a textbox data
shared_ptr
< HMWJGraphInternal::TextFrame
readTextData (HMWJGraphInternal::Frame const &header, long endPos)
 try to read a text data (text, header/footer, footnote)
bool readGroupData (MWAWEntry const &entry, int actZone)
 try to read the groupd data ( type 9 )
bool readGraphData (MWAWEntry const &entry, int actZone)
 try to read the graph data (zone 8)
bool readPicture (MWAWEntry const &entry, int actZone)
 try to read the pictures definition (type 6)
bool readTable (MWAWEntry const &entry, int actZone)
 try to read a table (zone 7)
bool readTableFormatsList (HMWJGraphInternal::Table &table, long endPos)
 try to read a list of format
bool sendFrame (HMWJGraphInternal::Frame const &frame, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
 try to send a frame to the listener
bool sendShapeGraph (HMWJGraphInternal::ShapeGraph const &pict, MWAWPosition pos)
 try to send a basic picture to the listener
bool sendComment (HMWJGraphInternal::CommentFrame const &textbox, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
 try to send a comment box to the listener
bool sendPictureFrame (HMWJGraphInternal::PictureFrame const &pict, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
 try to send a picture frame
bool sendEmptyPicture (MWAWPosition pos)
 try to send an empty picture
bool sendTextbox (HMWJGraphInternal::TextboxFrame const &textbox, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
 try to send a textbox to the listener
bool sendTableUnformatted (long zId)
 try to send a table unformatted
bool sendGroup (long zId, MWAWPosition pos)
 try to send a group to the listener
bool sendGroup (HMWJGraphInternal::Group const &group, MWAWPosition pos)
 try to send a group to the listener
bool canCreateGraphic (HMWJGraphInternal::Group const &group)
 check if we can send a group as graphic
void sendGroupChild (HMWJGraphInternal::Group const &group, MWAWPosition const &pos)
 try to send a group elements by elements
void sendGroup (HMWJGraphInternal::Group const &group, MWAWGraphicListenerPtr &listener)
 send the group as a graphic zone
std::map< long, int > getTextFrameInformations () const
 return a list textZId -> type which type=0(main), 1(header), 2(footer), 3(footnote), 4(textbox), 9(table), 10(comment)
bool getFootnoteInformations (long &textZId, std::vector< long > &fPosList) const
 return the footnote text zone id and the list of first char position
bool sendFrame (long frameId, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
 try to send a frame to the listener
bool sendText (long textId, long fPos, bool asGraphic=false)
 ask main parser to send a text zone
bool checkGroupStructures (long zId, std::set< long > &seens, bool inGroup)
 check the graph structures: ie.

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
shared_ptr
< HMWJGraphInternal::State
m_state
 the state
HMWJParserm_mainParser
 the main parser;

Private Member Functions

 HMWJGraph (HMWJGraph const &orig)
HMWJGraphoperator= (HMWJGraph const &orig)

Friends

class HMWJParser
struct HMWJGraphInternal::Table
class HMWJGraphInternal::SubDocument

Detailed Description

the main class to read the graphic part of a HanMac Word-J file


Constructor & Destructor Documentation

constructor

HMWJGraph::~HMWJGraph ( ) [virtual]

destructor

HMWJGraph::HMWJGraph ( HMWJGraph const &  orig) [private]

Member Function Documentation

bool HMWJGraph::canCreateGraphic ( HMWJGraphInternal::Group const &  group) [protected]

check if we can send a group as graphic

Referenced by sendFrame(), and sendGroupChild().

bool HMWJGraph::checkGroupStructures ( long  zId,
std::set< long > &  seens,
bool  inGroup 
) [protected]

check the graph structures: ie.

the group children

Referenced by prepareStructures().

void HMWJGraph::flushExtra ( ) [protected]

sends the data which have not yet been sent to the listener

bool HMWJGraph::getColor ( int  colId,
int  patternId,
MWAWColor color 
) const [protected]

returns the color associated with a pattern

bool HMWJGraph::getFootnoteInformations ( long &  textZId,
std::vector< long > &  fPosList 
) const [protected]

return the footnote text zone id and the list of first char position

std::map< long, int > HMWJGraph::getTextFrameInformations ( ) const [protected]

return a list textZId -> type which type=0(main), 1(header), 2(footer), 3(footnote), 4(textbox), 9(table), 10(comment)

int HMWJGraph::numPages ( ) const

returns the number of pages

HMWJGraph& HMWJGraph::operator= ( HMWJGraph const &  orig) [private]
void HMWJGraph::prepareStructures ( ) [protected]

check the group structures, the linked textbox

shared_ptr< HMWJGraphInternal::CommentFrame > HMWJGraph::readCommentData ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read the comment data

Referenced by readFrame().

shared_ptr< HMWJGraphInternal::Frame > HMWJGraph::readFrame ( int  id) [protected]

try to read a frame

Referenced by readFrames().

bool HMWJGraph::readFrames ( MWAWEntry const &  entry) [protected]

try to read the frames definition (type 3)

bool HMWJGraph::readGraphData ( MWAWEntry const &  entry,
int  actZone 
) [protected]

try to read the graph data (zone 8)

bool HMWJGraph::readGroupData ( MWAWEntry const &  entry,
int  actZone 
) [protected]

try to read the groupd data ( type 9 )

bool HMWJGraph::readPicture ( MWAWEntry const &  entry,
int  actZone 
) [protected]

try to read the pictures definition (type 6)

shared_ptr< HMWJGraphInternal::PictureFrame > HMWJGraph::readPictureData ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read the picture data

Referenced by readFrame().

shared_ptr< HMWJGraphInternal::ShapeGraph > HMWJGraph::readShapeGraph ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read the basic graph data

Referenced by readFrame().

bool HMWJGraph::readTable ( MWAWEntry const &  entry,
int  actZone 
) [protected]

try to read a table (zone 7)

shared_ptr< HMWJGraphInternal::TableFrame > HMWJGraph::readTableData ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read the table data

Referenced by readFrame().

bool HMWJGraph::readTableFormatsList ( HMWJGraphInternal::Table table,
long  endPos 
) [protected]

try to read a list of format

Referenced by readTable().

shared_ptr< HMWJGraphInternal::TextboxFrame > HMWJGraph::readTextboxData ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read a textbox data

Referenced by readFrame().

shared_ptr< HMWJGraphInternal::TextFrame > HMWJGraph::readTextData ( HMWJGraphInternal::Frame const &  header,
long  endPos 
) [protected]

try to read a text data (text, header/footer, footnote)

Referenced by readFrame().

bool HMWJGraph::sendComment ( HMWJGraphInternal::CommentFrame const &  textbox,
MWAWPosition  pos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]

try to send a comment box to the listener

Referenced by sendFrame().

bool HMWJGraph::sendEmptyPicture ( MWAWPosition  pos) [protected]

try to send an empty picture

Referenced by HMWJGraphInternal::SubDocument::parse(), and sendPictureFrame().

bool HMWJGraph::sendFrame ( HMWJGraphInternal::Frame const &  frame,
MWAWPosition  pos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]
bool HMWJGraph::sendFrame ( long  frameId,
MWAWPosition  pos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]

try to send a frame to the listener

bool HMWJGraph::sendGroup ( long  zId,
MWAWPosition  pos 
) [protected]

try to send a group to the listener

Referenced by HMWJGraphInternal::SubDocument::parse(), sendFrame(), sendGroup(), and sendGroupChild().

bool HMWJGraph::sendGroup ( HMWJGraphInternal::Group const &  group,
MWAWPosition  pos 
) [protected]

try to send a group to the listener

void HMWJGraph::sendGroup ( HMWJGraphInternal::Group const &  group,
MWAWGraphicListenerPtr listener 
) [protected]

send the group as a graphic zone

void HMWJGraph::sendGroupChild ( HMWJGraphInternal::Group const &  group,
MWAWPosition const &  pos 
) [protected]

try to send a group elements by elements

Referenced by sendGroup().

bool HMWJGraph::sendPageGraphics ( std::vector< long > const &  doNotSendIds) [protected]

try to send the page graphic

bool HMWJGraph::sendPictureFrame ( HMWJGraphInternal::PictureFrame const &  pict,
MWAWPosition  pos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]

try to send a picture frame

Referenced by sendFrame().

bool HMWJGraph::sendShapeGraph ( HMWJGraphInternal::ShapeGraph const &  pict,
MWAWPosition  pos 
) [protected]

try to send a basic picture to the listener

Referenced by sendFrame().

bool HMWJGraph::sendTableUnformatted ( long  zId) [protected]

try to send a table unformatted

Referenced by HMWJGraphInternal::SubDocument::parse().

bool HMWJGraph::sendText ( long  textId,
long  fPos,
bool  asGraphic = false 
) [protected]
bool HMWJGraph::sendTextbox ( HMWJGraphInternal::TextboxFrame const &  textbox,
MWAWPosition  pos,
WPXPropertyList  extras = WPXPropertyList() 
) [protected]

try to send a textbox to the listener

Referenced by sendFrame().

int HMWJGraph::version ( ) const

returns the file version


Friends And Related Function Documentation

friend class HMWJGraphInternal::SubDocument [friend]
friend struct HMWJGraphInternal::Table [friend]
friend class HMWJParser [friend]

Member Data Documentation


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