diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-16 16:03:44 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-16 21:14:58 +0000 |
commit | cfb856c4744a9e0ff0f0db5602d0a13c835570ce (patch) | |
tree | 8880b3041fd6d780a630ba49813a17a608b83d35 /xfa/fde/css/fde_cssdatatable.h | |
parent | 135609831bcad2da79d720cfdd3b55929b48b0ea (diff) | |
download | pdfium-cfb856c4744a9e0ff0f0db5602d0a13c835570ce.tar.xz |
Remove IFDE_CSS interfaces which are only implemented once.
This CL cleans up some interface classes from FDE CSS.
Change-Id: I975e5d63f8ae6a0bc7bb849b6f11f0ae43092e4d
Reviewed-on: https://pdfium-review.googlesource.com/2177
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssdatatable.h')
-rw-r--r-- | xfa/fde/css/fde_cssdatatable.h | 68 |
1 files changed, 37 insertions, 31 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h index f11cae2eac..d62ddf6b03 100644 --- a/xfa/fde/css/fde_cssdatatable.h +++ b/xfa/fde/css/fde_cssdatatable.h @@ -10,24 +10,9 @@ #include "core/fxcrt/fx_system.h" #include "xfa/fde/css/fde_css.h" -class CFDE_CSSFunction { - public: - CFDE_CSSFunction(const FX_WCHAR* pszFuncName, IFDE_CSSValueList* pArgList) - : m_pArgList(pArgList), m_pszFuncName(pszFuncName) { - ASSERT(pArgList); - } - int32_t CountArgs() const { return m_pArgList->CountValues(); } - IFDE_CSSValue* GetArgs(int32_t index) const { - return m_pArgList->GetValue(index); - } - const FX_WCHAR* GetFuncName() const { return m_pszFuncName; } - - protected: - IFDE_CSSValueList* m_pArgList; - const FX_WCHAR* m_pszFuncName; -}; +class CFDE_CSSFunction; -class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue { +class CFDE_CSSPrimitiveValue : public IFDE_CSSValue { public: explicit CFDE_CSSPrimitiveValue(FX_ARGB color); explicit CFDE_CSSPrimitiveValue(FDE_CSSPropertyValue eValue); @@ -36,15 +21,17 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue { CFDE_CSSPrimitiveValue(FDE_CSSPrimitiveType eType, const FX_WCHAR* pValue); CFDE_CSSPrimitiveValue(const CFDE_CSSPrimitiveValue& src); - // IFDE_CSSPrimitiveValue - FDE_CSSPrimitiveType GetPrimitiveType() const override; - FX_ARGB GetRGBColor() const override; - FX_FLOAT GetFloat() const override; - const FX_WCHAR* GetString(int32_t& iLength) const override; - FDE_CSSPropertyValue GetEnum() const override; - const FX_WCHAR* GetFuncName() const override; - int32_t CountArgs() const override; - IFDE_CSSValue* GetArgs(int32_t index) const override; + // IFDE_CSSValue + FDE_CSSVALUETYPE GetType() const override; + + FDE_CSSPrimitiveType GetPrimitiveType() const; + FX_ARGB GetRGBColor() const; + FX_FLOAT GetFloat() const; + const FX_WCHAR* GetString(int32_t& iLength) const; + FDE_CSSPropertyValue GetEnum() const; + const FX_WCHAR* GetFuncName() const; + int32_t CountArgs() const; + IFDE_CSSValue* GetArgs(int32_t index) const; FDE_CSSPrimitiveType m_eType; union { @@ -56,16 +43,18 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue { }; }; -typedef CFX_ArrayTemplate<IFDE_CSSPrimitiveValue*> CFDE_CSSPrimitiveArray; +typedef CFX_ArrayTemplate<CFDE_CSSPrimitiveValue*> CFDE_CSSPrimitiveArray; typedef CFX_ArrayTemplate<IFDE_CSSValue*> CFDE_CSSValueArray; -class CFDE_CSSValueList : public IFDE_CSSValueList { +class CFDE_CSSValueList : public IFDE_CSSValue { public: explicit CFDE_CSSValueList(const CFDE_CSSValueArray& list); - // IFDE_CSSValueList - int32_t CountValues() const override; - IFDE_CSSValue* GetValue(int32_t index) const override; + // IFDE_CSSValue + FDE_CSSVALUETYPE GetType() const override; + + int32_t CountValues() const; + IFDE_CSSValue* GetValue(int32_t index) const; protected: IFDE_CSSValue** m_ppList; @@ -92,6 +81,23 @@ class CFDE_CSSValueListParser { const FX_WCHAR* m_pEnd; }; +class CFDE_CSSFunction { + public: + CFDE_CSSFunction(const FX_WCHAR* pszFuncName, CFDE_CSSValueList* pArgList) + : m_pArgList(pArgList), m_pszFuncName(pszFuncName) { + ASSERT(pArgList); + } + int32_t CountArgs() const { return m_pArgList->CountValues(); } + IFDE_CSSValue* GetArgs(int32_t index) const { + return m_pArgList->GetValue(index); + } + const FX_WCHAR* GetFuncName() const { return m_pszFuncName; } + + protected: + CFDE_CSSValueList* m_pArgList; + const FX_WCHAR* m_pszFuncName; +}; + #define FDE_IsOnlyValue(type, enum) \ (((type) & ~(enum)) == FDE_CSSVALUETYPE_Primitive) |