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 WhichRangesContainerGetWhichMap () 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 (tools::Long &nWidth, tools::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 m_sBaseURL
 
std::unique_ptr< SfxItemSetm_pSheetItemSet
 
SfxItemSetm_pItemSet
 
std::unique_ptr< SvxCSS1PropertyInfom_pSheetPropInfo
 
SvxCSS1PropertyInfom_pPropInfo
 
rtl_TextEncoding m_eDefaultEnc
 
bool m_bIgnoreFontFamily
 
WhichRangesContainer m_aWhichMap
 

Static Private Attributes

static constexpr sal_uInt16 gnMinFixLineSpace = o3tl::toTwips(25, o3tl::Length::mm10)
 

Detailed Description

Definition at line 186 of file svxcss1.hxx.

Member Typedef Documentation

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

Definition at line 189 of file svxcss1.hxx.

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

Definition at line 188 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 757 of file svxcss1.cxx.

References m_pSheetItemSet, and m_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 3164 of file svxcss1.cxx.

References CSS1PropEntryCompare(), CSS1PropEntryFindCompare(), m_pItemSet, and m_pPropInfo.

const OUString& SvxCSS1Parser::GetBaseURL ( ) const
inline

Definition at line 305 of file svxcss1.hxx.

References m_sBaseURL.

Referenced by ParseCSS1_background().

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

Definition at line 783 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 890 of file svxcss1.cxx.

Referenced by ParseCSS1_font_size().

const FontList * SvxCSS1Parser::GetFontList ( ) const
virtual

Reimplemented in SwCSS1Parser.

Definition at line 909 of file svxcss1.cxx.

Referenced by ParseCSS1_font_family().

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

Definition at line 770 of file svxcss1.cxx.

References m_Ids.

static sal_uInt16 SvxCSS1Parser::GetMinFixLineSpace ( )
inlinestatic

Definition at line 300 of file svxcss1.hxx.

References gnMinFixLineSpace.

Referenced by ParseCSS1_line_height().

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

Definition at line 800 of file svxcss1.cxx.

References m_Pages.

Referenced by SwCSS1Parser::ParseStyleSheet().

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

Definition at line 817 of file svxcss1.cxx.

References m_Tags.

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

const WhichRangesContainer& SvxCSS1Parser::GetWhichMap ( ) const
inline

Definition at line 268 of file svxcss1.hxx.

References m_aWhichMap.

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

Definition at line 776 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 763 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 789 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 810 of file svxcss1.cxx.

References InsertMapEntry(), and m_Tags.

Referenced by SwCSS1Parser::StyleParsed().

bool SvxCSS1Parser::IsIgnoreFontFamily ( ) const
inline

Definition at line 246 of file svxcss1.hxx.

References m_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 ( tools::Long nWidth,
tools::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 677 of file svxcss1.cxx.

References m_pSheetItemSet, m_pSheetPropInfo, m_Selectors, and StyleParsed().

void SvxCSS1Parser::SetDfltEncoding ( rtl_TextEncoding  eEnc)
virtual

Reimplemented in SwCSS1Parser.

Definition at line 982 of file svxcss1.cxx.

References m_eDefaultEnc.

Referenced by SwCSS1Parser::SetDfltEncoding().

void SvxCSS1Parser::SetIgnoreFontFamily ( bool  bSet)
inline

Definition at line 247 of file svxcss1.hxx.

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

Reimplemented in SwCSS1Parser.

Definition at line 670 of file svxcss1.cxx.

Referenced by ParseStyleSheet(), and SelectorParsed().

Member Data Documentation

constexpr sal_uInt16 SvxCSS1Parser::gnMinFixLineSpace = o3tl::toTwips(25, o3tl::Length::mm10)
staticprivate

Definition at line 206 of file svxcss1.hxx.

Referenced by GetMinFixLineSpace().

WhichRangesContainer SvxCSS1Parser::m_aWhichMap
private

Definition at line 210 of file svxcss1.hxx.

Referenced by GetWhichMap(), and SvxCSS1Parser().

bool SvxCSS1Parser::m_bIgnoreFontFamily
private

Definition at line 209 of file svxcss1.hxx.

Referenced by IsIgnoreFontFamily().

CSS1Map SvxCSS1Parser::m_Classes
private

Definition at line 193 of file svxcss1.hxx.

Referenced by GetClass(), and InsertClass().

rtl_TextEncoding SvxCSS1Parser::m_eDefaultEnc
private

Definition at line 208 of file svxcss1.hxx.

Referenced by GetDfltEncoding(), and SetDfltEncoding().

CSS1Map SvxCSS1Parser::m_Ids
private

Definition at line 192 of file svxcss1.hxx.

Referenced by GetId(), and InsertId().

CSS1Map SvxCSS1Parser::m_Pages
private

Definition at line 194 of file svxcss1.hxx.

Referenced by GetPage(), and InsertPage().

SfxItemSet* SvxCSS1Parser::m_pItemSet
private

Definition at line 200 of file svxcss1.hxx.

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

SvxCSS1PropertyInfo* SvxCSS1Parser::m_pPropInfo
private

Definition at line 203 of file svxcss1.hxx.

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

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

Definition at line 199 of file svxcss1.hxx.

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

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

Definition at line 202 of file svxcss1.hxx.

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

OUString SvxCSS1Parser::m_sBaseURL
private

Definition at line 197 of file svxcss1.hxx.

Referenced by GetBaseURL().

CSS1Selectors SvxCSS1Parser::m_Selectors
private

Definition at line 190 of file svxcss1.hxx.

Referenced by ParseStyleSheet(), and SelectorParsed().

CSS1Map SvxCSS1Parser::m_Tags
private

Definition at line 195 of file svxcss1.hxx.

Referenced by GetTag(), and InsertTag().


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