a structure used to defined the cell format More...
#include <WPSCell.h>
Classes | |
struct | CompareFormat |
a comparaison structure used to store data More... | |
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 | FormatType { F_TEXT, F_BOOLEAN, F_NUMBER, F_DATE, F_TIME, F_UNKNOWN } |
the different types of cell's field More... | |
Public Member Functions | |
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... | |
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... | |
uint32_t | backgroundColor () const |
returns the background color More... | |
void | setBackgroundColor (uint32_t color) |
set the background color More... | |
int | compare (WPSCellFormat const &cell, bool onlyNumbering=false) const |
a comparison function More... | |
Static Protected Member Functions | |
static bool | convertDTFormat (std::string const &dtFormat, librevenge::RVNGPropertyListVector &propListVector) |
convert a DTFormat in a propertyList More... | |
Protected Attributes | |
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... | |
std::vector< WPSBorder > | m_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... | |
uint32_t | m_backgroundColor |
the backgroung color More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, WPSCellFormat const &cell) |
operator<< More... | |
a structure used to defined the cell format
|
inline |
constructor
|
inlinevirtual |
destructor
void WPSCellFormat::addTo | ( | librevenge::RVNGPropertyList & | propList | ) | const |
add to the propList
Referenced by WPSCell::addTo().
|
inline |
returns the background color
Referenced by addTo().
|
inline |
return the cell border: libwps::LeftBit | ...
int WPSCellFormat::compare | ( | WPSCellFormat const & | cell, |
bool | onlyNumbering = false |
||
) | const |
a comparison function
Referenced by WPSCellFormat::CompareFormat::operator()(), and WKS4SpreadsheetInternal::Style::operator==().
|
staticprotected |
convert a DTFormat in a propertyList
Referenced by getNumberingProperties().
|
inline |
returns the number of digits ( for a number)
|
inline |
returns the date/time format ( if set)
Referenced by operator<<().
|
inline |
returns the font
Referenced by WKSContentListener::openSheetCell().
|
inline |
returns the format type
Referenced by WKSContentListener::openSheetCell(), WKS4Spreadsheet::readDOSCellExtraProperty(), WKS4Spreadsheet::readDOSCellProperty(), and WKS4Spreadsheet::readStyle().
bool WPSCellFormat::getNumberingProperties | ( | librevenge::RVNGPropertyList & | propList | ) | const |
get the number style
Referenced by WKSContentListener::openSheetCell().
|
inline |
returns the subformat type
Referenced by WKS4Spreadsheet::readDOSCellProperty().
std::string WPSCellFormat::getValueType | ( | ) | const |
returns a value type
Referenced by WKSContentListener::openSheetCell().
|
inline |
returns the horizontal alignement
|
inline |
returns true if this is a basic format style
Referenced by WKSContentListener::openSheetCell().
|
inline |
return true if the cell has some border
|
inline |
returns true if the cell is protected
|
inline |
reset the border
|
inline |
set the background color
Referenced by WKS4Spreadsheet::readStyle().
void WPSCellFormat::setBorders | ( | int | wh, |
WPSBorder const & | border | ||
) |
sets the cell border: wh=WPSBorder::LeftBit|...
Referenced by WKS4Spreadsheet::readStyle().
|
inline |
set the number of digits ( for a number)
Referenced by WKS4Spreadsheet::readCell(), WKS4Spreadsheet::readDOSCellExtraProperty(), and WKS4Spreadsheet::readStyle().
|
inline |
sets the format type
Referenced by WKS4Spreadsheet::readDOSCellProperty(), and WKS4Spreadsheet::readStyle().
|
inline |
sets the font
Referenced by WKS4Spreadsheet::sendCellContent().
|
inline |
sets the format type
Referenced by WKS4Spreadsheet::readCell(), WKS4Spreadsheet::readDOSCellExtraProperty(), WKS4Spreadsheet::readDOSCellProperty(), and WKS4Spreadsheet::readStyle().
|
inline |
sets the horizontal alignement
Referenced by WKS4Spreadsheet::readDOSCellProperty(), WKS4Spreadsheet::readDOSFieldProperty(), WKS4Spreadsheet::readStyle(), and WKS4Spreadsheet::sendCellContent().
|
inline |
returns true if the cell is protected
|
inline |
sets the vertical alignement
Referenced by WKS4Spreadsheet::readStyle().
|
inline |
returns the vertical alignement
Referenced by addTo().
|
friend |
operator<<
|
protected |
the backgroung color
Referenced by backgroundColor(), compare(), operator<<(), and setBackgroundColor().
|
protected |
the cell border WPSBorder::Pos
Referenced by addTo(), borders(), WPS8TableInternal::Cell::Cell(), compare(), hasBorders(), operator<<(), resetBorders(), and setBorders().
|
protected |
the number of digits
Referenced by compare(), digits(), getNumberingProperties(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), and setDigits().
|
protected |
a date/time format ( using a subset of strftime format )
Referenced by compare(), getDTFormat(), getNumberingProperties(), and setDTFormat().
|
protected |
the cell font ( used in spreadsheet code )
Referenced by getFont(), operator<<(), and setFont().
|
protected |
the cell format : by default unknown
Referenced by compare(), getFormat(), getNumberingProperties(), getValueType(), hasBasicFormat(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), setDTFormat(), and setFormat().
|
protected |
the cell alignement : by default nothing
Referenced by addTo(), compare(), hAlignement(), operator<<(), and setHAlignement().
|
protected |
cell protected
Referenced by addTo(), compare(), isProtected(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), and setProtected().
|
protected |
the sub format
Referenced by compare(), getNumberingProperties(), getSubFormat(), getValueType(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), setDTFormat(), and setFormat().
|
protected |
the cell vertical alignement : by default nothing
Referenced by compare(), operator<<(), setVAlignement(), and vAlignement().