19#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_SVXCSS1_HXX
20#define INCLUDED_SW_SOURCE_FILTER_HTML_SVXCSS1_HXX
24#include <rtl/textenc.h>
92namespace editeng {
class SvxBorderLine; }
94#define SVX_CSS1_BORDERINFO_WIDTH 1
95#define SVX_CSS1_BORDERINFO_COLOR 2
96#define SVX_CSS1_BORDERINFO_STYLE 4
191 typedef std::map<OUString, std::unique_ptr<SvxCSS1MapEntry>>
CSS1Map;
233 virtual void SelectorParsed( std::unique_ptr<CSS1Selector> pSelector,
bool bFirst )
override;
239 std::unique_ptr<CSS1Expression> pExpr )
override;
245 sal_uInt16
const *pWhichIds, sal_uInt16 nWhichIds );
261 std::u16string_view rValue, sal_uInt16 &rEnum );
285 void InsertPage(
const OUString& rPage,
bool bPseudo,
Parser of a style element/option.
void ParseStyleOption(const OUString &rIn)
parse the content of a HTML style option
SvxCSS1PropertyInfo & GetPropertyInfo()
SvxCSS1PropertyInfo m_aPropInfo
SfxItemSet & GetItemSet()
SvxCSS1MapEntry(SfxItemSet aItemSet, const SvxCSS1PropertyInfo &rProp)
const SvxCSS1PropertyInfo & GetPropertyInfo() const
const SfxItemSet & GetItemSet() const
std::unique_ptr< SfxItemSet > m_pSheetItemSet
void InsertPage(const OUString &rPage, bool bPseudo, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
void SetIgnoreFontFamily(bool bSet)
const SvxCSS1MapEntry * GetId(const OUString &rId) const
void InsertId(const OUString &rId, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
void ParseStyleOption(const OUString &rIn, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo)
CSS1Selectors m_Selectors
bool IsIgnoreFontFamily() const
std::unique_ptr< SvxCSS1PropertyInfo > m_pSheetPropInfo
SvxCSS1MapEntry * GetTag(const OUString &rTag)
virtual void SetDfltEncoding(rtl_TextEncoding eEnc)
rtl_TextEncoding GetDfltEncoding() const
void InsertClass(const OUString &rClass, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
static void PixelToTwip(tools::Long &nWidth, tools::Long &nHeight)
static void InsertMapEntry(const OUString &rKey, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp, CSS1Map &rMap)
virtual void StyleParsed(const CSS1Selector *pSelector, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo)
static sal_uInt16 GetMinFixLineSpace()
rtl_TextEncoding m_eDefaultEnc
std::map< OUString, std::unique_ptr< SvxCSS1MapEntry > > CSS1Map
static void MergeStyles(const SfxItemSet &rSrcSet, const SvxCSS1PropertyInfo &rSrcInfo, SfxItemSet &rTargetSet, SvxCSS1PropertyInfo &rTargetInfo, bool bSmart)
virtual void DeclarationParsed(const OUString &rProperty, std::unique_ptr< CSS1Expression > pExpr) override
Will be called for every parsed Property.
const SvxCSS1MapEntry * GetClass(const OUString &rClass) const
SvxCSS1MapEntry * GetPage(const OUString &rPage, bool bPseudo)
virtual sal_uInt32 GetFontHeight(sal_uInt16 nSize) const
static bool GetEnum(const CSS1PropertyEnum *pPropTable, std::u16string_view rValue, sal_uInt16 &rEnum)
const OUString & GetBaseURL() const
virtual void SelectorParsed(std::unique_ptr< CSS1Selector > pSelector, bool bFirst) override
Will be called when a Selector is parsed.
virtual ~SvxCSS1Parser() override
std::vector< std::unique_ptr< CSS1Selector > > CSS1Selectors
SvxCSS1Parser(SfxItemPool &rPool, OUString aBaseURL, sal_uInt16 const *pWhichIds, sal_uInt16 nWhichIds)
WhichRangesContainer m_aWhichMap
virtual const FontList * GetFontList() const
static constexpr sal_uInt16 gnMinFixLineSpace
const WhichRangesContainer & GetWhichMap() const
SvxCSS1PropertyInfo * m_pPropInfo
void InsertTag(const OUString &rTag, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
sal_Unicode m_cBulletChar
SvxCSS1PageBreak m_ePageBreakBefore
void SetBoxItem(SfxItemSet &rItemSet, sal_uInt16 nMinBorderDist, const SvxBoxItem *pDflt=nullptr)
SvxNumType m_nNumberingType
sal_uInt16 m_nColumnCount
SvxCSS1PageBreak m_ePageBreakAfter
SvxCSS1BorderInfo * GetBorderInfo(SvxBoxItemLine nLine, bool bCreate=true)
void CopyBorderInfo(SvxBoxItemLine nSrcLine, SvxBoxItemLine nDstLine, sal_uInt16 nWhat)
SvxCSS1SizeType m_eSizeType
SvxCSS1LengthType m_eRightMarginType
void DestroyBorderInfos()
tools::Long m_nRightMargin
SvxCSS1LengthType m_eLeftMarginType
sal_uInt16 m_nBottomBorderDistance
sal_uInt16 m_nRightBorderDistance
sal_uInt16 m_nLeftBorderDistance
SvxCSS1LengthType m_eHeightType
SvxCSS1Position m_ePosition
SvxCSS1LengthType m_eWidthType
void Merge(const SvxCSS1PropertyInfo &rProp)
sal_uInt16 m_nTopBorderDistance
SvxCSS1LengthType m_eTopType
static constexpr sal_uInt16 UNSET_BORDER_DISTANCE
std::array< std::unique_ptr< SvxCSS1BorderInfo >, 4 > m_aBorderInfos
tools::Long m_nLeftMargin
SvxCSS1LengthType m_eLeftType
constexpr auto toTwips(N number, Length from)
@ SVX_CSS1_STYPE_LANDSCAPE
@ SVX_CSS1_STYPE_PORTRAIT
@ SVX_CSS1_LTYPE_PERCENTAGE