summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssstylesheet.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-11 16:31:27 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-11 21:45:02 +0000
commit96f482c9cd3c99425fd3422251903b1218253c66 (patch)
tree5d089e55f47ab5e46b993026a5f961b44fed04e9 /xfa/fde/css/fde_cssstylesheet.h
parenta63dd01d2fdda06f96e6188dbc3b415447bf2bc9 (diff)
downloadpdfium-96f482c9cd3c99425fd3422251903b1218253c66.tar.xz
Convert FDE CSS enums to enum classes.
This CL updates the possible FDE CSS enums to enum classes and fixes up any instances of incorrect values being used. A few other cleanups and changes were needed to complete the conversion. Change-Id: Ibcca5229a9ca8de1f4beb6462535f61705fd4f8c Reviewed-on: https://pdfium-review.googlesource.com/2170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssstylesheet.h')
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index a67c2d816f..c00be4384a 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -17,12 +17,12 @@ class CFDE_CSSSyntaxParser;
class CFDE_CSSSelector {
public:
- CFDE_CSSSelector(FDE_CSSSELECTORTYPE eType,
+ CFDE_CSSSelector(FDE_CSSSelectorType eType,
const FX_WCHAR* psz,
int32_t iLen,
bool bIgnoreCase);
- virtual FDE_CSSSELECTORTYPE GetType() const;
+ virtual FDE_CSSSelectorType GetType() const;
virtual uint32_t GetNameHash() const;
virtual CFDE_CSSSelector* GetNextSelector() const;
@@ -31,9 +31,9 @@ class CFDE_CSSSelector {
void SetNext(CFDE_CSSSelector* pNext) { m_pNext = pNext; }
protected:
- void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; }
+ void SetType(FDE_CSSSelectorType eType) { m_eType = eType; }
- FDE_CSSSELECTORTYPE m_eType;
+ FDE_CSSSelectorType m_eType;
uint32_t m_dwHash;
CFDE_CSSSelector* m_pNext;
};
@@ -84,13 +84,6 @@ class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule {
CFDE_CSSDeclaration m_Declaration;
};
-#define FDE_CSSSWITCHDEFAULTS() \
- case FDE_CSSSYNTAXSTATUS_EOS: \
- return FDE_CSSSYNTAXSTATUS_EOS; \
- case FDE_CSSSYNTAXSTATUS_Error: \
- default: \
- return FDE_CSSSYNTAXSTATUS_Error;
-
class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet {
public:
explicit CFDE_CSSStyleSheet(uint32_t dwMediaList);
@@ -118,16 +111,16 @@ class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet {
protected:
void Reset();
bool LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax);
- FDE_CSSSYNTAXSTATUS LoadStyleRule(
+ FDE_CSSSyntaxStatus LoadStyleRule(
CFDE_CSSSyntaxParser* pSyntax,
CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray);
- FDE_CSSSYNTAXSTATUS LoadImportRule(CFDE_CSSSyntaxParser* pSyntax);
- FDE_CSSSYNTAXSTATUS LoadPageRule(CFDE_CSSSyntaxParser* pSyntax);
- FDE_CSSSYNTAXSTATUS LoadMediaRule(CFDE_CSSSyntaxParser* pSyntax);
- FDE_CSSSYNTAXSTATUS LoadFontFaceRule(
+ FDE_CSSSyntaxStatus LoadImportRule(CFDE_CSSSyntaxParser* pSyntax);
+ FDE_CSSSyntaxStatus LoadPageRule(CFDE_CSSSyntaxParser* pSyntax);
+ FDE_CSSSyntaxStatus LoadMediaRule(CFDE_CSSSyntaxParser* pSyntax);
+ FDE_CSSSyntaxStatus LoadFontFaceRule(
CFDE_CSSSyntaxParser* pSyntax,
CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray);
- FDE_CSSSYNTAXSTATUS SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax);
+ FDE_CSSSyntaxStatus SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax);
uint16_t m_wCodePage;
uint16_t m_wRefCount;
uint32_t m_dwMediaList;