WPSCellFormat Class Reference

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

#include <WPSCell.h>

Inheritance diagram for WPSCellFormat:
LotusSpreadsheetInternal::Format123Style LotusSpreadsheetInternal::Style Quattro9SpreadsheetInternal::Style QuattroDosSpreadsheetInternal::Style QuattroSpreadsheetInternal::Style WKS4SpreadsheetInternal::Style WPSCell LotusSpreadsheetInternal::Cell Quattro9SpreadsheetInternal::Cell QuattroDosSpreadsheetInternal::Cell QuattroSpreadsheetInternal::Cell WKS4SpreadsheetInternal::Cell WPS8TableInternal::Cell XYWriteParserInternal::Cell libwps::MultiplanParserInternal::Cell

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  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...

Public Member Functions

 WPSCellFormat ()
 constructor
 WPSCellFormat (WPSCellFormat const &)=default
WPSCellFormatoperator= (WPSCellFormat const &)=default
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 hAlignment () const
 returns the horizontal alignement
void setHAlignment (HorizontalAlignment align)
 sets the horizontal alignement
VerticalAlignment vAlignment () const
 returns the vertical alignement
void setVAlignment (VerticalAlignment align)
 sets the vertical alignement
Wrapping wrapping () const
 returns the wrapping
void setWrapping (Wrapping align)
 sets the wrapping
int getTextRotation () const
 returns the text rotation angle
void setTextRotation (int rotation)
 sets the text rotation angle
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
Wrapping m_wrapping
 the wrapping : by default nothing
int m_rotation
 the text rotation
std::vector< WPSBorderm_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<<

Detailed Description

a structure used to defined the cell format

Member Enumeration Documentation

◆ FormatType

the different types of cell's field

Enumerator
F_TEXT 
F_BOOLEAN 
F_NUMBER 
F_DATE 
F_TIME 
F_UNKNOWN 

◆ HorizontalAlignment

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 

◆ VerticalAlignment

the default vertical alignement.

Enumerator
VALIGN_TOP 
VALIGN_CENTER 
VALIGN_BOTTOM 
VALIGN_DEFAULT 

◆ Wrapping

the wrapping

Enumerator
WRAP_WRAP 
WRAP_NO_WRAP 
WRAP_DEFAULT 

Constructor & Destructor Documentation

◆ WPSCellFormat() [1/2]

◆ WPSCellFormat() [2/2]

WPSCellFormat::WPSCellFormat ( WPSCellFormat const & )
default

◆ ~WPSCellFormat()

WPSCellFormat::~WPSCellFormat ( )
virtual

destructor

Member Function Documentation

◆ addTo()

void WPSCellFormat::addTo ( librevenge::RVNGPropertyList & propList) const

add to the propList

Referenced by WPSCell::addTo().

◆ backgroundColor()

WPSColor WPSCellFormat::backgroundColor ( ) const
inline

returns the background color

Referenced by addTo(), and QuattroDosSpreadsheet::readCell().

◆ borders()

std::vector< WPSBorder > const & WPSCellFormat::borders ( ) const
inline

return the cell border: libwps::LeftBit | ...

Referenced by QuattroDosSpreadsheet::readCell().

◆ compare()

◆ convertDTFormat()

bool WPSCellFormat::convertDTFormat ( std::string const & dtFormat,
librevenge::RVNGPropertyListVector & propListVector )
staticprotected

convert a DTFormat in a propertyList

Referenced by getNumberingProperties().

◆ digits()

int WPSCellFormat::digits ( ) const
inline

returns the number of digits ( for a number)

Referenced by LotusSpreadsheetInternal::Format123Style::update().

◆ getDTFormat()

std::string WPSCellFormat::getDTFormat ( ) const
inline

returns the date/time format ( if set)

Referenced by operator<<, and LotusSpreadsheetInternal::Format123Style::update().

◆ getFont()

◆ getFormat()

◆ getNumberingProperties()

bool WPSCellFormat::getNumberingProperties ( librevenge::RVNGPropertyList & propList) const

get the number style

Referenced by WKSContentListener::openSheetCell().

◆ getSubFormat()

int WPSCellFormat::getSubFormat ( ) const
inline

◆ getTextRotation()

int WPSCellFormat::getTextRotation ( ) const
inline

returns the text rotation angle

◆ getValueType()

std::string WPSCellFormat::getValueType ( ) const

returns a value type

Referenced by WKSContentListener::openSheetCell().

◆ hAlignment()

HorizontalAlignment WPSCellFormat::hAlignment ( ) const
inline

returns the horizontal alignement

◆ hasBasicFormat()

bool WPSCellFormat::hasBasicFormat ( ) const
inline

returns true if this is a basic format style

Referenced by WKSContentListener::openSheetCell().

◆ hasBorders()

bool WPSCellFormat::hasBorders ( ) const
inline

return true if the cell has some border

Referenced by QuattroDosSpreadsheet::readCell().

◆ isProtected()

bool WPSCellFormat::isProtected ( ) const
inline

returns true if the cell is protected

◆ operator=()

WPSCellFormat & WPSCellFormat::operator= ( WPSCellFormat const & )
default

◆ resetBorders()

void WPSCellFormat::resetBorders ( )
inline

reset the border

◆ setBackgroundColor()

◆ setBorders() [1/2]

◆ setBorders() [2/2]

void WPSCellFormat::setBorders ( std::vector< WPSBorder > const & newBorders)
inline

sets the cell borders

◆ setDigits()

◆ setDTFormat()

◆ setFont()

◆ setFormat()

◆ setHAlignment()

◆ setProtected()

void WPSCellFormat::setProtected ( bool fl)
inline

returns true if the cell is protected

Referenced by libwps::MultiplanParser::sendCell().

◆ setTextRotation()

void WPSCellFormat::setTextRotation ( int rotation)
inline

sets the text rotation angle

Referenced by QuattroSpreadsheet::readCellStyle(), and LotusStyleManager::updateCellStyle().

◆ setVAlignment()

void WPSCellFormat::setVAlignment ( VerticalAlignment align)
inline

◆ setWrapping()

void WPSCellFormat::setWrapping ( Wrapping align)
inline

◆ vAlignment()

VerticalAlignment WPSCellFormat::vAlignment ( ) const
inline

returns the vertical alignement

Referenced by addTo().

◆ wrapping()

Wrapping WPSCellFormat::wrapping ( ) const
inline

returns the wrapping

Referenced by addTo().

◆ operator<<

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

operator<<

Member Data Documentation

◆ m_backgroundColor

WPSColor WPSCellFormat::m_backgroundColor
protected

the backgroung color

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

◆ m_bordersList

std::vector<WPSBorder> WPSCellFormat::m_bordersList
protected

◆ m_digits

int WPSCellFormat::m_digits
protected

◆ m_DTFormat

std::string WPSCellFormat::m_DTFormat
protected

a date/time format ( using a subset of strftime format )

Referenced by compare(), getDTFormat(), getNumberingProperties(), setDTFormat(), and WPSCellFormat().

◆ m_font

◆ m_format

◆ m_hAlign

HorizontalAlignment WPSCellFormat::m_hAlign
protected

the cell alignement : by default nothing

Referenced by addTo(), compare(), hAlignment(), operator<<, setHAlignment(), and WPSCellFormat().

◆ m_protected

bool WPSCellFormat::m_protected
protected

◆ m_rotation

int WPSCellFormat::m_rotation
protected

◆ m_subFormat

◆ m_vAlign

VerticalAlignment WPSCellFormat::m_vAlign
protected

the cell vertical alignement : by default nothing

Referenced by compare(), operator<<, setVAlignment(), vAlignment(), and WPSCellFormat().

◆ m_wrapping

Wrapping WPSCellFormat::m_wrapping
protected

the wrapping : by default nothing

Referenced by compare(), operator<<, setWrapping(), WPSCellFormat(), and wrapping().


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

Generated on Sat Jul 19 2025 05:24:40 for libwps by doxygen 1.14.0