MWAWCellFormat Class Reference

a structure used to defined the cell format More...

#include <MWAWCell.hxx>

Inheritance diagram for MWAWCellFormat:
MWAWCell

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

Public Member Functions

 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=MWAWBorder::LeftBit|... 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...
 

Protected Attributes

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, MWAWCellFormat const &cell)
 operator<< More...
 

Detailed Description

a structure used to defined the cell format

Member Enumeration Documentation

the different types of cell's field

Enumerator
F_TEXT 
F_NUMBER 
F_DATE 
F_TIME 
F_UNKNOWN 

the default horizontal alignement.

Note
actually mainly used for table/spreadsheet cell, FULL is not yet implemented
Enumerator
HALIGN_LEFT 
HALIGN_RIGHT 
HALIGN_CENTER 
HALIGN_FULL 
HALIGN_DEFAULT 

the default vertical alignement.

Note
actually mainly used for table/spreadsheet cell, not yet implemented
Enumerator
VALIGN_TOP 
VALIGN_CENTER 
VALIGN_BOTTOM 
VALIGN_DEFAULT 

Constructor & Destructor Documentation

MWAWCellFormat::MWAWCellFormat ( )
inline

constructor

virtual MWAWCellFormat::~MWAWCellFormat ( )
inlinevirtual

Member Function Documentation

MWAWColor MWAWCellFormat::backgroundColor ( ) const
inline

returns the background color

Referenced by MWAWContentListener::openTableCell().

std::vector<MWAWBorder> const& MWAWCellFormat::borders ( ) const
inline

return the cell border: libmwaw::Left | ...

Referenced by MWAWContentListener::openTableCell().

int MWAWCellFormat::compare ( MWAWCellFormat const &  cell) const

a comparison function

int MWAWCellFormat::digits ( ) const
inline

returns the number of digits ( for a number)

Format MWAWCellFormat::format ( ) const
inline

returns the format type

Referenced by MWAWContentListener::openTableCell().

HorizontalAlignment MWAWCellFormat::hAlignement ( ) const
inline

returns the horizontal alignement

Referenced by MWAWContentListener::openTableCell().

bool MWAWCellFormat::hasBorders ( ) const
inline

return true if the cell has some border

bool MWAWCellFormat::isProtected ( ) const
inline

returns true if the cell is protected

Referenced by MWAWContentListener::openTableCell().

void MWAWCellFormat::resetBorders ( )
inline

reset the border

void MWAWCellFormat::setDigits ( int  newDigit)
inline

set the number of digits ( for a number)

void MWAWCellFormat::setFormat ( Format  form,
int  subform = 0 
)
inline

sets the format type

void MWAWCellFormat::setHAlignement ( HorizontalAlignment  align)
inline

sets the horizontal alignement

void MWAWCellFormat::setProtected ( bool  fl)
inline

returns true if the cell is protected

void MWAWCellFormat::setSubformat ( int  subFormat)
inline

sets the subformat

void MWAWCellFormat::setVAlignement ( VerticalAlignment  align)
inline

sets the vertical alignement

Referenced by HMWJGraph::sendTableCell(), HMWKGraph::sendTableCell(), and CWTable::updateCell().

int MWAWCellFormat::subformat ( ) const
inline

returns the subformat type

Referenced by MWAWContentListener::openTableCell().

VerticalAlignment MWAWCellFormat::vAlignement ( ) const
inline

returns the vertical alignement

Referenced by MWAWContentListener::openTableCell().

Friends And Related Function Documentation

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

operator<<

Member Data Documentation

MWAWColor MWAWCellFormat::m_backgroundColor
protected

the backgroung color

Referenced by backgroundColor(), compare(), operator<<(), and setBackgroundColor().

std::vector<MWAWBorder> MWAWCellFormat::m_bordersList
protected
int MWAWCellFormat::m_digits
protected

the number of digits

Referenced by compare(), digits(), operator<<(), and setDigits().

Format MWAWCellFormat::m_format
protected

the cell format : by default unknown

Referenced by compare(), format(), operator<<(), and setFormat().

HorizontalAlignment MWAWCellFormat::m_hAlign
protected

the cell alignement : by default nothing

Referenced by compare(), hAlignement(), operator<<(), and setHAlignement().

bool MWAWCellFormat::m_protected
protected

cell protected

Referenced by compare(), isProtected(), operator<<(), and setProtected().

int MWAWCellFormat::m_subFormat
protected

the sub format

Referenced by compare(), operator<<(), setFormat(), setSubformat(), and subformat().

VerticalAlignment MWAWCellFormat::m_vAlign
protected

the vertical cell alignement : by default nothing

Referenced by compare(), operator<<(), setVAlignement(), and vAlignement().


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

Generated on Tue Apr 30 2013 06:16:20 for libmwaw by doxygen 1.8.3.1