QuattroGraph Class Reference

This class parses QuattroPro graph file. More...

#include <QuattroGraph.h>

Public Member Functions

 QuattroGraph (QuattroParser &parser)
 constructor
 
 ~QuattroGraph ()
 destructor
 
void setListener (WKSContentListenerPtr &listen)
 sets the listener
 
void cleanState ()
 clean internal state
 
void updateState ()
 update the state (need to be called before sending data)
 

Protected Member Functions

int version () const
 return the file version
 
void storeObjects (std::map< librevenge::RVNGString, WPSEmbeddedObject > const &nameToObjectMap)
 stores the OLE objets
 
std::vector< Vec2igetGraphicCellsInSheet (int sheetId) const
 return the list of cells containing some graphics in a sheet
 
bool sendGraphics (int sheetId, Vec2i const &cell) const
 send the graphic corresponding to a cell
 
bool sendPageGraphics (int sheetId) const
 send the page graphic corresponding to a sheet
 
bool sendGraphic (QuattroGraphInternal::Graph const &graph) const
 send a graphic
 
bool sendShape (QuattroGraphInternal::Graph const &graph, int sheetId) const
 send a shape
 
bool sendTextbox (QuattroGraphInternal::Graph const &graph, int sheetId) const
 send a textbox
 
bool send (QuattroGraphInternal::Textbox const &textbox, std::shared_ptr< WPSStream > stream) const
 send the textbox content
 
bool readBeginEnd (std::shared_ptr< WPSStream > stream, int sheetId)
 read the begin/end graph zone: 321/322
 
bool readFrameOLE (std::shared_ptr< WPSStream > stream)
 read a new OLE frame zone: zone 381(wb2)
 
bool readImage (std::shared_ptr< WPSStream > stream)
 read a image zone: zone 382(wb2)
 
bool readBitmap (std::shared_ptr< WPSStream > stream)
 read a bitmap zone: zone 383(wb2)
 
bool readChart (std::shared_ptr< WPSStream > stream)
 read a chart zone: zone 384
 
bool readFrame (std::shared_ptr< WPSStream > stream)
 read an frame: zone 385
 
bool readButton (std::shared_ptr< WPSStream > stream)
 read a button: zone 386
 
bool readOLEData (std::shared_ptr< WPSStream > stream)
 read a OLE data: zone 38b
 
bool readShape (std::shared_ptr< WPSStream > stream)
 read a shape header: zone 4d3
 
bool readShapeHeader (QuattroGraphInternal::ShapeHeader &shape, std::shared_ptr< WPSStream > stream, long endPos)
 read a shape header
 
bool readLine (std::shared_ptr< WPSStream > stream)
 read a line/arrow data: zone 35a/37b
 
bool readRect (std::shared_ptr< WPSStream > stream)
 read a oval/rect/round rect data: zone 33e/364/379
 
bool readPolygon (std::shared_ptr< WPSStream > stream)
 read a polygon/polyline data: zone 35c/37c/35b/388
 
bool readTextBox (std::shared_ptr< WPSStream > stream)
 read a textbox data: zone 36f
 
bool readDialog (std::shared_ptr< WPSStream > stream)
 read a dialog zone: 35e
 
bool readFillData (WPSGraphicStyle &style, int fillType, std::shared_ptr< WPSStream > stream, long endPos)
 

Static Protected Member Functions

static bool readHeader (QuattroGraphInternal::Graph &header, std::shared_ptr< WPSStream > stream, long endPos)
 try to read a graph header
 
static bool readHeader (QuattroGraphInternal::Dialog &header, std::shared_ptr< WPSStream > stream, long endPos)
 try to read a dialog header
 
static bool readDialogUnknown (std::shared_ptr< WPSStream > stream)
 read a unknown dialog zone: 335,343,345
 

Private Member Functions

 QuattroGraph (QuattroGraph const &orig)=delete
 
QuattroGraphoperator= (QuattroGraph const &orig)=delete
 

Private Attributes

std::shared_ptr< WKSContentListenerm_listener
 
QuattroParserm_mainParser
 the listener (if set)
 
std::shared_ptr< QuattroGraphInternal::Statem_state
 the internal state
 

Friends

class QuattroParser
 
class QuattroGraphInternal::SubDocument
 

Detailed Description

This class parses QuattroPro graph file.

Constructor & Destructor Documentation

◆ QuattroGraph() [1/2]

QuattroGraph::QuattroGraph ( QuattroParser & parser)
explicit

constructor

◆ ~QuattroGraph()

QuattroGraph::~QuattroGraph ( )

destructor

◆ QuattroGraph() [2/2]

QuattroGraph::QuattroGraph ( QuattroGraph const & orig)
privatedelete

Member Function Documentation

◆ cleanState()

void QuattroGraph::cleanState ( )

clean internal state

◆ getGraphicCellsInSheet()

std::vector< Vec2i > QuattroGraph::getGraphicCellsInSheet ( int sheetId) const
protected

return the list of cells containing some graphics in a sheet

◆ operator=()

QuattroGraph & QuattroGraph::operator= ( QuattroGraph const & orig)
privatedelete

◆ readBeginEnd()

bool QuattroGraph::readBeginEnd ( std::shared_ptr< WPSStream > stream,
int sheetId )
protected

read the begin/end graph zone: 321/322

◆ readBitmap()

bool QuattroGraph::readBitmap ( std::shared_ptr< WPSStream > stream)
protected

read a bitmap zone: zone 383(wb2)

◆ readButton()

bool QuattroGraph::readButton ( std::shared_ptr< WPSStream > stream)
protected

read a button: zone 386

◆ readChart()

bool QuattroGraph::readChart ( std::shared_ptr< WPSStream > stream)
protected

read a chart zone: zone 384

◆ readDialog()

bool QuattroGraph::readDialog ( std::shared_ptr< WPSStream > stream)
protected

read a dialog zone: 35e

◆ readDialogUnknown()

bool QuattroGraph::readDialogUnknown ( std::shared_ptr< WPSStream > stream)
staticprotected

read a unknown dialog zone: 335,343,345

◆ readFillData()

bool QuattroGraph::readFillData ( WPSGraphicStyle & style,
int fillType,
std::shared_ptr< WPSStream > stream,
long endPos )
protected

Referenced by readShapeHeader(), and readTextBox().

◆ readFrame()

bool QuattroGraph::readFrame ( std::shared_ptr< WPSStream > stream)
protected

read an frame: zone 385

◆ readFrameOLE()

bool QuattroGraph::readFrameOLE ( std::shared_ptr< WPSStream > stream)
protected

read a new OLE frame zone: zone 381(wb2)

◆ readHeader() [1/2]

bool QuattroGraph::readHeader ( QuattroGraphInternal::Dialog & header,
std::shared_ptr< WPSStream > stream,
long endPos )
staticprotected

try to read a dialog header

◆ readHeader() [2/2]

bool QuattroGraph::readHeader ( QuattroGraphInternal::Graph & header,
std::shared_ptr< WPSStream > stream,
long endPos )
staticprotected

◆ readImage()

bool QuattroGraph::readImage ( std::shared_ptr< WPSStream > stream)
protected

read a image zone: zone 382(wb2)

◆ readLine()

bool QuattroGraph::readLine ( std::shared_ptr< WPSStream > stream)
protected

read a line/arrow data: zone 35a/37b

◆ readOLEData()

bool QuattroGraph::readOLEData ( std::shared_ptr< WPSStream > stream)
protected

read a OLE data: zone 38b

◆ readPolygon()

bool QuattroGraph::readPolygon ( std::shared_ptr< WPSStream > stream)
protected

read a polygon/polyline data: zone 35c/37c/35b/388

◆ readRect()

bool QuattroGraph::readRect ( std::shared_ptr< WPSStream > stream)
protected

read a oval/rect/round rect data: zone 33e/364/379

◆ readShape()

bool QuattroGraph::readShape ( std::shared_ptr< WPSStream > stream)
protected

read a shape header: zone 4d3

◆ readShapeHeader()

bool QuattroGraph::readShapeHeader ( QuattroGraphInternal::ShapeHeader & shape,
std::shared_ptr< WPSStream > stream,
long endPos )
protected

read a shape header

Note
the serie header is pretty similar

Referenced by readLine(), readPolygon(), readRect(), and readTextBox().

◆ readTextBox()

bool QuattroGraph::readTextBox ( std::shared_ptr< WPSStream > stream)
protected

read a textbox data: zone 36f

◆ send()

bool QuattroGraph::send ( QuattroGraphInternal::Textbox const & textbox,
std::shared_ptr< WPSStream > stream ) const
protected

send the textbox content

◆ sendGraphic()

bool QuattroGraph::sendGraphic ( QuattroGraphInternal::Graph const & graph) const
protected

send a graphic

Referenced by sendGraphics().

◆ sendGraphics()

bool QuattroGraph::sendGraphics ( int sheetId,
Vec2i const & cell ) const
protected

send the graphic corresponding to a cell

◆ sendPageGraphics()

bool QuattroGraph::sendPageGraphics ( int sheetId) const
protected

send the page graphic corresponding to a sheet

◆ sendShape()

bool QuattroGraph::sendShape ( QuattroGraphInternal::Graph const & graph,
int sheetId ) const
protected

send a shape

Referenced by sendPageGraphics().

◆ sendTextbox()

bool QuattroGraph::sendTextbox ( QuattroGraphInternal::Graph const & graph,
int sheetId ) const
protected

send a textbox

Referenced by sendPageGraphics().

◆ setListener()

void QuattroGraph::setListener ( WKSContentListenerPtr & listen)
inline

sets the listener

◆ storeObjects()

void QuattroGraph::storeObjects ( std::map< librevenge::RVNGString, WPSEmbeddedObject > const & nameToObjectMap)
protected

stores the OLE objets

◆ updateState()

void QuattroGraph::updateState ( )

update the state (need to be called before sending data)

◆ version()

int QuattroGraph::version ( ) const
protected

return the file version

Referenced by readShapeHeader().

Friends And Related Symbol Documentation

◆ QuattroGraphInternal::SubDocument

friend class QuattroGraphInternal::SubDocument
friend

◆ QuattroParser

friend class QuattroParser
friend

Member Data Documentation

◆ m_listener

std::shared_ptr<WKSContentListener> QuattroGraph::m_listener
private

◆ m_mainParser

QuattroParser& QuattroGraph::m_mainParser
private

◆ m_state


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

Generated on Thu Jul 18 2024 00:00:00 for libwps by doxygen 1.12.0