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

Unified Diff: xfa/fxfa/parser/xfa_script_imp.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks 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/fxfa/parser/xfa_script_hostpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index e9b70202bec881cda485848f869e1417d7635148..eeb9ba93c1d1c85169fc48c527d58b6c5af324d9 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -357,7 +357,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
CXFA_ScriptContext* lpScriptContext =
pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
- XFA_ELEMENT objElement = pObject->GetClassID();
+ XFA_Element objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
return FXJSE_ClassPropType_Method;
@@ -379,7 +379,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
CXFA_ScriptContext* lpScriptContext =
pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
- XFA_ELEMENT objElement = pObject->GetClassID();
+ XFA_Element objElement = pObject->GetClassID();
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) {
return FXJSE_ClassPropType_Method;
@@ -443,11 +443,11 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
if (!pScriptNode)
return FALSE;
- if (pScriptNode->GetClassID() != XFA_ELEMENT_Script)
+ if (pScriptNode->GetClassID() != XFA_Element::Script)
return TRUE;
CXFA_Node* pParent = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
- if (!pParent || pParent->GetClassID() != XFA_ELEMENT_Variables)
+ if (!pParent || pParent->GetClassID() != XFA_Element::Variables)
return FALSE;
if (m_mapVariableToContext.GetValueAt(pScriptNode))
@@ -480,11 +480,11 @@ FX_BOOL CXFA_ScriptContext::QueryVariableValue(
const CFX_ByteStringC& szPropName,
CFXJSE_Value* pValue,
FX_BOOL bGetter) {
- if (!pScriptNode || pScriptNode->GetClassID() != XFA_ELEMENT_Script)
+ if (!pScriptNode || pScriptNode->GetClassID() != XFA_Element::Script)
return FALSE;
CXFA_Node* variablesNode = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent);
- if (!variablesNode || variablesNode->GetClassID() != XFA_ELEMENT_Variables)
+ if (!variablesNode || variablesNode->GetClassID() != XFA_Element::Variables)
return FALSE;
void* lpVariables = m_mapVariableToContext.GetValueAt(pScriptNode);
« no previous file with comments | « xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp ('k') | xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698