libepubgen::EPUBTableStyleManager Class Reference

Small class to manage the tables style. More...

#include <EPUBTableStyleManager.h>

Public Member Functions

 EPUBTableStyleManager ()
 constructor More...
 
 ~EPUBTableStyleManager ()
 destructor More...
 
void openTable (librevenge::RVNGPropertyList const &propList)
 open a table More...
 
void closeTable ()
 close a table More...
 
std::string getCellClass (librevenge::RVNGPropertyList const &pList)
 returns the class name corresponding to a propertylist More...
 
std::string getCellStyle (librevenge::RVNGPropertyList const &pList)
 returns the style string corresponding to a propertylist More...
 
std::string getRowClass (librevenge::RVNGPropertyList const &pList)
 returns the class name corresponding to a propertylist More...
 
std::string getRowStyle (librevenge::RVNGPropertyList const &pList)
 returns the style string corresponding to a propertylist More...
 
std::string getTableClass (librevenge::RVNGPropertyList const &pList)
 returns the class name corresponding to a propertylist More...
 
std::string getTableStyle (librevenge::RVNGPropertyList const &pList)
 returns the style string corresponding to a propertylist More...
 
void send (EPUBCSSSink &out)
 send the data to the sink More...
 

Private Types

typedef std::unordered_map< EPUBCSSProperties, std::string, boost::hash< EPUBCSSProperties > > ContentNameMap_t
 

Private Member Functions

void extractCellProperties (librevenge::RVNGPropertyList const &pList, EPUBCSSProperties &cssProps) const
 convert a property list into a CSS property map More...
 
void extractRowProperties (librevenge::RVNGPropertyList const &pList, EPUBCSSProperties &cssProps) const
 convert a property list into a CSS property map More...
 
void extractTableProperties (librevenge::RVNGPropertyList const &pList, EPUBCSSProperties &cssProps) const
 convert a property list into a CSS property map More...
 
bool getColumnsWidth (int i, int numSpanned, double &w) const
 try to return the col width More...
 
bool getRelColumnsWidth (int i, int numSpanned, double &w) const
 try to return the relative col width More...
 
 EPUBTableStyleManager (EPUBTableStyleManager const &orig)
 
EPUBTableStyleManager operator= (EPUBTableStyleManager const &orig)
 

Private Attributes

ContentNameMap_t m_cellContentNameMap
 a map cell content -> name More...
 
ContentNameMap_t m_rowContentNameMap
 a map row content -> name More...
 
ContentNameMap_t m_tableContentNameMap
 a map table content -> name More...
 
std::vector< std::vector< double > > m_columnWidthsStack
 a stack of column width (in inches ) More...
 
std::vector< std::vector< double > > m_relColumnWidthsStack
 a stack of relative column width (in percents ) More...
 

Detailed Description

Small class to manage the tables style.

Member Typedef Documentation

§ ContentNameMap_t

typedef std::unordered_map<EPUBCSSProperties, std::string, boost::hash<EPUBCSSProperties> > libepubgen::EPUBTableStyleManager::ContentNameMap_t
private

Constructor & Destructor Documentation

§ EPUBTableStyleManager() [1/2]

libepubgen::EPUBTableStyleManager::EPUBTableStyleManager ( )
inline

constructor

§ ~EPUBTableStyleManager()

libepubgen::EPUBTableStyleManager::~EPUBTableStyleManager ( )
inline

destructor

§ EPUBTableStyleManager() [2/2]

libepubgen::EPUBTableStyleManager::EPUBTableStyleManager ( EPUBTableStyleManager const &  orig)
private

Member Function Documentation

§ closeTable()

void libepubgen::EPUBTableStyleManager::closeTable ( )

close a table

Referenced by ~EPUBTableStyleManager().

§ extractCellProperties()

void libepubgen::EPUBTableStyleManager::extractCellProperties ( librevenge::RVNGPropertyList const &  pList,
EPUBCSSProperties cssProps 
) const
private

convert a property list into a CSS property map

Referenced by getCellClass(), getCellStyle(), and ~EPUBTableStyleManager().

§ extractRowProperties()

void libepubgen::EPUBTableStyleManager::extractRowProperties ( librevenge::RVNGPropertyList const &  pList,
EPUBCSSProperties cssProps 
) const
private

convert a property list into a CSS property map

Referenced by getRowClass(), getRowStyle(), and ~EPUBTableStyleManager().

§ extractTableProperties()

void libepubgen::EPUBTableStyleManager::extractTableProperties ( librevenge::RVNGPropertyList const &  pList,
EPUBCSSProperties cssProps 
) const
private

convert a property list into a CSS property map

Referenced by getTableClass(), getTableStyle(), and ~EPUBTableStyleManager().

§ getCellClass()

std::string libepubgen::EPUBTableStyleManager::getCellClass ( librevenge::RVNGPropertyList const &  pList)

returns the class name corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ getCellStyle()

std::string libepubgen::EPUBTableStyleManager::getCellStyle ( librevenge::RVNGPropertyList const &  pList)

returns the style string corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ getColumnsWidth()

bool libepubgen::EPUBTableStyleManager::getColumnsWidth ( int  i,
int  numSpanned,
double &  w 
) const
private

try to return the col width

Referenced by extractCellProperties(), and ~EPUBTableStyleManager().

§ getRelColumnsWidth()

bool libepubgen::EPUBTableStyleManager::getRelColumnsWidth ( int  i,
int  numSpanned,
double &  w 
) const
private

try to return the relative col width

Referenced by extractCellProperties(), and ~EPUBTableStyleManager().

§ getRowClass()

std::string libepubgen::EPUBTableStyleManager::getRowClass ( librevenge::RVNGPropertyList const &  pList)

returns the class name corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ getRowStyle()

std::string libepubgen::EPUBTableStyleManager::getRowStyle ( librevenge::RVNGPropertyList const &  pList)

returns the style string corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ getTableClass()

std::string libepubgen::EPUBTableStyleManager::getTableClass ( librevenge::RVNGPropertyList const &  pList)

returns the class name corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ getTableStyle()

std::string libepubgen::EPUBTableStyleManager::getTableStyle ( librevenge::RVNGPropertyList const &  pList)

returns the style string corresponding to a propertylist

Referenced by ~EPUBTableStyleManager().

§ openTable()

void libepubgen::EPUBTableStyleManager::openTable ( librevenge::RVNGPropertyList const &  propList)

open a table

Referenced by ~EPUBTableStyleManager().

§ operator=()

EPUBTableStyleManager libepubgen::EPUBTableStyleManager::operator= ( EPUBTableStyleManager const &  orig)
private

§ send()

void libepubgen::EPUBTableStyleManager::send ( EPUBCSSSink out)

send the data to the sink

Referenced by libepubgen::EPUBGenerator::writeStylesheet(), and ~EPUBTableStyleManager().

Member Data Documentation

§ m_cellContentNameMap

ContentNameMap_t libepubgen::EPUBTableStyleManager::m_cellContentNameMap
private

a map cell content -> name

Referenced by getCellClass(), and send().

§ m_columnWidthsStack

std::vector<std::vector<double> > libepubgen::EPUBTableStyleManager::m_columnWidthsStack
private

a stack of column width (in inches )

Referenced by closeTable(), getColumnsWidth(), and openTable().

§ m_relColumnWidthsStack

std::vector<std::vector<double> > libepubgen::EPUBTableStyleManager::m_relColumnWidthsStack
private

a stack of relative column width (in percents )

Referenced by getRelColumnsWidth(), and openTable().

§ m_rowContentNameMap

ContentNameMap_t libepubgen::EPUBTableStyleManager::m_rowContentNameMap
private

a map row content -> name

Referenced by getRowClass(), and send().

§ m_tableContentNameMap

ContentNameMap_t libepubgen::EPUBTableStyleManager::m_tableContentNameMap
private

a map table content -> name

Referenced by getTableClass(), and send().


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

Generated for libepubgen by doxygen 1.8.12