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