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

#include <svxcss1.hxx>

Inheritance diagram for SvxCSS1Parser:
[legend]
Collaboration diagram for SvxCSS1Parser:
[legend]

Public Member Functions

 SvxCSS1Parser (SfxItemPool &rPool, const OUString &rBaseURL, sal_uInt16 const *pWhichIds, sal_uInt16 nWhichIds)
 
virtual ~SvxCSS1Parser () override
 
bool IsIgnoreFontFamily () const
 
void SetIgnoreFontFamily (bool bSet)
 
virtual bool ParseStyleSheet (const OUString &rIn)
 
void ParseStyleOption (const OUString &rIn, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo)
 
virtual sal_uInt32 GetFontHeight (sal_uInt16 nSize) const
 
virtual const FontListGetFontList () const
 
const sal_uInt16 * GetWhichMap () const
 
void InsertId (const OUString &rId, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
 
const SvxCSS1MapEntryGetId (const OUString &rId) const
 
void InsertClass (const OUString &rClass, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
 
const SvxCSS1MapEntryGetClass (const OUString &rClass) const
 
void InsertPage (const OUString &rPage, bool bPseudo, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
 
SvxCSS1MapEntryGetPage (const OUString &rPage, bool bPseudo)
 
void InsertTag (const OUString &rTag, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
 
SvxCSS1MapEntryGetTag (const OUString &rTag)
 
virtual void SetDfltEncoding (rtl_TextEncoding eEnc)
 
rtl_TextEncoding GetDfltEncoding () const
 
const OUString & GetBaseURL () const
 
- Public Member Functions inherited from CSS1Parser
 CSS1Parser ()
 
virtual ~CSS1Parser ()
 

Static Public Member Functions

static bool GetEnum (const CSS1PropertyEnum *pPropTable, const OUString &rValue, sal_uInt16 &rEnum)
 
static void PixelToTwip (long &nWidth, long &nHeight)
 
static void InsertMapEntry (const OUString &rKey, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp, CSS1Map &rMap)
 
static void MergeStyles (const SfxItemSet &rSrcSet, const SvxCSS1PropertyInfo &rSrcInfo, SfxItemSet &rTargetSet, SvxCSS1PropertyInfo &rTargetInfo, bool bSmart)
 
static sal_uInt16 GetMinFixLineSpace ()
 

Protected Member Functions

virtual void StyleParsed (const CSS1Selector *pSelector, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo)
 
virtual void SelectorParsed (std::unique_ptr< CSS1Selector > pSelector, bool bFirst) override
 Will be called when a Selector is parsed. More...
 
virtual void DeclarationParsed (const OUString &rProperty, std::unique_ptr< CSS1Expression > pExpr) override
 Will be called for every parsed Property. More...
 
- Protected Member Functions inherited from CSS1Parser
void ParseStyleSheet ()
 
void ParseStyleSheet (const OUString &rIn)
 parse the content of a HTML style element More...
 
void ParseStyleOption (const OUString &rIn)
 parse the content of a HTML style option More...
 

Private Types

typedef std::vector< std::unique_ptr< CSS1Selector > > CSS1Selectors
 
typedef std::map< OUString, std::unique_ptr< SvxCSS1MapEntry > > CSS1Map
 

Private Attributes

CSS1Selectors m_Selectors
 
CSS1Map m_Ids
 
CSS1Map m_Classes
 
CSS1Map m_Pages
 
CSS1Map m_Tags
 
OUString const sBaseURL
 
std::unique_ptr< SfxItemSetpSheetItemSet
 
SfxItemSetpItemSet
 
std::unique_ptr< SvxCSS1PropertyInfopSheetPropInfo
 
SvxCSS1PropertyInfopPropInfo
 
rtl_TextEncoding eDfltEnc
 
bool bIgnoreFontFamily
 
std::vector< sal_uInt16 > aWhichMap
 

Static Private Attributes

static constexpr sal_uInt16 gnMinFixLineSpace = MM50/2
 

Detailed Description

Definition at line 184 of file svxcss1.hxx.

Member Typedef Documentation

typedef std::map<OUString, std::unique_ptr<SvxCSS1MapEntry> > SvxCSS1Parser::CSS1Map
private

Definition at line 187 of file svxcss1.hxx.

typedef std::vector<std::unique_ptr<CSS1Selector> > SvxCSS1Parser::CSS1Selectors
private

Definition at line 186 of file svxcss1.hxx.

Constructor & Destructor Documentation

SvxCSS1Parser::SvxCSS1Parser ( SfxItemPool rPool,
const OUString &  rBaseURL,
sal_uInt16 const *  pWhichIds,
sal_uInt16  nWhichIds 
)
SvxCSS1Parser::~SvxCSS1Parser ( )
overridevirtual

Definition at line 747 of file svxcss1.cxx.

References pSheetItemSet, and pSheetPropInfo.

Member Function Documentation

void SvxCSS1Parser::DeclarationParsed ( const OUString &  rProperty,
std::unique_ptr< CSS1Expression pExpr 
)
overrideprotectedvirtual

Will be called for every parsed Property.

Adds the item to the pItemSet. Derived classes should not override this method!

Reimplemented from CSS1Parser.

Definition at line 3141 of file svxcss1.cxx.

References CSS1PropEntryCompare(), CSS1PropEntryFindCompare(), pItemSet, and pPropInfo.

const OUString& SvxCSS1Parser::GetBaseURL ( ) const
inline

Definition at line 302 of file svxcss1.hxx.

References sBaseURL.

Referenced by ParseCSS1_background().

const SvxCSS1MapEntry * SvxCSS1Parser::GetClass ( const OUString &  rClass) const

Definition at line 773 of file svxcss1.cxx.

References m_Classes.

Referenced by SwCSS1Parser::GetChrFormat(), and SwCSS1Parser::GetTextFormatColl().

rtl_TextEncoding SvxCSS1Parser::GetDfltEncoding ( ) const
inline
bool SvxCSS1Parser::GetEnum ( const CSS1PropertyEnum pPropTable,
const OUString &  rValue,
sal_uInt16 &  rEnum 
)
static
sal_uInt32 SvxCSS1Parser::GetFontHeight ( sal_uInt16  nSize) const
virtual

Reimplemented in SwCSS1Parser.

Definition at line 880 of file svxcss1.cxx.

Referenced by ParseCSS1_font_size().

const FontList * SvxCSS1Parser::GetFontList ( ) const
virtual

Reimplemented in SwCSS1Parser.

Definition at line 899 of file svxcss1.cxx.

Referenced by ParseCSS1_font_family().

const SvxCSS1MapEntry * SvxCSS1Parser::GetId ( const OUString &  rId) const

Definition at line 760 of file svxcss1.cxx.

References m_Ids.

static sal_uInt16 SvxCSS1Parser::GetMinFixLineSpace ( )
inlinestatic

Definition at line 297 of file svxcss1.hxx.

References gnMinFixLineSpace.

Referenced by ParseCSS1_line_height().

SvxCSS1MapEntry * SvxCSS1Parser::GetPage ( const OUString &  rPage,
bool  bPseudo 
)

Definition at line 790 of file svxcss1.cxx.

References m_Pages.

Referenced by SwCSS1Parser::ParseStyleSheet().

SvxCSS1MapEntry * SvxCSS1Parser::GetTag ( const OUString &  rTag)

Definition at line 807 of file svxcss1.cxx.

References m_Tags.

Referenced by SwCSS1Parser::SetLinkCharFormats(), and SwCSS1Parser::SetTableTextColl().

const sal_uInt16* SvxCSS1Parser::GetWhichMap ( ) const
inline

Definition at line 265 of file svxcss1.hxx.

void SvxCSS1Parser::InsertClass ( const OUString &  rClass,
const SfxItemSet rItemSet,
const SvxCSS1PropertyInfo rProp 
)

Definition at line 766 of file svxcss1.cxx.

References InsertMapEntry(), and m_Classes.

Referenced by SwCSS1Parser::StyleParsed().

void SvxCSS1Parser::InsertId ( const OUString &  rId,
const SfxItemSet rItemSet,
const SvxCSS1PropertyInfo rProp 
)

Definition at line 753 of file svxcss1.cxx.

References InsertMapEntry(), and m_Ids.

Referenced by SwCSS1Parser::StyleParsed().

void SvxCSS1Parser::InsertMapEntry ( const OUString &  rKey,
const SfxItemSet rItemSet,
const SvxCSS1PropertyInfo rProp,
CSS1Map rMap 
)
static
void SvxCSS1Parser::InsertPage ( const OUString &  rPage,
bool  bPseudo,
const SfxItemSet rItemSet,
const SvxCSS1PropertyInfo rProp 
)

Definition at line 779 of file svxcss1.cxx.

References InsertMapEntry(), and m_Pages.

Referenced by SwCSS1Parser::StyleParsed().

void SvxCSS1Parser::InsertTag ( const OUString &  rTag,
const SfxItemSet rItemSet,
const SvxCSS1PropertyInfo rProp 
)

Definition at line 800 of file svxcss1.cxx.

References InsertMapEntry(), and m_Tags.

Referenced by SwCSS1Parser::StyleParsed().

bool SvxCSS1Parser::IsIgnoreFontFamily ( ) const
inline

Definition at line 243 of file svxcss1.hxx.

References bIgnoreFontFamily.

Referenced by ParseCSS1_font_family().

void SvxCSS1Parser::MergeStyles ( const SfxItemSet rSrcSet,
const SvxCSS1PropertyInfo rSrcInfo,
SfxItemSet rTargetSet,
SvxCSS1PropertyInfo rTargetInfo,
bool  bSmart 
)
static
void SvxCSS1Parser::ParseStyleOption ( const OUString &  rIn,
SfxItemSet rItemSet,
SvxCSS1PropertyInfo rPropInfo 
)
bool SvxCSS1Parser::ParseStyleSheet ( const OUString &  rIn)
virtual
void SvxCSS1Parser::PixelToTwip ( long &  nWidth,
long &  nHeight 
)
static
void SvxCSS1Parser::SelectorParsed ( std::unique_ptr< CSS1Selector pSelector,
bool  bFirst 
)
overrideprotectedvirtual

Will be called when a Selector is parsed.

If bFirst is true, the content of the aItemSet will be copied into all recently created Styles. Derived classes should not override this method!

Reimplemented from CSS1Parser.

Definition at line 671 of file svxcss1.cxx.

References m_Selectors, pSheetItemSet, pSheetPropInfo, and StyleParsed().

void SvxCSS1Parser::SetDfltEncoding ( rtl_TextEncoding  eEnc)
virtual

Reimplemented in SwCSS1Parser.

Definition at line 972 of file svxcss1.cxx.

References eDfltEnc.

Referenced by SwCSS1Parser::SetDfltEncoding().

void SvxCSS1Parser::SetIgnoreFontFamily ( bool  bSet)
inline

Definition at line 244 of file svxcss1.hxx.

void SvxCSS1Parser::StyleParsed ( const CSS1Selector pSelector,
SfxItemSet rItemSet,
SvxCSS1PropertyInfo rPropInfo 
)
protectedvirtual

Reimplemented in SwCSS1Parser.

Definition at line 664 of file svxcss1.cxx.

Referenced by ParseStyleSheet(), and SelectorParsed().

Member Data Documentation

std::vector<sal_uInt16> SvxCSS1Parser::aWhichMap
private

Definition at line 207 of file svxcss1.hxx.

Referenced by SvxCSS1Parser().

bool SvxCSS1Parser::bIgnoreFontFamily
private

Definition at line 206 of file svxcss1.hxx.

Referenced by IsIgnoreFontFamily().

rtl_TextEncoding SvxCSS1Parser::eDfltEnc
private

Definition at line 205 of file svxcss1.hxx.

Referenced by GetDfltEncoding(), and SetDfltEncoding().

constexpr sal_uInt16 SvxCSS1Parser::gnMinFixLineSpace = MM50/2
staticprivate

Definition at line 203 of file svxcss1.hxx.

Referenced by GetMinFixLineSpace().

CSS1Map SvxCSS1Parser::m_Classes
private

Definition at line 191 of file svxcss1.hxx.

Referenced by GetClass(), and InsertClass().

CSS1Map SvxCSS1Parser::m_Ids
private

Definition at line 190 of file svxcss1.hxx.

Referenced by GetId(), and InsertId().

CSS1Map SvxCSS1Parser::m_Pages
private

Definition at line 192 of file svxcss1.hxx.

Referenced by GetPage(), and InsertPage().

CSS1Selectors SvxCSS1Parser::m_Selectors
private

Definition at line 188 of file svxcss1.hxx.

Referenced by ParseStyleSheet(), and SelectorParsed().

CSS1Map SvxCSS1Parser::m_Tags
private

Definition at line 193 of file svxcss1.hxx.

Referenced by GetTag(), and InsertTag().

SfxItemSet* SvxCSS1Parser::pItemSet
private

Definition at line 198 of file svxcss1.hxx.

Referenced by DeclarationParsed(), ParseStyleOption(), and ParseStyleSheet().

SvxCSS1PropertyInfo* SvxCSS1Parser::pPropInfo
private

Definition at line 201 of file svxcss1.hxx.

Referenced by DeclarationParsed(), ParseStyleOption(), and ParseStyleSheet().

std::unique_ptr<SfxItemSet> SvxCSS1Parser::pSheetItemSet
private

Definition at line 197 of file svxcss1.hxx.

Referenced by ParseStyleSheet(), SelectorParsed(), SvxCSS1Parser(), and ~SvxCSS1Parser().

std::unique_ptr<SvxCSS1PropertyInfo> SvxCSS1Parser::pSheetPropInfo
private

Definition at line 200 of file svxcss1.hxx.

Referenced by ParseStyleSheet(), SelectorParsed(), SvxCSS1Parser(), and ~SvxCSS1Parser().

OUString const SvxCSS1Parser::sBaseURL
private

Definition at line 195 of file svxcss1.hxx.

Referenced by GetBaseURL().


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