LotusGraph Class Reference documentation

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
LotusGraph Class Reference

This class parses Microsoft Works graph file. More...

`#include <LotusGraph.h>`

## Public Member Functions
| LotusGraph (LotusParser &parser)
| constructor More...
| ~LotusGraph ()
| destructor More...
void | cleanState ()
| clean internal state More...
void | setListener (WKSContentListenerPtr &listen)
| sets the listener More...
void | updateState (std::map< int, int > const &zIdToSheetIdMap, std::map< std::string, int > const &nameToChartIdMap)
| update the state (need to be called before sending data) More...

## Protected Member Functions
int | version () const
| return the file version More...
bool | hasGraphics (int sheetId) const
| return true if the sheet sheetId has some graphic More...
void | sendGraphics (int sheetId)
| send the graphics corresponding to a sheetId More...
void | sendZone (LotusGraphInternal::ZonePcList const &zoneList, size_t id, WPSTransformation &transf)
| try to send a shape: 123 pc More...
void | sendPicture (LotusGraphInternal::ZoneMac const &zone)
| try to send a picture: 123 mac More...
void | sendTextBox (std::shared_ptr< WPSStream > stream, WPSEntry const &entry)
| try to send a textbox content's More...
void | sendTextBoxWK4 (std::shared_ptr< WPSStream > stream, WPSEntry const &entry, bool isButton)
| try to send a textbox content's More...
bool | setChartId (int chartId)
| sets the current chart id(interface with LotusChart) More...
bool | readZoneBegin (std::shared_ptr< WPSStream > stream, long endPos)
| reads a begin graphic zone: 2328 (wk3mac) More...
bool | readZoneData (std::shared_ptr< WPSStream > stream, long endPos, int type)
| reads a graphic zone: 2332, 2346, 2350, 2352, 23f0 (wk3mac) More...
bool | readTextBoxData (std::shared_ptr< WPSStream > stream, long endPos)
| reads a graphic textbox data: 23f0 (wk3mac) More...
bool | readPictureDefinition (std::shared_ptr< WPSStream > stream, long endPos)
| reads a picture definition: 240e (wk3mac) More...
bool | readPictureData (std::shared_ptr< WPSStream > stream, long endPos)
| reads a picture data: 2410 (wk3mac) More...
bool | readFMTPictName (std::shared_ptr< WPSStream > stream)
| try to read the pict filename, ...: b7 (wk3-wk4 pc) More...
bool | readZoneBeginC9 (std::shared_ptr< WPSStream > stream)
| try to read the sheet id: 0xc9 (wk4) More...
bool | readGraphic (std::shared_ptr< WPSStream > stream)
| try to read a graphic: 0xca (wk4) More...
bool | readFrame (std::shared_ptr< WPSStream > stream)
| try to read a graph's frame: 0xcc (wk4) More...
bool | readTextBoxDataD1 (std::shared_ptr< WPSStream > stream)
| reads a graphic textbox data: 0xd1 (wk4) More...
bool | readGraphZone (std::shared_ptr< WPSStream > stream, int zId)
| try to read the graphic zone: 1XXX More...
bool | readGraphDataZone (std::shared_ptr< WPSStream > stream, long endPos)
| try to read the graphic data zone: 010d More...

## Private Member Functions
| LotusGraph (LotusGraph const &orig)=delete
LotusGraph & | operator= (LotusGraph const &orig)=delete

## Private Attributes
std::shared_ptr< WKSContentListener > | m_listener
LotusParser & | m_mainParser
| the listener (if set) More...
std::shared_ptr< LotusStyleManager > | m_styleManager
| the style manager More...
std::shared_ptr< LotusGraphInternal::State > | m_state
| the internal state More...

## Friends
class | LotusParser
class | LotusGraphInternal::SubDocument

## Detailed Description

This class parses Microsoft Works graph file.

## Constructor & Destructor Documentation

## ◆ LotusGraph() [1/2]

LotusGraph::LotusGraph | ( | LotusParser & | parser | ) |
| explicit

constructor

## ◆ ~LotusGraph()

LotusGraph::~LotusGraph | ( |  | ) |

destructor

## ◆ LotusGraph() [2/2]

LotusGraph::LotusGraph | ( | LotusGraph const & | orig | ) |
| privatedelete

## Member Function Documentation

## ◆ cleanState()

void LotusGraph::cleanState | ( |  | ) |

clean internal state

## ◆ hasGraphics()

bool LotusGraph::hasGraphics | ( | int | sheetId | ) | const
| protected

return true if the sheet sheetId has some graphic

## ◆ operator=()

LotusGraph & LotusGraph::operator= | ( | LotusGraph const & | orig | ) |
| privatedelete

## ◆ readFMTPictName()

bool LotusGraph::readFMTPictName | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

try to read the pict filename, ...: b7 (wk3-wk4 pc)

## ◆ readFrame()

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

try to read a graph's frame: 0xcc (wk4)

## ◆ readGraphDataZone()

bool LotusGraph::readGraphDataZone | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos
| ) |  |
| protected

try to read the graphic data zone: 010d

## ◆ readGraphic()

bool LotusGraph::readGraphic | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

try to read a graphic: 0xca (wk4)

## ◆ readGraphZone()

bool LotusGraph::readGraphZone | ( | std::shared_ptr< WPSStream > | stream,
|  | int | zId
| ) |  |
| protected

try to read the graphic zone: 1XXX

## ◆ readPictureData()

bool LotusGraph::readPictureData | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos
| ) |  |
| protected

reads a picture data: 2410 (wk3mac)

## ◆ readPictureDefinition()

bool LotusGraph::readPictureDefinition | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos
| ) |  |
| protected

reads a picture definition: 240e (wk3mac)

## ◆ readTextBoxData()

bool LotusGraph::readTextBoxData | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos
| ) |  |
| protected

reads a graphic textbox data: 23f0 (wk3mac)

## ◆ readTextBoxDataD1()

bool LotusGraph::readTextBoxDataD1 | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads a graphic textbox data: 0xd1 (wk4)

## ◆ readZoneBegin()

bool LotusGraph::readZoneBegin | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos
| ) |  |
| protected

reads a begin graphic zone: 2328 (wk3mac)

## ◆ readZoneBeginC9()

bool LotusGraph::readZoneBeginC9 | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

try to read the sheet id: 0xc9 (wk4)

## ◆ readZoneData()

bool LotusGraph::readZoneData | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos,
|  | int | type
| ) |  |
| protected

reads a graphic zone: 2332, 2346, 2350, 2352, 23f0 (wk3mac)

## ◆ sendGraphics()

void LotusGraph::sendGraphics | ( | int | sheetId | ) |
| protected

send the graphics corresponding to a sheetId

## ◆ sendPicture()

void LotusGraph::sendPicture | ( | LotusGraphInternal::ZoneMac const & | zone | ) |
| protected

try to send a picture: 123 mac

Referenced by sendGraphics().

## ◆ sendTextBox()

void LotusGraph::sendTextBox | ( | std::shared_ptr< WPSStream > | stream,
|  | WPSEntry const & | entry
| ) |  |
| protected

try to send a textbox content's

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

## ◆ sendTextBoxWK4()

void LotusGraph::sendTextBoxWK4 | ( | std::shared_ptr< WPSStream > | stream,
|  | WPSEntry const & | entry,
|  | bool | isButton
| ) |  |
| protected

try to send a textbox content's

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

## ◆ sendZone()

void LotusGraph::sendZone | ( | LotusGraphInternal::ZonePcList const & | zoneList,
|  | size_t | id,
|  | WPSTransformation & | transf
| ) |  |
| protected

try to send a shape: 123 pc

Referenced by sendGraphics(), and sendZone().

## ◆ setChartId()

bool LotusGraph::setChartId | ( | int | chartId | ) |
| protected

sets the current chart id(interface with LotusChart)

## ◆ setListener()

void LotusGraph::setListener | ( | WKSContentListenerPtr & | listen | ) |
| inline

sets the listener

## ◆ updateState()

void LotusGraph::updateState | ( | std::map< int, int > const & | zIdToSheetIdMap,
|  | std::map< std::string, int > const & | nameToChartIdMap
| ) |  |

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

    \param zIdToSheetIdMap the correspondance between a zone and a sheet: defined in .123
    \param nameToChartIdMap the name and the id of each chart's: used to retrieve the
    correspondance betweeen a graphic's chart and the chart in .wk4

## ◆ version()

int LotusGraph::version | ( |  | ) | const
| protected

return the file version

Referenced by readFMTPictName(), readGraphDataZone(), and readGraphZone().

## Friends And Related Function Documentation

## ◆ LotusGraphInternal::SubDocument

friend class LotusGraphInternal::SubDocument
| friend

## ◆ LotusParser

friend class LotusParser
| friend

## Member Data Documentation

## ◆ m_listener

std::shared_ptr<WKSContentListener> LotusGraph::m_listener
| private

Referenced by sendGraphics(), sendPicture(), sendTextBox(), sendTextBoxWK4(), sendZone(), and setListener().

## ◆ m_mainParser

LotusParser& LotusGraph::m_mainParser
| private

the listener (if set)

the main parser

Referenced by sendGraphics(), sendTextBox(), sendTextBoxWK4(), and version().

## ◆ m_state

std::shared_ptr<LotusGraphInternal::State> LotusGraph::m_state
| private

the internal state

Referenced by cleanState(), hasGraphics(), readFMTPictName(), readFrame(), readGraphDataZone(), readGraphic(), readGraphZone(), readPictureData(), readPictureDefinition(), readTextBoxData(), readTextBoxDataD1(), readZoneBegin(), readZoneBeginC9(), readZoneData(), sendGraphics(), setChartId(), updateState(), and version().

## ◆ m_styleManager

std::shared_ptr<LotusStyleManager> LotusGraph::m_styleManager
| private

the style manager

Referenced by readGraphic(), sendGraphics(), sendPicture(), sendTextBox(), and sendZone().

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

- LotusGraph.h
- LotusGraph.cpp