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 | |
virtual | ~WPSCellFormat () |
destructor | |
bool | hasBasicFormat () const |
returns true if this is a basic format style | |
std::string | getValueType () const |
returns a value type | |
void | addTo (librevenge::RVNGPropertyList &propList) const |
add to the propList | |
bool | getNumberingProperties (librevenge::RVNGPropertyList &propList) const |
get the number style | |
WPSFont const & | getFont () const |
returns the font | |
void | setFont (WPSFont const &font) |
sets the font | |
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 | |
FormatType | getFormat () const |
returns the format type | |
int | getSubFormat () const |
returns the subformat type | |
std::string | getDTFormat () const |
returns the date/time format ( if set) | |
void | setFormat (FormatType form, int subForm=0) |
sets the format type | |
void | setDTFormat (FormatType form, std::string const &dtFormat="") |
sets the format type | |
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 | |
bool | hasBorders () const |
return true if the cell has some border | |
std::vector< WPSBorder > const & | borders () const |
return the cell border: libwps::LeftBit | ... | |
void | resetBorders () |
reset the border | |
void | setBorders (int wh, WPSBorder const &border) |
sets the cell border: wh=WPSBorder::LeftBit|... | |
void | setBorders (std::vector< WPSBorder > const &newBorders) |
sets the cell borders | |
WPSColor | backgroundColor () const |
returns the background color | |
void | setBackgroundColor (WPSColor const &color) |
set the background color | |
int | compare (WPSCellFormat const &cell, bool onlyNumbering=false) const |
a comparison function | |
Static Protected Member Functions | |
static bool | convertDTFormat (std::string const &dtFormat, librevenge::RVNGPropertyListVector &propListVector) |
convert a DTFormat in a propertyList | |
Protected Attributes | |
WPSFont | m_font |
the cell font ( used in spreadsheet code ) | |
HorizontalAlignment | m_hAlign |
the cell alignement : by default nothing | |
VerticalAlignment | m_vAlign |
the cell vertical alignement : by default nothing | |
std::vector< WPSBorder > | m_bordersList |
the cell border WPSBorder::Pos | |
FormatType | m_format |
the cell format : by default unknown | |
int | m_subFormat |
the sub format | |
std::string | m_DTFormat |
a date/time format ( using a subset of strftime format ) | |
int | m_digits |
the number of digits | |
bool | m_protected |
cell protected | |
WPSColor | m_backgroundColor |
the backgroung color | |
Friends | |
std::ostream & | operator<< (std::ostream &o, WPSCellFormat const &cell) |
operator<< |
a structure used to defined the cell format
WPSCellFormat::WPSCellFormat | ( | ) | [inline] |
constructor
virtual WPSCellFormat::~WPSCellFormat | ( | ) | [inline, virtual] |
destructor
void WPSCellFormat::addTo | ( | librevenge::RVNGPropertyList & | propList | ) | const |
add to the propList
Reimplemented in WPSCell.
WPSColor WPSCellFormat::backgroundColor | ( | ) | const [inline] |
returns the background color
Referenced by addTo(), and LotusSpreadsheetInternal::Style::isVisible().
std::vector<WPSBorder> const& WPSCellFormat::borders | ( | ) | const [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()(), QuattroSpreadsheetInternal::Style::operator==(), WKS4SpreadsheetInternal::Style::operator==(), and LotusSpreadsheetInternal::Style::operator==().
bool WPSCellFormat::convertDTFormat | ( | std::string const & | dtFormat, |
librevenge::RVNGPropertyListVector & | propListVector | ||
) | [static, protected] |
convert a DTFormat in a propertyList
Referenced by getNumberingProperties().
int WPSCellFormat::digits | ( | ) | const [inline] |
returns the number of digits ( for a number)
std::string WPSCellFormat::getDTFormat | ( | ) | const [inline] |
returns the date/time format ( if set)
Referenced by operator<<().
WPSFont const& WPSCellFormat::getFont | ( | ) | const [inline] |
returns the font
Referenced by WKSContentListener::openSheetCell(), QuattroSpreadsheet::sendCellContent(), and LotusSpreadsheet::sendCellContent().
FormatType WPSCellFormat::getFormat | ( | ) | const [inline] |
returns the format type
Referenced by WKSContentListener::openSheetCell().
bool WPSCellFormat::getNumberingProperties | ( | librevenge::RVNGPropertyList & | propList | ) | const |
get the number style
Referenced by WKSContentListener::openSheetCell().
int WPSCellFormat::getSubFormat | ( | ) | const [inline] |
returns the subformat type
std::string WPSCellFormat::getValueType | ( | ) | const |
returns a value type
Referenced by WKSContentListener::openSheetCell().
HorizontalAlignment WPSCellFormat::hAlignement | ( | ) | const [inline] |
returns the horizontal alignement
bool WPSCellFormat::hasBasicFormat | ( | ) | const [inline] |
returns true if this is a basic format style
Referenced by WKSContentListener::openSheetCell().
bool WPSCellFormat::hasBorders | ( | ) | const [inline] |
return true if the cell has some border
Referenced by LotusSpreadsheetInternal::Style::isVisible().
bool WPSCellFormat::isProtected | ( | ) | const [inline] |
returns true if the cell is protected
void WPSCellFormat::resetBorders | ( | ) | [inline] |
reset the border
void WPSCellFormat::setBackgroundColor | ( | WPSColor const & | color | ) | [inline] |
set the background color
Referenced by QuattroSpreadsheet::readCell(), QuattroSpreadsheet::readCellProperty(), and LotusStyleManager::updateCellStyle().
void WPSCellFormat::setBorders | ( | int | wh, |
WPSBorder const & | border | ||
) |
sets the cell border: wh=WPSBorder::LeftBit|...
Referenced by QuattroSpreadsheet::readCell(), QuattroSpreadsheet::readCellProperty(), and LotusStyleManager::updateCellStyle().
void WPSCellFormat::setBorders | ( | std::vector< WPSBorder > const & | newBorders | ) | [inline] |
sets the cell borders
void WPSCellFormat::setDigits | ( | int | newDigit | ) | [inline] |
set the number of digits ( for a number)
Referenced by LotusSpreadsheet::readRowFormat(), and QuattroSpreadsheetInternal::Cell::updateFormat().
void WPSCellFormat::setDTFormat | ( | FormatType | form, |
std::string const & | dtFormat = "" |
||
) | [inline] |
sets the format type
Referenced by LotusSpreadsheet::readRowFormat(), and QuattroSpreadsheetInternal::Cell::updateFormat().
void WPSCellFormat::setFont | ( | WPSFont const & | font | ) | [inline] |
void WPSCellFormat::setFormat | ( | FormatType | form, |
int | subForm = 0 |
||
) | [inline] |
sets the format type
Referenced by QuattroSpreadsheet::readCell(), LotusSpreadsheet::readRowFormat(), and QuattroSpreadsheetInternal::Cell::updateFormat().
void WPSCellFormat::setHAlignement | ( | HorizontalAlignment | align | ) | [inline] |
sets the horizontal alignement
Referenced by QuattroSpreadsheet::readCell(), QuattroSpreadsheet::readCellProperty(), LotusSpreadsheet::readRowFormat(), and LotusSpreadsheet::sendCellContent().
void WPSCellFormat::setProtected | ( | bool | fl | ) | [inline] |
returns true if the cell is protected
void WPSCellFormat::setVAlignement | ( | VerticalAlignment | align | ) | [inline] |
sets the vertical alignement
VerticalAlignment WPSCellFormat::vAlignement | ( | ) | const [inline] |
returns the vertical alignement
Referenced by addTo().
std::ostream& operator<< | ( | std::ostream & | o, |
WPSCellFormat const & | cell | ||
) | [friend] |
operator<<
WPSColor WPSCellFormat::m_backgroundColor [protected] |
the backgroung color
Referenced by backgroundColor(), compare(), operator<<(), and setBackgroundColor().
std::vector<WPSBorder> WPSCellFormat::m_bordersList [protected] |
the cell border WPSBorder::Pos
Referenced by addTo(), borders(), WPS8TableInternal::Cell::Cell(), compare(), hasBorders(), operator<<(), resetBorders(), and setBorders().
int WPSCellFormat::m_digits [protected] |
the number of digits
Referenced by compare(), digits(), getNumberingProperties(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), and setDigits().
std::string WPSCellFormat::m_DTFormat [protected] |
a date/time format ( using a subset of strftime format )
Referenced by compare(), getDTFormat(), getNumberingProperties(), and setDTFormat().
WPSFont WPSCellFormat::m_font [protected] |
the cell font ( used in spreadsheet code )
Reimplemented in WKS4SpreadsheetInternal::Style.
Referenced by getFont(), operator<<(), setFont(), LotusSpreadsheetInternal::Style::Style(), and QuattroSpreadsheetInternal::Cell::updateFormat().
FormatType WPSCellFormat::m_format [protected] |
the cell format : by default unknown
Referenced by compare(), getFormat(), getNumberingProperties(), getValueType(), hasBasicFormat(), LotusSpreadsheetInternal::Style::isVisible(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), setDTFormat(), and setFormat().
HorizontalAlignment WPSCellFormat::m_hAlign [protected] |
the cell alignement : by default nothing
Reimplemented in WKS4SpreadsheetInternal::Cell, and LotusSpreadsheetInternal::Cell.
Referenced by addTo(), compare(), hAlignement(), operator<<(), and setHAlignement().
bool WPSCellFormat::m_protected [protected] |
cell protected
Referenced by addTo(), compare(), isProtected(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), and setProtected().
int WPSCellFormat::m_subFormat [protected] |
the sub format
Referenced by compare(), getNumberingProperties(), getSubFormat(), getValueType(), operator<<(), WKS4SpreadsheetInternal::Style::operator==(), setDTFormat(), and setFormat().
VerticalAlignment WPSCellFormat::m_vAlign [protected] |
the cell vertical alignement : by default nothing
Referenced by compare(), operator<<(), setVAlignement(), and vAlignement().