MWAWCell Class Reference

a structure used to defined the cell position, and a format More...

#include <MWAWCell.hxx>

Inheritance diagram for MWAWCell:
MWAWCellFormat

Public Member Functions

 MWAWCell ()
 constructor More...
 
Vec2iposition ()
 position accessor 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...
 
- Public Member Functions inherited from MWAWCellFormat
 MWAWCellFormat ()
 constructor More...
 
virtual ~MWAWCellFormat ()
 
Format format () const
 returns the format type More...
 
int subformat () const
 returns the subformat type More...
 
void setFormat (Format form, int subform=0)
 sets the format type More...
 
void setSubformat (int subFormat)
 sets the subformat More...
 
int digits () const
 returns the number of digits ( for a number) More...
 
void setDigits (int newDigit)
 set the number of digits ( for a number) 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)
 set the background color More...
 
int compare (MWAWCellFormat const &cell) const
 a comparison function 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...
 
- Protected Attributes inherited from MWAWCellFormat
Format m_format
 the cell format : by default unknown More...
 
int m_subFormat
 the sub format More...
 
int m_digits
 the number of digits More...
 
HorizontalAlignment m_hAlign
 the cell alignement : by default nothing More...
 
VerticalAlignment m_vAlign
 the vertical cell alignement : by default nothing More...
 
std::vector< MWAWBorderm_bordersList
 the cell border MWAWBorder::Pos More...
 
MWAWColor m_backgroundColor
 the backgroung color More...
 
bool m_protected
 cell protected More...
 

Friends

std::ostream & operator<< (std::ostream &o, MWAWCell const &cell)
 operator<< More...
 

Additional Inherited Members

- Public Types inherited from MWAWCellFormat
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  Format {
  F_TEXT, F_NUMBER, F_DATE, F_TIME,
  F_UNKNOWN
}
 the different types of cell's field More...
 

Detailed Description

a structure used to defined the cell position, and a format

Constructor & Destructor Documentation

MWAWCell::MWAWCell ( )
inline

constructor

Member Function Documentation

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

Vec2i const& MWAWCell::numSpannedCells ( ) const
inline

returns the number of spanned cells

Referenced by MWAWContentListener::openTableCell(), and operator<<().

Vec2i const& MWAWCell::position ( ) const
inline

position accessor

void MWAWCell::setNumSpannedCells ( Vec2i  numSpanned)
inline
void MWAWCell::setPosition ( Vec2i  posi)
inline

set the cell positions : 0,0 -> A1, 0,1 -> A2

Referenced by FWText::sendTable(), and MSKGraph::sendTable().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
MWAWCell const &  cell 
)
friend

operator<<

Member Data Documentation

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


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

Generated on Wed Jul 10 2013 18:02:05 for libmwaw by doxygen 1.8.4