a structure used to define a cell and its format More...
#include <MWAWCell.hxx>
Public Types | |
| enum | HorizontalAlignment { HALIGN_LEFT, HALIGN_RIGHT, HALIGN_CENTER, HALIGN_FULL, HALIGN_DEFAULT } |
| the default horizontal alignement. More... | |
| enum | VerticalAlignment { VALIGN_TOP, VALIGN_CENTER, VALIGN_BOTTOM, VALIGN_DEFAULT } |
| the default vertical alignement. 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 | |
| virtual | ~MWAWCell () |
| destructor | |
| void | addTo (WPXPropertyList &propList) const |
| adds to the propList | |
| virtual bool | send (MWAWContentListenerPtr listener, MWAWTable &table) |
| function called when a cell is send by MWAWTable to send a cell to a listener. | |
| virtual bool | sendContent (MWAWContentListenerPtr listener, MWAWTable &table) |
| function called when the content of a cell must be send to the listener, ie. | |
| Vec2i const & | position () const |
| position accessor | |
| void | setPosition (Vec2i posi) |
| set the cell positions : 0,0 -> A1, 0,1 -> A2 | |
| Vec2i const & | numSpannedCells () const |
| returns the number of spanned cells | |
| void | setNumSpannedCells (Vec2i numSpanned) |
| sets the number of spanned cells : Vec2i(1,1) means 1 cellule | |
| Box2f const & | bdBox () const |
| bdbox accessor | |
| void | setBdBox (Box2f box) |
| set the bdbox (unit point) | |
| Vec2f const & | bdSize () const |
| bdbox size accessor | |
| void | setBdSize (Vec2f sz) |
| set the bdbox size(unit point) | |
| bool | isProtected () const |
| returns true if the cell is protected | |
| void | setProtected (bool fl) |
| returns true if the cell is protected | |
| HorizontalAlignment | hAlignement () const |
| returns the horizontal alignement | |
| void | setHAlignement (HorizontalAlignment align) |
| sets the horizontal alignement | |
| VerticalAlignment | vAlignement () const |
| returns the vertical alignement | |
| void | setVAlignement (VerticalAlignment align) |
| sets the vertical alignement | |
| 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::Left|... | |
| 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 | getCellName (Vec2i const &pos, Vec2b 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 | |
| Vec2i | m_position |
| the cell row and column : 0,0 -> A1, 0,1 -> A2 | |
| Vec2i | m_numberCellSpanned |
| the cell spanned : by default (1,1) | |
| Box2f | m_bdBox |
| the cell bounding box (unit in point) | |
| Vec2f | m_bdSize |
| the cell bounding size : unit point | |
| HorizontalAlignment | m_hAlign |
| the cell alignement : by default nothing | |
| VerticalAlignment | m_vAlign |
| the vertical cell alignement : by default nothing | |
| std::vector< MWAWBorder > | m_bordersList |
| the cell border MWAWBorder::Pos | |
| MWAWColor | m_backgroundColor |
| the backgroung color | |
| bool | m_protected |
| cell protected | |
| 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 |
| MWAWCell::MWAWCell | ( | ) | [inline] |
constructor
| virtual MWAWCell::~MWAWCell | ( | ) | [inline, virtual] |
destructor
| void MWAWCell::addTo | ( | WPXPropertyList & | propList | ) | const |
adds to the propList
Referenced by MWAWContentListener::openTableCell().
| MWAWColor MWAWCell::backgroundColor | ( | ) | const [inline] |
returns the background color
Referenced by addTo().
| Box2f const& MWAWCell::bdBox | ( | ) | const [inline] |
bdbox accessor
Referenced by MWAWTableInternal::Compare::Point::getPos(), MWAWTableInternal::Compare::Point::getSize(), and MWAWTableInternal::Compare::operator()().
| Vec2f const& MWAWCell::bdSize | ( | ) | const [inline] |
bdbox size accessor
| std::vector<MWAWBorder> const& MWAWCell::borders | ( | ) | const [inline] |
return the cell border: libmwaw::Left | ...
| ExtraLine MWAWCell::extraLine | ( | ) | const [inline] |
returns the extra lines
Referenced by MWAWTable::sendExtraLines(), and HMWJGraphInternal::TableCell::update().
| MWAWBorder const& MWAWCell::extraLineType | ( | ) | const [inline] |
returns the extra line border
Referenced by MWAWTable::sendExtraLines().
| std::string MWAWCell::getCellName | ( | Vec2i const & | pos, |
| Vec2b const & | absolute | ||
| ) | [static] |
return the name of a cell (given row and column) : 0,0 -> A1, 0,1 -> A2
Referenced by operator<<().
| std::string MWAWCell::getColumnName | ( | int | col | ) | [static] |
return the column name
| HorizontalAlignment MWAWCell::hAlignement | ( | ) | const [inline] |
returns the horizontal alignement
Referenced by addTo().
| bool MWAWCell::hasBorders | ( | ) | const [inline] |
return true if the cell has some border
| bool MWAWCell::hasExtraLine | ( | ) | const [inline] |
returns true if we have some extra lines
Referenced by MWAWTable::sendExtraLines(), and HMWJGraphInternal::TableCell::update().
| bool MWAWCell::isProtected | ( | ) | const [inline] |
returns true if the cell is protected
Referenced by addTo().
| Vec2i const& MWAWCell::numSpannedCells | ( | ) | const [inline] |
returns the number of spanned cells
Referenced by addTo(), and operator<<().
| Vec2i const& MWAWCell::position | ( | ) | const [inline] |
position accessor
Referenced by addTo().
| void MWAWCell::resetBorders | ( | ) | [inline] |
reset the border
| bool MWAWCell::send | ( | MWAWContentListenerPtr | listener, |
| MWAWTable & | table | ||
| ) | [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()
| bool MWAWCell::sendContent | ( | MWAWContentListenerPtr | listener, |
| MWAWTable & | table | ||
| ) | [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 WNTextInternal::Cell, MWProStructuresInternal::Cell, HMWKGraphInternal::TableCell, HMWJGraphInternal::TableCell, and CWTableInternal::TableCell.
Referenced by send().
| void MWAWCell::setBackgroundColor | ( | MWAWColor | color | ) | [inline] |
sets the background color
Referenced by MWProStructuresInternal::Cell::Cell(), MSKTable::sendTable(), MSWText::sendTable(), HMWJGraphInternal::TableCell::update(), MRWTextInternal::Paragraph::update(), and WNTextInternal::TableData::updateCell().
| void MWAWCell::setBdBox | ( | Box2f | box | ) | [inline] |
set the bdbox (unit point)
Referenced by MWProStructuresInternal::Cell::Cell(), and WNTextInternal::TableData::updateCell().
| void MWAWCell::setBdSize | ( | Vec2f | sz | ) | [inline] |
set the bdbox size(unit point)
| void MWAWCell::setBorders | ( | int | wh, |
| MWAWBorder const & | border | ||
| ) |
sets the cell border: wh=libmwaw::Left|...
Referenced by MWProStructuresInternal::Cell::Cell(), MSKTable::sendTable(), FWText::sendTable(), MSWText::sendTable(), CWTableInternal::TableCell::update(), HMWJGraphInternal::TableCell::update(), MRWTextInternal::Paragraph::update(), and WNTextInternal::TableData::updateCell().
| void MWAWCell::setExtraLine | ( | ExtraLine | extrLine, |
| MWAWBorder const & | type = MWAWBorder() |
||
| ) | [inline] |
sets the extraline
Referenced by HMWJGraphInternal::TableCell::update().
| void MWAWCell::setHAlignement | ( | HorizontalAlignment | align | ) | [inline] |
sets the horizontal alignement
| void MWAWCell::setNumSpannedCells | ( | Vec2i | numSpanned | ) | [inline] |
sets the number of spanned cells : Vec2i(1,1) means 1 cellule
| void MWAWCell::setPosition | ( | Vec2i | posi | ) | [inline] |
set the cell positions : 0,0 -> A1, 0,1 -> A2
Referenced by CWDatabase::sendDatabase(), CWSpreadsheet::sendSpreadsheet(), MSKTable::sendTable(), MRWText::sendTable(), FWText::sendTable(), MSWText::sendTable(), and WPParser::sendWindow().
| void MWAWCell::setProtected | ( | bool | fl | ) | [inline] |
returns true if the cell is protected
| void MWAWCell::setVAlignement | ( | VerticalAlignment | align | ) | [inline] |
sets the vertical alignement
Referenced by CWSpreadsheet::sendSpreadsheet().
| VerticalAlignment MWAWCell::vAlignement | ( | ) | const [inline] |
returns the vertical alignement
Referenced by addTo().
| std::ostream& operator<< | ( | std::ostream & | o, |
| MWAWCell const & | cell | ||
| ) | [friend] |
operator<<
MWAWColor MWAWCell::m_backgroundColor [protected] |
the backgroung color
Referenced by backgroundColor(), operator<<(), and setBackgroundColor().
Box2f MWAWCell::m_bdBox [protected] |
the cell bounding box (unit in point)
Referenced by bdBox(), operator<<(), and setBdBox().
Vec2f MWAWCell::m_bdSize [protected] |
the cell bounding size : unit point
Referenced by bdSize(), operator<<(), and setBdSize().
std::vector<MWAWBorder> MWAWCell::m_bordersList [protected] |
the cell border MWAWBorder::Pos
Referenced by addTo(), borders(), hasBorders(), operator<<(), resetBorders(), and setBorders().
ExtraLine MWAWCell::m_extraLine [protected] |
extra line
Referenced by extraLine(), hasExtraLine(), operator<<(), and setExtraLine().
MWAWBorder MWAWCell::m_extraLineType [protected] |
extra line type
Referenced by extraLineType(), hasExtraLine(), operator<<(), and setExtraLine().
HorizontalAlignment MWAWCell::m_hAlign [protected] |
the cell alignement : by default nothing
Referenced by hAlignement(), operator<<(), and setHAlignement().
Vec2i MWAWCell::m_numberCellSpanned [protected] |
the cell spanned : by default (1,1)
Referenced by numSpannedCells(), and setNumSpannedCells().
Vec2i MWAWCell::m_position [protected] |
the cell row and column : 0,0 -> A1, 0,1 -> A2
Referenced by operator<<(), position(), and setPosition().
bool MWAWCell::m_protected [protected] |
cell protected
Referenced by isProtected(), operator<<(), and setProtected().
VerticalAlignment MWAWCell::m_vAlign [protected] |
the vertical cell alignement : by default nothing
Referenced by operator<<(), setVAlignement(), and vAlignement().