WPSCellFormat Class Reference

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

`#include <WPSCell.h>`

Inheritance diagram for WPSCellFormat:

## Public Types

enum | HorizontalAlignment { HALIGN_LEFT, HALIGN_RIGHT, HALIGN_CENTER, HALIGN_FULL, HALIGN_DEFAULT }
| the default horizontal alignement. More...

## Public Member Functions

| WPSCellFormat ()
| constructor More...
virtual | ~WPSCellFormat ()
HorizontalAlignment | hAlignement () const
| returns the horizontal alignement More...
void | setHAlignement (HorizontalAlignment align)
| sets the horizontal alignement 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) const
| a comparison function More...

## Protected Attributes

HorizontalAlignment | m_hAlign
| the cell alignement : by default nothing More...
std::vector< WPSBorder > | m_bordersList
| the cell border WPSBorder::Pos More...
uint32_t | m_backgroundColor
| the backgroung color More...

## Friends

std::ostream & | operator<< (std::ostream &o, WPSCellFormat const &cell)
| operator<< More...

## Detailed Description

a structure used to defined the cell format

## Member Enumeration Documentation

enum WPSCellFormat::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 |

## Constructor & Destructor Documentation

WPSCellFormat::WPSCellFormat | ( |  | ) |

inline

constructor

virtual WPSCellFormat::~WPSCellFormat | ( |  | ) |

inline virtual

## Member Function Documentation

uint32_t WPSCellFormat::backgroundColor | ( |  | ) | const

inline

returns the background color

Referenced by WPSContentListener::openTableCell().

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

inline

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

Referenced by WPSContentListener::openTableCell().

int WPSCellFormat::compare | ( | WPSCellFormat const & | cell | ) | const

a comparison function

HorizontalAlignment WPSCellFormat::hAlignement | ( |  | ) | const

inline

returns the horizontal alignement

bool WPSCellFormat::hasBorders | ( |  | ) | const

inline

return true if the cell has some border

void WPSCellFormat::resetBorders | ( |  | ) |

inline

reset the border

void WPSCellFormat::setBackgroundColor | ( | uint32_t | color | ) |

inline

set the background color

void WPSCellFormat::setBorders | ( | int | wh,
|  | WPSBorder const & | border
| ) |  |

sets the cell border: wh=WPSBorder::LeftBit|...

void WPSCellFormat::setHAlignement | ( | HorizontalAlignment | align | ) |

inline

sets the horizontal alignement

## Friends And Related Function Documentation

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

friend

operator<<

## Member Data Documentation

uint32_t 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 borders(), WPS8TableInternal::Cell::Cell(), compare(), hasBorders(), operator<<(), resetBorders(), and setBorders().

HorizontalAlignment WPSCellFormat::m_hAlign

protected

the cell alignement : by default nothing

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

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

- WPSCell.h
- WPSCell.cpp