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, PropsTypeNamePropsType
 
typedef ::std::map< OUString, NamePropsTypeElemsType
 

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 49 of file htmlpars.hxx.

Member Typedef Documentation

◆ ElemsType

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

Definition at line 53 of file htmlpars.hxx.

◆ NamePropsType

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

Definition at line 52 of file htmlpars.hxx.

◆ PropsType

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

Definition at line 51 of file htmlpars.hxx.

Constructor & Destructor Documentation

◆ ScHTMLStyles()

ScHTMLStyles::ScHTMLStyles ( )

just a persistent empty string.

Definition at line 73 of file htmlpars.cxx.

Member Function Documentation

◆ add()

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

Definition at line 75 of file htmlpars.cxx.

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

◆ getPropertyValue()

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 120 of file htmlpars.cxx.

References m_ElemGlobalProps, m_ElemProps, m_GlobalProps, and maEmpty.

Referenced by ScHTMLTable::DataOn().

◆ insertProp()

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

Definition at line 165 of file htmlpars.cxx.

References aName.

Referenced by add().

Member Data Documentation

◆ m_ElemGlobalProps

NamePropsType ScHTMLStyles::m_ElemGlobalProps
private

global properties (for a given class for all elements)

Definition at line 56 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

◆ m_ElemProps

ElemsType ScHTMLStyles::m_ElemProps
private

element global properties (no class specified)

Definition at line 57 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

◆ m_GlobalProps

NamePropsType ScHTMLStyles::m_GlobalProps
private

Definition at line 55 of file htmlpars.hxx.

Referenced by add(), and getPropertyValue().

◆ maEmpty

const OUString ScHTMLStyles::maEmpty
private

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

Definition at line 58 of file htmlpars.hxx.

Referenced by getPropertyValue().


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