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...
 
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...
 

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...
 
int m_heightDefault
 the default row size in point More...
 
std::vector< int > m_widthCols
 the column size in TWIP More...
 
int 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

◆ 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

◆ 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

Member Data Documentation

◆ m_dummyCell

Cell QuattroSpreadsheetInternal::Spreadsheet::m_dummyCell
mutable

a dummy cell

Referenced by getCell().

◆ m_heightDefault

int QuattroSpreadsheetInternal::Spreadsheet::m_heightDefault

the default row size in point

Referenced by compressRowHeights(), and getRowHeight().

◆ m_id

int QuattroSpreadsheetInternal::Spreadsheet::m_id

the spreadsheet id

◆ m_numCols

int QuattroSpreadsheetInternal::Spreadsheet::m_numCols

the number of columns

Referenced by setColumnWidth().

◆ m_positionToCellMap

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

a map cell to not empty cells

Referenced by empty(), and getCell().

◆ m_rowHeightMap

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

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

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

◆ m_widthCols

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

the column size in TWIP

Referenced by getWidths(), and setColumnWidth().

◆ m_widthDefault

int QuattroSpreadsheetInternal::Spreadsheet::m_widthDefault

the default width size in point

Referenced by getWidths().


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

Generated on Tue May 8 2018 13:09:52 for libwps by doxygen 1.8.14