a structure used to define a cell and its format More...
#include <MWAWCell.hxx>
Classes | |
| struct | CompareFormat |
| a comparaison structure used to store data More... | |
| struct | Format |
| a structure uses to define the format of a cell content More... | |
Public Types | |
| enum | FormatType { F_TEXT , F_BOOLEAN , F_NUMBER , F_DATE , F_TIME , F_UNKNOWN } |
| the different format of a cell's content More... | |
| enum | NumberType { F_NUMBER_CURRENCY , F_NUMBER_DECIMAL , F_NUMBER_FRACTION , F_NUMBER_GENERIC , F_NUMBER_SCIENTIFIC , F_NUMBER_PERCENT , F_NUMBER_UNKNOWN } |
| the different number format of a cell's content More... | |
| enum | HorizontalAlignment { HALIGN_LEFT , HALIGN_RIGHT , HALIGN_CENTER , HALIGN_FULL , HALIGN_DEFAULT } |
| the default horizontal alignment. More... | |
| enum | VerticalAlignment { VALIGN_TOP , VALIGN_CENTER , VALIGN_BOTTOM , VALIGN_DEFAULT } |
| the default vertical alignment. More... | |
| enum | ExtraLine { E_None , E_Line1 , E_Line2 , E_Cross } |
| an enum to defined potential internal line: E_Line1=TL to RB, E_Line2=BL to RT More... | |
Public Member Functions | |
| MWAWCell () | |
| constructor | |
| MWAWCell (MWAWCell const &)=default | |
| MWAWCell & | operator= (MWAWCell const &)=default |
| MWAWCell & | operator= (MWAWCell &&)=default |
| virtual | ~MWAWCell () |
| destructor | |
| void | addTo (librevenge::RVNGPropertyList &propList, std::shared_ptr< MWAWFontConverter > fontConverter) const |
| adds to the propList | |
| virtual bool | send (MWAWListenerPtr listener, MWAWTable &table) |
| function called when a cell is send by MWAWTable to send a cell to a listener. | |
| virtual bool | sendContent (MWAWListenerPtr listener, MWAWTable &table) |
| function called when the content of a cell must be send to the listener, ie. | |
| MWAWVec2i const & | position () const |
| position accessor | |
| void | setPosition (MWAWVec2i posi) |
| set the cell positions : 0,0 -> A1, 0,1 -> A2 | |
| MWAWVec2i const & | numSpannedCells () const |
| returns the number of spanned cells | |
| void | setNumSpannedCells (MWAWVec2i numSpanned) |
| sets the number of spanned cells : MWAWVec2i(1,1) means 1 cellule | |
| MWAWBox2f const & | bdBox () const |
| bdbox accessor | |
| void | setBdBox (MWAWBox2f box) |
| set the bdbox (unit point) | |
| MWAWVec2f const & | bdSize () const |
| bdbox size accessor | |
| void | setBdSize (MWAWVec2f sz) |
| set the bdbox size(unit point) | |
| Format const & | getFormat () const |
| returns the cell format | |
| void | setFormat (Format const &format) |
| set the cell format | |
| bool | isFontSet () const |
| returns true if the font has been set | |
| MWAWFont | getFont () const |
| returns the font | |
| void | setFont (MWAWFont const &font, bool isDefault=false) |
| sets the fonts | |
| bool | isProtected () const |
| returns true if the cell is protected | |
| void | setProtected (bool fl) |
| sets the cell's protected flag | |
| HorizontalAlignment | hAlignment () const |
| returns the horizontal alignment | |
| void | setHAlignment (HorizontalAlignment align) |
| sets the horizontal alignment | |
| VerticalAlignment | vAlignment () const |
| returns the vertical alignment | |
| void | setVAlignment (VerticalAlignment align) |
| sets the vertical alignment | |
| double | rotation () const |
| returns the rotation angle in degree | |
| void | setRotation (double angle) |
| sets the rotation angle | |
| bool | hasBorders () const |
| return true if the cell has some border | |
| std::vector< MWAWBorder > const & | borders () const |
| return the cell border: libmwaw::Left | ... | |
| void | resetBorders () |
| reset the border | |
| void | setBorders (int wh, MWAWBorder const &border) |
| sets the cell border: wh=libmwaw::LeftBit|... | |
| MWAWColor | backgroundColor () const |
| returns the background color | |
| void | setBackgroundColor (MWAWColor color) |
| sets the background color | |
| bool | hasExtraLine () const |
| returns true if we have some extra lines | |
| ExtraLine | extraLine () const |
| returns the extra lines | |
| MWAWBorder const & | extraLineType () const |
| returns the extra line border | |
| void | setExtraLine (ExtraLine extrLine, MWAWBorder const &type=MWAWBorder()) |
| sets the extraline | |
Static Public Member Functions | |
| static std::string | getBasicCellName (MWAWVec2i const &pos) |
| return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2... | |
| static std::string | getCellName (MWAWVec2i const &pos, MWAWVec2b const &absolute) |
| return the name of a cell (given row and column) : 0,0 -> [.A1], 0,1 -> [.A2] | |
| static std::string | getColumnName (int col) |
| return the column name | |
Protected Attributes | |
| MWAWVec2i | m_position |
| the cell row and column : 0,0 -> A1, 0,1 -> A2 | |
| MWAWVec2i | m_numberCellSpanned |
| the cell spanned : by default (1,1) | |
| MWAWBox2f | m_bdBox |
| the cell bounding box (unit in point) | |
| MWAWVec2f | m_bdSize |
| the cell bounding size : unit point | |
| Format | m_format |
| the cell format | |
| MWAWFont | m_font |
| the cell font | |
| bool | m_fontSet |
| a flag to know if the font has been set | |
| HorizontalAlignment | m_hAlign |
| the cell alignment : by default nothing | |
| VerticalAlignment | m_vAlign |
| the vertical cell alignment : by default nothing | |
| double | m_rotation |
| the content's rotation in degree | |
| MWAWColor | m_backgroundColor |
| the backgroung color | |
| bool | m_protected |
| cell protected | |
| std::vector< MWAWBorder > | m_bordersList |
| the cell border MWAWBorder::Pos | |
| ExtraLine | m_extraLine |
| extra line | |
| MWAWBorder | m_extraLineType |
| extra line type | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, MWAWCell const &cell) |
| operator<< | |
a structure used to define a cell and its format
| enum MWAWCell::ExtraLine |
| enum MWAWCell::FormatType |
| enum MWAWCell::NumberType |
|
inline |
constructor
Referenced by BeagleWksDBParserInternal::Cell::Cell(), BeagleWksSSParserInternal::Cell::Cell(), JazzSSParserInternal::Cell::Cell(), MacWrtProStructuresInternal::Cell::Cell(), RagTimeSpreadsheetInternal::Cell::Cell(), WingzParserInternal::Cell::Cell(), WriteNowTextInternal::Cell::Cell(), MsWksDBParserInternal::FieldType::FieldType(), MWAWCell(), operator<<, operator=(), operator=(), ClarisWksTableInternal::TableCell::TableCell(), HanMacWrdJGraphInternal::TableCell::TableCell(), and HanMacWrdKGraphInternal::TableCell::TableCell().
|
default |
|
inlinevirtual |
destructor
| void MWAWCell::addTo | ( | librevenge::RVNGPropertyList & | propList, |
| std::shared_ptr< MWAWFontConverter > | fontConverter ) const |
adds to the propList
Referenced by MWAWSpreadsheetListener::openSheetCell(), MWAWGraphicListener::openTableCell(), MWAWPresentationListener::openTableCell(), MWAWSpreadsheetListener::openTableCell(), and MWAWTextListener::openTableCell().
|
inline |
returns the background color
Referenced by addTo(), and BeagleWksSSParser::readCellSheet().
|
inline |
bdbox accessor
Referenced by MWAWTableInternal::Compare::operator()().
|
inline |
bdbox size accessor
|
inline |
return the cell border: libmwaw::Left | ...
|
inline |
returns the extra lines
Referenced by MWAWTable::sendExtraLines(), and HanMacWrdJGraphInternal::TableCell::update().
|
inline |
returns the extra line border
Referenced by MWAWTable::sendExtraLines().
|
static |
return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2...
Referenced by RagTime5Spreadsheet::send(), BeagleWksDBParser::sendDatabase(), ClarisWksDatabase::sendDatabase(), and GreatWksDBParser::sendDatabase().
return the name of a cell (given row and column) : 0,0 -> [.A1], 0,1 -> [.A2]
Referenced by operator<<.
|
static |
return the column name
|
inline |
returns the font
Referenced by RagTimeSpreadsheet::send(), and MultiplanParser::sendCell().
|
inline |
returns the cell format
Referenced by MWAWSpreadsheetListener::openSheetCell(), GreatWksDBParser::readFormulaResult(), RagTimeSpreadsheet::readSpreadsheetCellContent(), RagTimeSpreadsheet::send(), RagTime5SpreadsheetInternal::CellValue::update(), RagTimeSpreadsheetInternal::CellFormat::update(), RagTime5StyleManager::updateCellFormat(), BeagleWksDBParserInternal::Database::updateWithContent(), and MsWksDBParserInternal::FieldType::updateWithContent().
|
inline |
returns the horizontal alignment
Referenced by addTo().
|
inline |
return true if the cell has some border
Referenced by GreatWksDBParserInternal::Cell::isEmpty(), GreatWksSSParserInternal::Cell::isEmpty(), and MsWksSSParserInternal::Cell::isEmpty().
|
inline |
returns true if we have some extra lines
Referenced by MWAWTable::sendExtraLines(), and HanMacWrdJGraphInternal::TableCell::update().
|
inline |
returns true if the font has been set
|
inline |
returns true if the cell is protected
Referenced by addTo().
|
inline |
returns the number of spanned cells
Referenced by addTo(), and operator<<.
|
inline |
position accessor
Referenced by addTo(), RagTimeSpreadsheetInternal::Spreadsheet::getRightBottomPosition(), BeagleWksSSParser::readCellSheet(), RagTimeSpreadsheet::readSpreadsheetCellContent(), RagTimeSpreadsheet::readSpreadsheetCellFormat(), RagTimeSpreadsheet::readSpreadsheetCellV2(), RagTimeSpreadsheet::send(), GreatWksDBParser::sendDatabase(), and WingzParserInternal::Spreadsheet::update().
|
inline |
reset the border
|
inline |
returns the rotation angle in degree
|
virtual |
function called when a cell is send by MWAWTable to send a cell to a listener.
By default: calls openTableCell(*this), sendContent and then closeTableCell()
|
virtual |
function called when the content of a cell must be send to the listener, ie.
when MWAWTable::sendTable or MWAWTable::sendAsText is called.
Reimplemented in ClarisWksTableInternal::TableCell, HanMacWrdJGraphInternal::TableCell, HanMacWrdKGraphInternal::TableCell, MacWrtProStructuresInternal::Cell, and WriteNowTextInternal::Cell.
Referenced by send().
|
inline |
sets the background color
Referenced by MacWrtProStructuresInternal::Cell::Cell(), BeagleWksSSParser::readCellSheet(), WingzParser::readSpreadsheetCellList(), RagTime5Spreadsheet::send(), ClarisWksSpreadsheet::sendSpreadsheet(), MsWksTable::sendTable(), MsWrdText::sendTable(), HanMacWrdJGraphInternal::TableCell::update(), MarinerWrtTextInternal::Paragraph::update(), RagTimeSpreadsheetInternal::CellExtra::update(), and WriteNowTextInternal::TableData::updateCell().
|
inline |
set the bdbox (unit point)
Referenced by MacWrtProStructuresInternal::Cell::Cell(), and WriteNowTextInternal::TableData::updateCell().
|
inline |
set the bdbox size(unit point)
| void MWAWCell::setBorders | ( | int | wh, |
| MWAWBorder const & | border ) |
sets the cell border: wh=libmwaw::LeftBit|...
Referenced by MacWrtProStructuresInternal::Cell::Cell(), GreatWksSSParser::readCell(), MsWksSSParser::readCell(), BeagleWksSSParser::readCellSheet(), WingzParser::readSpreadsheetCellList(), RagTimeSpreadsheet::readSpreadsheetCellV2(), RagTime5Spreadsheet::send(), ClarisWksSpreadsheet::sendSpreadsheet(), FullWrtText::sendTable(), MsWksTable::sendTable(), MsWrdText::sendTable(), ClarisWksTableInternal::TableCell::update(), HanMacWrdJGraphInternal::TableCell::update(), MarinerWrtTextInternal::Paragraph::update(), RagTimeSpreadsheetInternal::CellBorder::update(), and WriteNowTextInternal::TableData::updateCell().
|
inline |
sets the extraline
Referenced by HanMacWrdJGraphInternal::TableCell::update().
|
inline |
sets the fonts
Referenced by JazzSSParser::readCell(), MsWksSSParser::readCell(), BeagleWksSSParser::readCellSheet(), MsWksDBParser::readFieldTypes(), MsWksDBParser::readFieldTypesV2(), BeagleWksDBParser::readFormat(), RagTimeSpreadsheet::readSpreadsheetCellFormat(), WingzParser::readSpreadsheetCellList(), RagTimeSpreadsheet::readSpreadsheetCellV2(), RagTime5Spreadsheet::send(), MultiplanParser::sendCell(), and ClarisWksSpreadsheet::sendSpreadsheet().
|
inline |
set the cell format
Referenced by GreatWksSSParser::readCell(), JazzSSParser::readCell(), MsWksSSParser::readCell(), BeagleWksSSParser::readCellSheet(), GreatWksDBParser::readFieldRecords(), MsWksDBParser::readFieldTypes(), MsWksDBParser::readFieldTypesV2(), BeagleWksDBParser::readFormat(), GreatWksDBParser::readFormulaResult(), GreatWksDBParser::readRowRecords(), RagTimeSpreadsheet::readSpreadsheetCellContent(), WingzParser::readSpreadsheetCellList(), RagTimeSpreadsheet::readSpreadsheetCellV2(), MultiplanParser::sendCell(), ClarisWksDatabase::sendDatabase(), ClarisWksSpreadsheet::sendSpreadsheet(), RagTime5SpreadsheetInternal::CellValue::update(), RagTimeSpreadsheetInternal::CellFormat::update(), and RagTime5StyleManager::updateCellFormat().
|
inline |
sets the horizontal alignment
Referenced by GreatWksSSParser::readCell(), JazzSSParser::readCell(), MsWksSSParser::readCell(), BeagleWksSSParser::readCellSheet(), MsWksDBParser::readFieldTypes(), MsWksDBParser::readFieldTypesV2(), BeagleWksDBParser::readFormat(), WingzParser::readSpreadsheetCellList(), RagTimeSpreadsheet::readSpreadsheetCellV2(), RagTime5Spreadsheet::send(), MultiplanParser::sendCell(), ClarisWksDatabase::sendDatabase(), ClarisWksSpreadsheet::sendSpreadsheet(), and RagTimeSpreadsheetInternal::CellFormat::update().
|
inline |
sets the number of spanned cells : MWAWVec2i(1,1) means 1 cellule
Referenced by RagTime5Spreadsheet::send().
|
inline |
set the cell positions : 0,0 -> A1, 0,1 -> A2
Referenced by BeagleWksDBParserInternal::Cell::Cell(), BeagleWksSSParserInternal::Cell::Cell(), RagTimeSpreadsheetInternal::Cell::Cell(), WingzParserInternal::Cell::Cell(), GreatWksSSParser::readCell(), JazzSSParser::readCell(), MsWksSSParser::readCell(), RagTimeSpreadsheet::readSpreadsheetCellsV2(), RagTimeSpreadsheet::readSpreadsheetComplexStructure(), RagTime5Spreadsheet::send(), ScriptWriterParser::send(), MultiplanParser::sendCell(), ClarisWksDatabase::sendDatabase(), GreatWksDBParser::sendDatabase(), ClarisWksSpreadsheet::sendSpreadsheet(), ClarisWksSpreadsheet::sendSpreadsheetAsTable(), FullWrtText::sendTable(), MarinerWrtText::sendTable(), MsWksTable::sendTable(), MsWrdText::sendTable(), WriterPlsParser::sendWindow(), BeagleWksDBParserInternal::Database::updateWithContent(), and MsWksDBParserInternal::FieldType::updateWithContent().
|
inline |
sets the cell's protected flag
Referenced by GreatWksSSParser::readCell(), MsWksSSParser::readCell(), MultiplanParser::sendCell(), and RagTimeSpreadsheetInternal::CellFormat::update().
|
inline |
sets the rotation angle
Referenced by RagTime5Spreadsheet::send().
|
inline |
sets the vertical alignment
Referenced by RagTime5Spreadsheet::send(), and ClarisWksSpreadsheet::sendSpreadsheetAsTable().
|
inline |
returns the vertical alignment
Referenced by addTo().
|
friend |
operator<<
|
protected |
the backgroung color
Referenced by backgroundColor(), MWAWCell(), operator<<, and setBackgroundColor().
|
protected |
the cell bounding box (unit in point)
Referenced by bdBox(), MWAWCell(), operator<<, and setBdBox().
|
protected |
the cell bounding size : unit point
Referenced by bdSize(), MWAWCell(), operator<<, and setBdSize().
|
protected |
the cell border MWAWBorder::Pos
Referenced by addTo(), borders(), hasBorders(), MWAWCell(), operator<<, resetBorders(), and setBorders().
|
protected |
extra line
Referenced by extraLine(), hasExtraLine(), MWAWCell(), operator<<, and setExtraLine().
|
protected |
extra line type
Referenced by extraLineType(), hasExtraLine(), MWAWCell(), operator<<, and setExtraLine().
|
protected |
the cell font
Referenced by addTo(), getFont(), MWAWCell(), and setFont().
|
protected |
a flag to know if the font has been set
Referenced by addTo(), isFontSet(), MWAWCell(), operator<<, and setFont().
|
protected |
the cell format
Referenced by getFormat(), MWAWCell(), operator<<, and setFormat().
|
protected |
the cell alignment : by default nothing
Referenced by hAlignment(), MWAWCell(), operator<<, and setHAlignment().
|
protected |
the cell spanned : by default (1,1)
Referenced by MWAWCell(), numSpannedCells(), and setNumSpannedCells().
|
protected |
the cell row and column : 0,0 -> A1, 0,1 -> A2
Referenced by MWAWCell(), operator<<, position(), and setPosition().
|
protected |
cell protected
Referenced by isProtected(), MWAWCell(), operator<<, and setProtected().
|
protected |
the content's rotation in degree
Referenced by addTo(), MWAWCell(), operator<<, rotation(), and setRotation().
|
protected |
the vertical cell alignment : by default nothing
Referenced by MWAWCell(), operator<<, setVAlignment(), and vAlignment().