WPS8Table Class Reference documentation

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

the main class to read/store table in a Pc MS Works document v5-8 More...

`#include <WPS8Table.h>`

## Public Member Functions
| WPS8Table (WPS8Parser &parser)
| constructor More...
| ~WPS8Table ()
| destructor More...
void | setListener (WPSContentListenerPtr &listen)
| sets the listener More...
void | computePositions () const
| computes the final position of all table: does nothing as table anchors seem always a char More...
int | numPages () const
| returns the number page where we find a picture. In practice, 0/1 More...
void | flushExtra ()
| sends the data which have not been send to the listener. More...

## Protected Member Functions
bool | readStructures (RVNGInputStreamPtr const &input)
| finds all structures which correspond to a table More...
bool | sendTable (Vec2f const &siz, int tableId, int strsid, bool inTextBox=false)
| tries to send a table corresponding to strsid with actual size siz More...
void | sendTextInCell (int strsId, int cellId)
bool | readMCLD (RVNGInputStreamPtr input, WPSEntry const &entry)
| reads a MCLD zone: a zone which stores the tables structures More...
int | version () const
| returns the file version More...
libwps::DebugFile & | ascii ()
| returns the debug file More...

## Protected Attributes
WPSContentListenerPtr | m_listener
| the listener More...
WPS8Parser & | m_mainParser
| the main parser More...
std::shared_ptr< WPS8TableInternal::State > | m_state
| the state More...
libwps::DebugFile & | m_asciiFile
| the ascii file More...

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

## Friends
struct | WPS8TableInternal::Cell
class | WPS8Parser

## Detailed Description

the main class to read/store table in a Pc MS Works document v5-8

This class must be associated with a WPS8Parser. It contains code to read the MCLD entries which seems to correspond to a table entry (potentially a table entry with only one cells).

Note
  Actually, the relations between the MCLD entries and the FRAM entries (which seems to store all the object positions) are not fully understood ; so the result of this parsing is not used to create the document.

## Constructor & Destructor Documentation

## ◆ WPS8Table() [1/2]

WPS8Table::WPS8Table | ( | WPS8Parser & | parser | ) |
| explicit

constructor

## ◆ ~WPS8Table()

WPS8Table::~WPS8Table | ( |  | ) |

destructor

## ◆ WPS8Table() [2/2]

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

## Member Function Documentation

## ◆ ascii()

libwps::DebugFile& WPS8Table::ascii | ( |  | ) |
| inlineprotected

returns the debug file

Referenced by readMCLD().

## ◆ computePositions()

void WPS8Table::computePositions | ( |  | ) | const

computes the final position of all table: does nothing as table anchors seem always a char

## ◆ flushExtra()

void WPS8Table::flushExtra | ( |  | ) |

sends the data which have not been send to the listener.

## ◆ numPages()

int WPS8Table::numPages | ( |  | ) | const

returns the number page where we find a picture. In practice, 0/1

## ◆ operator=()

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

## ◆ readMCLD()

bool WPS8Table::readMCLD | ( | RVNGInputStreamPtr | input,
|  | WPSEntry const & | entry
| ) |  |
| protected

reads a MCLD zone: a zone which stores the tables structures

Referenced by readStructures().

## ◆ readStructures()

bool WPS8Table::readStructures | ( | RVNGInputStreamPtr const & | input | ) |
| protected

finds all structures which correspond to a table

## ◆ sendTable()

bool WPS8Table::sendTable | ( | Vec2f const & | siz,
|  | int | tableId,
|  | int | strsid,
|  | bool | inTextBox = `false`
| ) |  |
| protected

tries to send a table corresponding to strsid with actual size siz

Parameters

  siz | the size of the table in the document
  tableId | the table identificator
  strsid | indicates the text entry (and its corresponding TCD )
  inTextBox | indicates if we have already created a textbox to insert the table which contains the cells' text.

Referenced by flushExtra().

## ◆ sendTextInCell()

void WPS8Table::sendTextInCell | ( | int | strsId,
|  | int | cellId
| ) |  |
| protected

Referenced by WPS8TableInternal::Cell::sendContent().

## ◆ setListener()

void WPS8Table::setListener | ( | WPSContentListenerPtr & | listen | ) |
| inline

sets the listener

## ◆ version()

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

returns the file version

## Friends And Related Function Documentation

## ◆ WPS8Parser

friend class WPS8Parser
| friend

## ◆ WPS8TableInternal::Cell

friend struct WPS8TableInternal::Cell
| friend

## Member Data Documentation

## ◆ m_asciiFile

libwps::DebugFile& WPS8Table::m_asciiFile
| protected

the ascii file

## ◆ m_listener

WPSContentListenerPtr WPS8Table::m_listener
| protected

the listener

Referenced by flushExtra(), and sendTable().

## ◆ m_mainParser

WPS8Parser& WPS8Table::m_mainParser
| protected

the main parser

Referenced by flushExtra(), readStructures(), sendTable(), sendTextInCell(), and version().

## ◆ m_state

std::shared_ptr<WPS8TableInternal::State> WPS8Table::m_state
| mutableprotected

the state

Referenced by computePositions(), flushExtra(), numPages(), readMCLD(), readStructures(), sendTable(), and version().

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

- WPS8Table.h
- WPS8Table.cpp