summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssdeclaration.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_cssdeclaration.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_cssdeclaration.h')
-rw-r--r--xfa/fde/css/fde_cssdeclaration.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/xfa/fde/css/fde_cssdeclaration.h b/xfa/fde/css/fde_cssdeclaration.h
index 38b1626566..d6f405e842 100644
--- a/xfa/fde/css/fde_cssdeclaration.h
+++ b/xfa/fde/css/fde_cssdeclaration.h
@@ -13,7 +13,7 @@
class FDE_CSSPropertyHolder {
public:
- int16_t eProperty;
+ FDE_CSSProperty eProperty;
bool bImportant;
IFDE_CSSValue* pValue;
FDE_CSSPropertyHolder* pNext;
@@ -26,9 +26,9 @@ class FDE_CSSCustomProperty {
FDE_CSSCustomProperty* pNext;
};
-struct FDE_CSSPROPERTYARGS {
+struct FDE_CSSPropertyArgs {
std::unordered_map<uint32_t, FX_WCHAR*>* pStringCache;
- const FDE_CSSPROPERTYTABLE* pProperty;
+ const FDE_CSSPropertyTable* pProperty;
};
class CFDE_CSSDeclaration {
@@ -39,51 +39,51 @@ class CFDE_CSSDeclaration {
m_pFirstCustom(nullptr),
m_pLastCustom(nullptr) {}
- IFDE_CSSValue* GetProperty(FDE_CSSPROPERTY eProperty, bool& bImportant) const;
+ IFDE_CSSValue* GetProperty(FDE_CSSProperty eProperty, bool& bImportant) const;
FX_POSITION GetStartPosition() const;
void GetNextProperty(FX_POSITION& pos,
- FDE_CSSPROPERTY& eProperty,
+ FDE_CSSProperty& eProperty,
IFDE_CSSValue*& pValue,
bool& bImportant) const;
FX_POSITION GetStartCustom() const;
void GetNextCustom(FX_POSITION& pos,
CFX_WideString& wsName,
CFX_WideString& wsValue) const;
- bool AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool AddProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- bool AddProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool AddProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszName,
int32_t iNameLen,
const FX_WCHAR* pszValue,
int32_t iValueLen);
protected:
- bool ParseTextEmphasisProperty(FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseTextEmphasisProperty(FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseColumnsProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseColumnsProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseColumnRuleProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseColumnRuleProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseOverflowProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseOverflowProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseFontProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseFontProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseBackgroundProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseBackgroundProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseListStyleProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseListStyleProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
@@ -96,54 +96,54 @@ class CFDE_CSSDeclaration {
IFDE_CSSValue* pStyle,
IFDE_CSSValue* pWidth,
bool bImportant,
- FDE_CSSPROPERTY eColor,
- FDE_CSSPROPERTY eStyle,
- FDE_CSSPROPERTY eWidth);
- bool ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ FDE_CSSProperty eColor,
+ FDE_CSSProperty eStyle,
+ FDE_CSSProperty eWidth);
+ bool ParseContentProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseCounterProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseValueListProperty(const FDE_CSSPROPERTYARGS* pArgs,
+ bool ParseValueListProperty(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen,
bool bImportant);
bool Add4ValuesProperty(const CFDE_CSSValueArray& list,
bool bImportant,
- FDE_CSSPROPERTY eLeft,
- FDE_CSSPROPERTY eTop,
- FDE_CSSPROPERTY eRight,
- FDE_CSSPROPERTY eBottom);
- IFDE_CSSValue* ParseNumber(const FDE_CSSPROPERTYARGS* pArgs,
+ FDE_CSSProperty eLeft,
+ FDE_CSSProperty eTop,
+ FDE_CSSProperty eRight,
+ FDE_CSSProperty eBottom);
+ IFDE_CSSValue* ParseNumber(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- IFDE_CSSValue* ParseEnum(const FDE_CSSPROPERTYARGS* pArgs,
+ IFDE_CSSValue* ParseEnum(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- IFDE_CSSValue* ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
+ IFDE_CSSValue* ParseColor(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- IFDE_CSSValue* ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
+ IFDE_CSSValue* ParseURI(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- IFDE_CSSValue* ParseString(const FDE_CSSPROPERTYARGS* pArgs,
+ IFDE_CSSValue* ParseString(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- IFDE_CSSValue* ParseFunction(const FDE_CSSPROPERTYARGS* pArgs,
+ IFDE_CSSValue* ParseFunction(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- const FX_WCHAR* CopyToLocal(const FDE_CSSPROPERTYARGS* pArgs,
+ const FX_WCHAR* CopyToLocal(const FDE_CSSPropertyArgs* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen);
- void AddPropertyHolder(FDE_CSSPROPERTY eProperty,
+ void AddPropertyHolder(FDE_CSSProperty eProperty,
IFDE_CSSValue* pValue,
bool bImportant);
- IFDE_CSSPrimitiveValue* NewNumberValue(FDE_CSSPRIMITIVETYPE eUnit,
+ IFDE_CSSPrimitiveValue* NewNumberValue(FDE_CSSPrimitiveType eUnit,
FX_FLOAT fValue) const;
- IFDE_CSSPrimitiveValue* NewEnumValue(FDE_CSSPROPERTYVALUE eValue) const;
+ IFDE_CSSPrimitiveValue* NewEnumValue(FDE_CSSPropertyValue eValue) const;
FDE_CSSPropertyHolder* m_pFirstProperty;
FDE_CSSPropertyHolder* m_pLastProperty;