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
Vec2iposition ()
 position accessor
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
- Public Member Functions inherited from MWAWCellFormat
 MWAWCellFormat ()
 constructor
virtual ~MWAWCellFormat ()
Format format () const
 returns the format type
int subformat () const
 returns the subformat type
void setFormat (Format form, int subform=0)
 sets the format type
void setSubformat (int subFormat)
 sets the subformat
int digits () const
 returns the number of digits ( for a number)
void setDigits (int newDigit)
 set the number of digits ( for a number)
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)
 set the background color
int compare (MWAWCellFormat const &cell) const
 a comparison function

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)
- Protected Attributes inherited from MWAWCellFormat
Format m_format
 the cell format : by default unknown
int m_subFormat
 the sub format
int m_digits
 the number of digits
HorizontalAlignment m_hAlign
 the cell alignement : by default nothing
VerticalAlignment m_vAlign
 the vertical cell alignement : by default nothing
std::vector< MWAWBorderm_bordersList
 the cell border MWAWBorder::Pos
MWAWColor m_backgroundColor
 the backgroung color
bool m_protected
 cell protected

Friends

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

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 May 22 2013 18:12:45 for libmwaw by doxygen 1.8.1.2