MSKGraph Class Reference

the main class to read the graphic of a Microsoft Works file More...

#include <MSKGraph.hxx>

List of all members.

Classes

struct  SendData
 small struct used which picture need to be send More...
struct  Style
 Internal: the graphic style of MSKGraph. More...

Public Member Functions

 MSKGraph (MSKParser &parser)
 constructor
virtual ~MSKGraph ()
 destructor
int version () const
 returns the file version
int numPages (int zoneId) const
 returns the number of pages
void send (int id, MWAWPosition const &pos)
 send a zone (textbox, ...).
void sendAll (int zoneId, bool mainZone)
 send all the picture corresponding to a zone
void sendObjects (SendData const what)
 sends all the object of a page, frame, ...
void computePositions (int zoneId, std::vector< int > &linesHeight, std::vector< int > &pagesHeight)
 try to update positions knowing pages and lines height

Protected Member Functions

void flushExtra ()
 sends the data which have not yet been sent to the listener
bool readPictHeader (MSKGraphInternal::Zone &pict)
 read the picture header
bool readGradient (Style &style)
 read the gradient structure ( v4)
int getEntryPictureV1 (int zoneId, MWAWEntry &zone, bool autoSend=true)
 checks if the next zone is a v1 picture and returns a zone id ( or -1).
int getEntryPicture (int zoneId, MWAWEntry &zone, bool autoSend=true, int order=-1000)
 checks if the next zone is a v2 picture and returns a zone id ( or -1)
bool readRB (MWAWInputStreamPtr input, MWAWEntry const &entry)
 reads the RBDR or a RBIL zone: a zone which seems to regroup all pages pictures
bool readPictureV4 (MWAWInputStreamPtr input, MWAWEntry const &entry)
 reads a Pict zone: a zone which seems to code in v4 : header/footer picture
bool readText (MSKGraphInternal::TextBox &textBox)
 try to read a text zone
void sendTextBox (int zId)
 try to send a text box zone v1-3
void checkTextBoxLinks (int zId)
 check the text box link v4
bool getZoneGraphicStyle (int zoneId, MWAWGraphicStyle &style) const
 returns the graphic style of the zone defined by zoneId
bool getZonePosition (int zoneId, MWAWPosition::AnchorTo anchor, MWAWPosition &pos) const
 returns the position of the zone defined by zoneId
void sendFrameText (MWAWEntry const &entry, std::string const &frame)
 ask m_mainParser to send a frame text(v4)
void sendTable (int id)
 try to a table zone
void sendChart (int zoneId)
 try to send a chart
shared_ptr
< MSKGraphInternal::GroupZone
readGroup (MSKGraphInternal::Zone &group)
 try to read the group data
void sendGroup (int zoneId, MWAWPosition const &pos)
 try to send a group
void sendGroupChild (int zoneId, MWAWPosition const &pos)
 try to send a group elements by elemenys
bool canCreateGraphic (MSKGraphInternal::GroupZone const &group) const
 returns true if we can create a graphic for the whole group
void sendGroup (MSKGraphInternal::GroupZone const &group, MWAWGraphicListenerPtr &listener) const
 send the group as a graphic zone
bool readFont (MWAWFont &font)
 reads the textbox font

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
shared_ptr
< MSKGraphInternal::State
m_state
 the state
MSKParserm_mainParser
 the main parser;
shared_ptr< MSKTablem_tableParser
 the table manager

Private Member Functions

 MSKGraph (MSKGraph const &orig)
MSKGraphoperator= (MSKGraph const &orig)

Friends

class MSK3Parser
class MSK4Zone
class MSKTable
class MSKGraphInternal::SubDocument

Detailed Description

the main class to read the graphic of a Microsoft Works file


Constructor & Destructor Documentation

constructor

MSKGraph::~MSKGraph ( ) [virtual]

destructor

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

Member Function Documentation

bool MSKGraph::canCreateGraphic ( MSKGraphInternal::GroupZone const &  group) const [protected]

returns true if we can create a graphic for the whole group

Referenced by sendGroup(), and sendGroupChild().

void MSKGraph::checkTextBoxLinks ( int  zId) [protected]

check the text box link v4

Referenced by readRB().

void MSKGraph::computePositions ( int  zoneId,
std::vector< int > &  linesHeight,
std::vector< int > &  pagesHeight 
)

try to update positions knowing pages and lines height

void MSKGraph::flushExtra ( ) [protected]

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

int MSKGraph::getEntryPicture ( int  zoneId,
MWAWEntry zone,
bool  autoSend = true,
int  order = -1000 
) [protected]

checks if the next zone is a v2 picture and returns a zone id ( or -1)

Referenced by MSKTable::readChart(), readGroup(), and readRB().

int MSKGraph::getEntryPictureV1 ( int  zoneId,
MWAWEntry zone,
bool  autoSend = true 
) [protected]

checks if the next zone is a v1 picture and returns a zone id ( or -1).

bool MSKGraph::getZoneGraphicStyle ( int  zoneId,
MWAWGraphicStyle style 
) const [protected]

returns the graphic style of the zone defined by zoneId

bool MSKGraph::getZonePosition ( int  zoneId,
MWAWPosition::AnchorTo  anchor,
MWAWPosition pos 
) const [protected]

returns the position of the zone defined by zoneId

Referenced by MSKTable::sendChart().

int MSKGraph::numPages ( int  zoneId) const

returns the number of pages

MSKGraph& MSKGraph::operator= ( MSKGraph const &  orig) [private]
bool MSKGraph::readFont ( MWAWFont &  font) [protected]

reads the textbox font

Referenced by readText().

bool MSKGraph::readGradient ( MSKGraph::Style style) [protected]

read the gradient structure ( v4)

Referenced by readPictHeader().

try to read the group data

Referenced by getEntryPicture().

bool MSKGraph::readPictHeader ( MSKGraphInternal::Zone pict) [protected]

read the picture header

Referenced by getEntryPicture().

bool MSKGraph::readPictureV4 ( MWAWInputStreamPtr  input,
MWAWEntry const &  entry 
) [protected]

reads a Pict zone: a zone which seems to code in v4 : header/footer picture

bool MSKGraph::readRB ( MWAWInputStreamPtr  input,
MWAWEntry const &  entry 
) [protected]

reads the RBDR or a RBIL zone: a zone which seems to regroup all pages pictures

bool MSKGraph::readText ( MSKGraphInternal::TextBox textBox) [protected]

try to read a text zone

Referenced by getEntryPicture().

void MSKGraph::send ( int  id,
MWAWPosition const &  pos 
)

send a zone (textbox, ...).

Note:
if pos.size() is not defined, this function will retrieve the position, .. using the corresponding zone's data

Referenced by flushExtra(), sendAll(), MSKTable::sendChart(), sendGroup(), sendGroupChild(), and sendObjects().

void MSKGraph::sendAll ( int  zoneId,
bool  mainZone 
)

send all the picture corresponding to a zone

void MSKGraph::sendChart ( int  zoneId) [protected]

try to send a chart

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

void MSKGraph::sendFrameText ( MWAWEntry const &  entry,
std::string const &  frame 
) [protected]

ask m_mainParser to send a frame text(v4)

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

void MSKGraph::sendGroup ( int  zoneId,
MWAWPosition const &  pos 
) [protected]

try to send a group

Referenced by send(), sendGroup(), and sendGroupChild().

void MSKGraph::sendGroup ( MSKGraphInternal::GroupZone const &  group,
MWAWGraphicListenerPtr listener 
) const [protected]

send the group as a graphic zone

void MSKGraph::sendGroupChild ( int  zoneId,
MWAWPosition const &  pos 
) [protected]

try to send a group elements by elemenys

Referenced by MSKGraphInternal::SubDocument::parse(), and sendGroup().

void MSKGraph::sendObjects ( SendData const  what)

sends all the object of a page, frame, ...

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

void MSKGraph::sendTable ( int  id) [protected]

try to a table zone

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

void MSKGraph::sendTextBox ( int  zId) [protected]

try to send a text box zone v1-3

Referenced by MSKGraphInternal::SubDocument::parseGraphic().

int MSKGraph::version ( ) const

returns the file version

Referenced by getEntryPicture(), readFont(), readGroup(), and readPictHeader().


Friends And Related Function Documentation

friend class MSK3Parser [friend]
friend class MSK4Zone [friend]
friend class MSKGraphInternal::SubDocument [friend]
friend class MSKTable [friend]

Referenced by MSKGraph().


Member Data Documentation

shared_ptr<MSKTable> MSKGraph::m_tableParser [protected]

the table manager

Referenced by getEntryPicture(), MSKGraph(), sendChart(), and sendTable().


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