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

Public Attributes

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

Detailed Description

the spreadsheet of a Quattro Spreadsheet

Constructor & Destructor Documentation

◆ Spreadsheet()

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

a constructor

Member Function Documentation

◆ compressRowHeights()

void QuattroSpreadsheetInternal::Spreadsheet::compressRowHeights ( )
inline

try to compress the list of row height

◆ empty()

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

returns true if the spreedsheet is empty

◆ getCell()

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

◆ getPosition()

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

returns the cell position

◆ getRowHeight() [1/2]

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

returns the row size in point

◆ getRowHeight() [2/2]

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

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

◆ getWidths()

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

return the columns format

◆ setColumnWidth()

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

set the columns size

◆ setRowHeight()

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

set the rows size in TWIP

◆ setRowHeights()

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

set the rows size in TWIP

Member Data Documentation

◆ m_dummyCell

Cell QuattroSpreadsheetInternal::Spreadsheet::m_dummyCell
mutable

a dummy cell

Referenced by getCell(), and Spreadsheet().

◆ m_heightDefault

float QuattroSpreadsheetInternal::Spreadsheet::m_heightDefault

the default row size in point

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

◆ m_id

int QuattroSpreadsheetInternal::Spreadsheet::m_id

the spreadsheet id

Referenced by Spreadsheet().

◆ m_numCols

int QuattroSpreadsheetInternal::Spreadsheet::m_numCols

the number of columns

Referenced by setColumnWidth(), and Spreadsheet().

◆ m_positionToCellMap

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

a map cell to not empty cells

Referenced by empty(), getCell(), and Spreadsheet().

◆ m_rowHeightMap

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

◆ m_widthCols

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

the column size in TWIP

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

◆ m_widthDefault

float QuattroSpreadsheetInternal::Spreadsheet::m_widthDefault

the default width size in point

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


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

Generated on Sat Jul 19 2025 05:24:41 for libwps by doxygen 1.14.0