HanMacWrdJGraph Class Reference

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

#include <HanMacWrdJGraph.hxx>

Public Member Functions

 HanMacWrdJGraph (HanMacWrdJParser &parser)
 constructor More...
 
virtual ~HanMacWrdJGraph ()
 destructor More...
 
int version () const
 returns the file version More...
 
int numPages () const
 returns the number of pages More...
 

Protected Member Functions

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

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state More...
 
shared_ptr
< HanMacWrdJGraphInternal::State
m_state
 the state More...
 
HanMacWrdJParserm_mainParser
 the main parser; More...
 

Private Member Functions

 HanMacWrdJGraph (HanMacWrdJGraph const &orig)
 
HanMacWrdJGraphoperator= (HanMacWrdJGraph const &orig)
 

Friends

class HanMacWrdJParser
 
struct HanMacWrdJGraphInternal::Table
 
class HanMacWrdJGraphInternal::SubDocument
 

Detailed Description

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

Constructor & Destructor Documentation

HanMacWrdJGraph::HanMacWrdJGraph ( HanMacWrdJParser parser)

constructor

HanMacWrdJGraph::~HanMacWrdJGraph ( )
virtual

destructor

HanMacWrdJGraph::HanMacWrdJGraph ( HanMacWrdJGraph const &  orig)
private

Member Function Documentation

bool HanMacWrdJGraph::canCreateGraphic ( HanMacWrdJGraphInternal::Group const &  group)
protected

check if we can send a group as graphic

Referenced by sendFrame(), and sendGroupChild().

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

check the graph structures: ie.

the group children

Referenced by prepareStructures().

void HanMacWrdJGraph::flushExtra ( )
protected

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

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

returns the color associated with a pattern

bool HanMacWrdJGraph::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 > HanMacWrdJGraph::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 HanMacWrdJGraph::numPages ( ) const

returns the number of pages

HanMacWrdJGraph& HanMacWrdJGraph::operator= ( HanMacWrdJGraph const &  orig)
private
void HanMacWrdJGraph::prepareStructures ( )
protected

check the group structures, the linked textbox

shared_ptr< HanMacWrdJGraphInternal::CommentFrame > HanMacWrdJGraph::readCommentData ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

try to read the comment data

Referenced by readFrame().

shared_ptr< HanMacWrdJGraphInternal::Frame > HanMacWrdJGraph::readFrame ( int  id)
protected

try to read a frame

Referenced by readFrames().

bool HanMacWrdJGraph::readFrames ( MWAWEntry const &  entry)
protected

try to read the frames definition (type 3)

bool HanMacWrdJGraph::readGraphData ( MWAWEntry const &  entry,
int  actZone 
)
protected

try to read the graph data (zone 8)

bool HanMacWrdJGraph::readGroupData ( MWAWEntry const &  entry,
int  actZone 
)
protected

try to read the groupd data ( type 9 )

bool HanMacWrdJGraph::readPicture ( MWAWEntry const &  entry,
int  actZone 
)
protected

try to read the pictures definition (type 6)

shared_ptr< HanMacWrdJGraphInternal::PictureFrame > HanMacWrdJGraph::readPictureData ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

try to read the picture data

Referenced by readFrame().

shared_ptr< HanMacWrdJGraphInternal::ShapeGraph > HanMacWrdJGraph::readShapeGraph ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

try to read the basic graph data

Referenced by readFrame().

bool HanMacWrdJGraph::readTable ( MWAWEntry const &  entry,
int  actZone 
)
protected

try to read a table (zone 7)

shared_ptr< HanMacWrdJGraphInternal::TableFrame > HanMacWrdJGraph::readTableData ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

try to read the table data

Referenced by readFrame().

bool HanMacWrdJGraph::readTableFormatsList ( HanMacWrdJGraphInternal::Table table,
long  endPos 
)
protected

try to read a list of format

Referenced by readTable().

shared_ptr< HanMacWrdJGraphInternal::TextboxFrame > HanMacWrdJGraph::readTextboxData ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

try to read a textbox data

Referenced by readFrame().

shared_ptr< HanMacWrdJGraphInternal::TextFrame > HanMacWrdJGraph::readTextData ( HanMacWrdJGraphInternal::Frame const &  header,
long  endPos 
)
protected

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

Referenced by readFrame().

bool HanMacWrdJGraph::sendComment ( HanMacWrdJGraphInternal::CommentFrame const &  textbox,
MWAWPosition  pos,
librevenge::RVNGPropertyList  extras = librevenge::RVNGPropertyList() 
)
protected

try to send a comment box to the listener

Referenced by sendFrame().

bool HanMacWrdJGraph::sendEmptyPicture ( MWAWPosition  pos)
protected

try to send an empty picture

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

bool HanMacWrdJGraph::sendFrame ( HanMacWrdJGraphInternal::Frame const &  frame,
MWAWPosition  pos 
)
protected
bool HanMacWrdJGraph::sendFrame ( long  frameId,
MWAWPosition  pos 
)
protected

try to send a frame to the listener

bool HanMacWrdJGraph::sendGroup ( long  zId,
MWAWPosition  pos 
)
protected

try to send a group to the listener

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

bool HanMacWrdJGraph::sendGroup ( HanMacWrdJGraphInternal::Group const &  group,
MWAWPosition  pos 
)
protected

try to send a group to the listener

void HanMacWrdJGraph::sendGroup ( HanMacWrdJGraphInternal::Group const &  group,
MWAWGraphicListenerPtr listener 
)
protected

send the group as a graphic zone

void HanMacWrdJGraph::sendGroupChild ( HanMacWrdJGraphInternal::Group const &  group,
MWAWPosition const &  pos 
)
protected

try to send a group elements by elements

Referenced by sendGroup().

bool HanMacWrdJGraph::sendPageGraphics ( std::vector< long > const &  doNotSendIds)
protected

try to send the page graphic

bool HanMacWrdJGraph::sendPictureFrame ( HanMacWrdJGraphInternal::PictureFrame const &  pict,
MWAWPosition  pos 
)
protected

try to send a picture frame

Referenced by sendFrame().

bool HanMacWrdJGraph::sendShapeGraph ( HanMacWrdJGraphInternal::ShapeGraph const &  pict,
MWAWPosition  pos 
)
protected

try to send a basic picture to the listener

Referenced by sendFrame().

bool HanMacWrdJGraph::sendTableUnformatted ( long  zId)
protected

try to send a table unformatted

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

bool HanMacWrdJGraph::sendText ( long  textId,
long  fPos,
MWAWListenerPtr  listener = MWAWListenerPtr() 
)
protected

ask main parser to send a text zone

Referenced by HanMacWrdJGraphInternal::SubDocument::parse(), and HanMacWrdJGraphInternal::Table::sendText().

bool HanMacWrdJGraph::sendTextbox ( HanMacWrdJGraphInternal::TextboxFrame const &  textbox,
MWAWPosition  pos 
)
protected

try to send a textbox to the listener

Referenced by sendFrame().

int HanMacWrdJGraph::version ( ) const

returns the file version

Friends And Related Function Documentation

friend struct HanMacWrdJGraphInternal::Table
friend
friend class HanMacWrdJParser
friend

Member Data Documentation


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

Generated on Thu Jul 9 2015 20:26:38 for libmwaw by doxygen 1.8.8