LibreOffice Module sc (master)  1
Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
ScHTMLStyles Class Reference

Collection of HTML style data parsed from the content of <style> elements. More...

#include <htmlpars.hxx>

Public Member Functions

 ScHTMLStyles ()
 just a persistent empty string. More...
 
void add (const char *pElemName, size_t nElemName, const char *pClassName, size_t nClassName, const OUString &aProp, const OUString &aValue)
 
const OUString & getPropertyValue (const OUString &rElem, const OUString &rClass, const OUString &rPropName) const
 Find best-matching property value for given element and class names. More...
 

Private Types

typedef std::unordered_map< OUString, OUString > PropsType
 
typedef ::std::map< OUString, std::unique_ptr< PropsType > > NamePropsType
 
typedef ::std::map< OUString, std::unique_ptr< NamePropsType > > ElemsType
 

Static Private Member Functions

static void insertProp (NamePropsType &rProps, const OUString &aName, const OUString &aProp, const OUString &aValue)
 

Private Attributes

NamePropsType m_GlobalProps
 
NamePropsType m_ElemGlobalProps
 global properties (for a given class for all elements) More...
 
ElemsType m_ElemProps
 element global properties (no class specified) More...
 
const OUString maEmpty
 element to class to properties (both element and class are given) More...
 

Detailed Description

Collection of HTML style data parsed from the content of <style> elements.

Definition at line 47 of file htmlpars.hxx.

Member Typedef Documentation

typedef ::std::map<OUString, std::unique_ptr<NamePropsType> > ScHTMLStyles::ElemsType
private

Definition at line 51 of file htmlpars.hxx.

typedef ::std::map<OUString, std::unique_ptr<PropsType> > ScHTMLStyles::NamePropsType
private

Definition at line 50 of file htmlpars.hxx.

typedef std::unordered_map<OUString, OUString> ScHTMLStyles::PropsType
private

Definition at line 49 of file htmlpars.hxx.

Constructor & Destructor Documentation

ScHTMLStyles::ScHTMLStyles ( )

just a persistent empty string.

Definition at line 70 of file htmlpars.cxx.

Member Function Documentation

void ScHTMLStyles::add ( const char *  pElemName,
size_t  nElemName,
const char *  pClassName,
size_t  nClassName,
const OUString &  aProp,
const OUString &  aValue 
)

Definition at line 72 of file htmlpars.cxx.

References insertProp(), m_ElemGlobalProps, m_ElemProps, and m_GlobalProps.

const OUString & ScHTMLStyles::getPropertyValue ( const OUString &  rElem,
const OUString &  rClass,
const OUString &  rPropName 
) const

Find best-matching property value for given element and class names.

Definition at line 117 of file htmlpars.cxx.

References m_ElemGlobalProps, m_ElemProps, m_GlobalProps, and maEmpty.

Referenced by ScHTMLTable::DataOn().

void ScHTMLStyles::insertProp ( NamePropsType rProps,
const OUString &  aName,
const OUString &  aProp,
const OUString &  aValue 
)
staticprivate

Definition at line 162 of file htmlpars.cxx.

Referenced by add().

Member Data Documentation

NamePropsType ScHTMLStyles::m_ElemGlobalProps
private

global properties (for a given class for all elements)

Definition at line 54 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

ElemsType ScHTMLStyles::m_ElemProps
private

element global properties (no class specified)

Definition at line 55 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

NamePropsType ScHTMLStyles::m_GlobalProps
private

Definition at line 53 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

const OUString ScHTMLStyles::maEmpty
private

element to class to properties (both element and class are given)

Definition at line 56 of file htmlpars.hxx.

Referenced by getPropertyValue().


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