WPSCell Class Referenceabstract

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

#include <WPSCell.h>

Inheritance diagram for WPSCell:
WPSCellFormat LotusSpreadsheetInternal::Cell QuattroSpreadsheetInternal::Cell WKS4SpreadsheetInternal::Cell WPS8TableInternal::Cell

Classes

struct  Compare
 a comparaison structure used retrieve the rows and the columns More...
 

Public Member Functions

 WPSCell ()
 constructor More...
 
virtual ~WPSCell ()
 destructor More...
 
void addTo (librevenge::RVNGPropertyList &propList) const
 add to the propList More...
 
void setBox (WPSBox2f const &b)
 set the bounding box (units in point) More...
 
WPSBox2f const & box () const
 return the bounding box More...
 
bool isVerticalSet () const
 returns true if the vertical is fixed More...
 
void setVerticalSet (bool verticalSet)
 fixes or not the vertical size 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...
 
virtual bool send (WPSListenerPtr &listener)=0
 call when a cell must be send More...
 
virtual bool sendContent (WPSListenerPtr &listener)=0
 call when the content of a cell must be send More...
 
- Public Member Functions inherited from WPSCellFormat
 WPSCellFormat ()
 constructor More...
 
virtual ~WPSCellFormat ()
 destructor More...
 
bool hasBasicFormat () const
 returns true if this is a basic format style More...
 
std::string getValueType () const
 returns a value type More...
 
void addTo (librevenge::RVNGPropertyList &propList) const
 add to the propList More...
 
bool getNumberingProperties (librevenge::RVNGPropertyList &propList) const
 get the number style More...
 
WPSFont const & getFont () const
 returns the font More...
 
void setFont (WPSFont const &font)
 sets the font 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...
 
Wrapping wrapping () const
 returns the wrapping More...
 
void setWrapping (Wrapping align)
 sets the wrapping More...
 
int getTextRotation () const
 returns the text rotation angle More...
 
void setTextRotation (int rotation)
 sets the text rotation angle More...
 
FormatType getFormat () const
 returns the format type More...
 
int getSubFormat () const
 returns the subformat type More...
 
std::string getDTFormat () const
 returns the date/time format ( if set) More...
 
void setFormat (FormatType form, int subForm=0)
 sets the format type More...
 
void setDTFormat (FormatType form, std::string const &dtFormat="")
 sets the format type 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...
 
bool hasBorders () const
 return true if the cell has some border More...
 
std::vector< WPSBorder > const & borders () const
 return the cell border: libwps::LeftBit | ... More...
 
void resetBorders ()
 reset the border More...
 
void setBorders (int wh, WPSBorder const &border)
 sets the cell border: wh=WPSBorder::LeftBit|... More...
 
void setBorders (std::vector< WPSBorder > const &newBorders)
 sets the cell borders More...
 
WPSColor backgroundColor () const
 returns the background color More...
 
void setBackgroundColor (WPSColor const &color)
 set the background color More...
 
int compare (WPSCellFormat const &cell, bool onlyNumbering=false) const
 a comparison function More...
 

Protected Attributes

WPSBox2f m_box
 the cell bounding box (unit in point) More...
 
bool m_verticalSet
 true if y size is fixed More...
 
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 WPSCellFormat
WPSFont m_font
 the cell font ( used in spreadsheet code ) More...
 
HorizontalAlignment m_hAlign
 the cell alignement : by default nothing More...
 
VerticalAlignment m_vAlign
 the cell vertical alignement : by default nothing More...
 
Wrapping m_wrapping
 the wrapping : by default nothing More...
 
int m_rotation
 the text rotation More...
 
std::vector< WPSBorderm_bordersList
 the cell border WPSBorder::Pos More...
 
FormatType m_format
 the cell format : by default unknown More...
 
int m_subFormat
 the sub format More...
 
std::string m_DTFormat
 a date/time format ( using a subset of strftime format ) More...
 
int m_digits
 the number of digits More...
 
bool m_protected
 cell protected More...
 
WPSColor m_backgroundColor
 the backgroung color More...
 

Friends

class WPSTable
 
std::ostream & operator<< (std::ostream &o, WPSCell const &cell)
 operator<< More...
 

Additional Inherited Members

- Public Types inherited from WPSCellFormat
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  Wrapping { WRAP_WRAP, WRAP_NO_WRAP, WRAP_DEFAULT }
 the wrapping More...
 
enum  FormatType {
  F_TEXT, F_BOOLEAN, F_NUMBER, F_DATE,
  F_TIME, F_UNKNOWN
}
 the different types of cell's field More...
 
- Static Protected Member Functions inherited from WPSCellFormat
static bool convertDTFormat (std::string const &dtFormat, librevenge::RVNGPropertyListVector &propListVector)
 convert a DTFormat in a propertyList More...
 

Detailed Description

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

Constructor & Destructor Documentation

WPSCell::WPSCell ( )
inline

constructor

virtual WPSCell::~WPSCell ( )
inlinevirtual

destructor

Member Function Documentation

void WPSCell::addTo ( librevenge::RVNGPropertyList &  propList) const
WPSBox2f const& WPSCell::box ( ) const
inline
bool WPSCell::isVerticalSet ( ) const
inline

returns true if the vertical is fixed

Vec2i const& WPSCell::numSpannedCells ( ) const
inline

returns the number of spanned cells

Referenced by addTo(), and operator<<().

Vec2i& WPSCell::position ( )
inline

position accessor

Referenced by addTo(), QuattroSpreadsheet::readCell(), and WKS4Spreadsheet::readCell().

Vec2i const& WPSCell::position ( ) const
inline

position accessor

virtual bool WPSCell::send ( WPSListenerPtr listener)
pure virtual
virtual bool WPSCell::sendContent ( WPSListenerPtr listener)
pure virtual
void WPSCell::setBox ( WPSBox2f const &  b)
inline

set the bounding box (units in point)

void WPSCell::setNumSpannedCells ( Vec2i  numSpanned)
inline

sets the number of spanned cells : Vec2i(1,1) means 1 cellule

Referenced by LotusSpreadsheet::sendRowContent().

void WPSCell::setVerticalSet ( bool  verticalSet)
inline

fixes or not the vertical size

Friends And Related Function Documentation

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

operator<<

friend class WPSTable
friend

Member Data Documentation

WPSBox2f WPSCell::m_box
protected

the cell bounding box (unit in point)

Referenced by box(), operator<<(), and setBox().

Vec2i WPSCell::m_numberCellSpanned
protected

the cell spanned : by default (1,1)

Referenced by numSpannedCells(), and setNumSpannedCells().

Vec2i WPSCell::m_position
protected

the cell row and column : 0,0 -> A1, 0,1 -> A2

Referenced by operator<<(), position(), and setPosition().

bool WPSCell::m_verticalSet
protected

true if y size is fixed

Referenced by isVerticalSet(), WPSCell::Compare::operator()(), operator<<(), and setVerticalSet().


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

Generated on Wed Apr 11 2018 00:19:13 for libwps by doxygen 1.8.5