QuattroSpreadsheetInternal::Spreadsheet Class Reference

the spreadsheet of a Quattro Spreadsheet More...

Public Member Functions

 Spreadsheet (int id, libwps_tools_win::Font::Type fontType)
 a constructor More...
 
CellgetCell (Vec2i const &pos, libwps_tools_win::Font::Type type)
 return a cell corresponding to a spreadsheet, create one if needed More...
 
bool empty () const
 returns true if the spreedsheet is empty More...
 
void setColumnWidth (int col, int w=-1)
 set the columns size More...
 
std::vector< WPSColumnFormatgetWidths () const
 return the columns format More...
 
void setRowHeight (int row, int h)
 set the rows size in TWIP More...
 
void setRowHeights (int minRow, int maxRow, int h)
 set the rows size in TWIP More...
 
float getRowHeight (int row) const
 returns the row size in point More...
 
float getRowHeight (int row, int &numRepeated) const
 returns the height of a row in point and updated repeated row More...
 
void compressRowHeights ()
 try to compress the list of row height More...
 
Vec2f getPosition (Vec2i const &cell) const
 returns the cell position More...
 

Public Attributes

int m_id
 the spreadsheet id More...
 
int m_numCols
 the number of columns More...
 
std::map< Vec2i, int > m_rowHeightMap
 the map Vec2i(min row, max row) to size in TWIP More...
 
float m_heightDefault
 the default row size in point More...
 
std::vector< int > m_widthCols
 the column size in TWIP More...
 
float m_widthDefault
 the default width size in point More...
 
std::map< Vec2i, Cellm_positionToCellMap
 a map cell to not empty cells More...
 
Cell m_dummyCell
 a dummy cell More...
 

Detailed Description

the spreadsheet of a Quattro Spreadsheet

Constructor & Destructor Documentation

QuattroSpreadsheetInternal::Spreadsheet::Spreadsheet ( int  id,
libwps_tools_win::Font::Type  fontType 
)
inline

a constructor

Member Function Documentation

void QuattroSpreadsheetInternal::Spreadsheet::compressRowHeights ( )
inline

try to compress the list of row height

bool QuattroSpreadsheetInternal::Spreadsheet::empty ( ) const
inline

returns true if the spreedsheet is empty

Cell& QuattroSpreadsheetInternal::Spreadsheet::getCell ( Vec2i const &  pos,
libwps_tools_win::Font::Type  type 
)
inline

return a cell corresponding to a spreadsheet, create one if needed

Vec2f QuattroSpreadsheetInternal::Spreadsheet::getPosition ( Vec2i const &  cell) const
inline

returns the cell position

float QuattroSpreadsheetInternal::Spreadsheet::getRowHeight ( int  row) const
inline

returns the row size in point

float QuattroSpreadsheetInternal::Spreadsheet::getRowHeight ( int  row,
int &  numRepeated 
) const
inline

returns the height of a row in point and updated repeated row

std::vector<WPSColumnFormat> QuattroSpreadsheetInternal::Spreadsheet::getWidths ( ) const
inline

return the columns format

void QuattroSpreadsheetInternal::Spreadsheet::setColumnWidth ( int  col,
int  w = -1 
)
inline

set the columns size

void QuattroSpreadsheetInternal::Spreadsheet::setRowHeight ( int  row,
int  h 
)
inline

set the rows size in TWIP

void QuattroSpreadsheetInternal::Spreadsheet::setRowHeights ( int  minRow,
int  maxRow,
int  h 
)
inline

set the rows size in TWIP

Member Data Documentation

Cell QuattroSpreadsheetInternal::Spreadsheet::m_dummyCell
mutable

a dummy cell

Referenced by getCell().

float QuattroSpreadsheetInternal::Spreadsheet::m_heightDefault

the default row size in point

Referenced by compressRowHeights(), getPosition(), and getRowHeight().

int QuattroSpreadsheetInternal::Spreadsheet::m_id

the spreadsheet id

int QuattroSpreadsheetInternal::Spreadsheet::m_numCols

the number of columns

Referenced by setColumnWidth().

std::map<Vec2i, Cell> QuattroSpreadsheetInternal::Spreadsheet::m_positionToCellMap

a map cell to not empty cells

Referenced by empty(), and getCell().

std::map<Vec2i,int> QuattroSpreadsheetInternal::Spreadsheet::m_rowHeightMap

the map Vec2i(min row, max row) to size in TWIP

Referenced by compressRowHeights(), getPosition(), getRowHeight(), setRowHeight(), and setRowHeights().

std::vector<int> QuattroSpreadsheetInternal::Spreadsheet::m_widthCols

the column size in TWIP

Referenced by getPosition(), getWidths(), and setColumnWidth().

float QuattroSpreadsheetInternal::Spreadsheet::m_widthDefault

the default width size in point

Referenced by getPosition(), and getWidths().


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

Generated on Wed Dec 26 2018 19:08:25 for libwps by doxygen 1.8.8