Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: xfa/fde/css/fde_cssdatatable.h

Issue 2072803002: Make code compile with clang_use_chrome_plugin (final) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/css/fde_csscache.cpp ('k') | xfa/fde/css/fde_cssdatatable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/css/fde_cssdatatable.h
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index d61ff09ae7c99bdecd6e5b073d56424475b28140..252efdce5037061e94a8f80b84030f3f91a67b2d 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -27,56 +27,26 @@ class CFDE_CSSFunction : public CFX_Target {
IFDE_CSSValueList* m_pArgList;
const FX_WCHAR* m_pszFuncName;
};
+
class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
public CFX_Target {
public:
- CFDE_CSSPrimitiveValue(const CFDE_CSSPrimitiveValue& src) { *this = src; }
- CFDE_CSSPrimitiveValue(FX_ARGB color)
- : m_eType(FDE_CSSPRIMITIVETYPE_RGB), m_dwColor(color) {}
- CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue)
- : m_eType(FDE_CSSPRIMITIVETYPE_Enum), m_eEnum(eValue) {}
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_FLOAT fValue)
- : m_eType(eType), m_fNumber(fValue) {}
- CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, const FX_WCHAR* pValue)
- : m_eType(eType), m_pString(pValue) {
- ASSERT(m_pString);
- }
- CFDE_CSSPrimitiveValue(CFDE_CSSFunction* pFunction)
- : m_eType(FDE_CSSPRIMITIVETYPE_Function), m_pFunction(pFunction) {}
-
- virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const { return m_eType; }
-
- virtual FX_ARGB GetRGBColor() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_RGB);
- return m_dwColor;
- }
- virtual FX_FLOAT GetFloat() const {
- ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_Number &&
- m_eType <= FDE_CSSPRIMITIVETYPE_PC);
- return m_fNumber;
- }
- virtual const FX_WCHAR* GetString(int32_t& iLength) const {
- ASSERT(m_eType >= FDE_CSSPRIMITIVETYPE_String &&
- m_eType <= FDE_CSSPRIMITIVETYPE_URI);
- iLength = FXSYS_wcslen(m_pString);
- return m_pString;
- }
- virtual FDE_CSSPROPERTYVALUE GetEnum() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Enum);
- return m_eEnum;
- }
- virtual const FX_WCHAR* GetFuncName() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
- return m_pFunction->GetFuncName();
- }
- virtual int32_t CountArgs() const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
- return m_pFunction->CountArgs();
- }
- virtual IFDE_CSSValue* GetArgs(int32_t index) const {
- ASSERT(m_eType == FDE_CSSPRIMITIVETYPE_Function);
- return m_pFunction->GetArgs(index);
- }
+ explicit CFDE_CSSPrimitiveValue(FX_ARGB color);
+ explicit CFDE_CSSPrimitiveValue(FDE_CSSPROPERTYVALUE eValue);
+ explicit CFDE_CSSPrimitiveValue(CFDE_CSSFunction* pFunction);
+ CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE eType, FX_FLOAT fValue);
+ 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;
FDE_CSSPRIMITIVETYPE m_eType;
union {
@@ -87,21 +57,24 @@ class CFDE_CSSPrimitiveValue : public IFDE_CSSPrimitiveValue,
CFDE_CSSFunction* m_pFunction;
};
};
+
typedef CFX_ArrayTemplate<IFDE_CSSPrimitiveValue*> CFDE_CSSPrimitiveArray;
typedef CFX_ArrayTemplate<IFDE_CSSValue*> CFDE_CSSValueArray;
+
class CFDE_CSSValueList : public IFDE_CSSValueList, public CFX_Target {
public:
CFDE_CSSValueList(IFX_MemoryAllocator* pStaticStore,
const CFDE_CSSValueArray& list);
- virtual int32_t CountValues() const { return m_iCount; }
- virtual IFDE_CSSValue* GetValue(int32_t index) const {
- return m_ppList[index];
- }
+
+ // IFDE_CSSValueList
+ int32_t CountValues() const override;
+ IFDE_CSSValue* GetValue(int32_t index) const override;
protected:
IFDE_CSSValue** m_ppList;
int32_t m_iCount;
};
+
class CFDE_CSSValueListParser : public CFX_Target {
public:
CFDE_CSSValueListParser(const FX_WCHAR* psz, int32_t iLen, FX_WCHAR separator)
@@ -117,6 +90,7 @@ class CFDE_CSSValueListParser : public CFX_Target {
int32_t SkipTo(FX_WCHAR wch,
FX_BOOL bWSSeparator = FALSE,
FX_BOOL bBrContinue = FALSE);
+
const FX_WCHAR* m_pCur;
const FX_WCHAR* m_pEnd;
};
« no previous file with comments | « xfa/fde/css/fde_csscache.cpp ('k') | xfa/fde/css/fde_cssdatatable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698