From 1d86501aa9ee49890fbb43db60333a42f947cd74 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 8 Nov 2017 18:01:31 +0000 Subject: Convert XFA_ATTRIBUTE to an enum class This CL converts the XFA_ATTRIBUTE enum to an enum class and fixes up various usages. Change-Id: I3dd17cc412d97eb212a65ce63bb9fa19605e1e91 Reviewed-on: https://pdfium-review.googlesource.com/18050 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/cfxjse_formcalc_context.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fxjs/cfxjse_formcalc_context.cpp') diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp index c8c78f43eb..55fab55722 100644 --- a/fxjs/cfxjse_formcalc_context.cpp +++ b/fxjs/cfxjse_formcalc_context.cpp @@ -5786,7 +5786,7 @@ void CFXJSE_FormCalcContext::GetObjectDefaultValue( return; } pNode->JSNode()->Script_Som_DefaultValue(pDefaultValue, false, - (XFA_ATTRIBUTE)-1); + XFA_Attribute::Unknown); } // static @@ -5796,7 +5796,8 @@ bool CFXJSE_FormCalcContext::SetObjectDefaultValue(CFXJSE_Value* pValue, if (!pNode) return false; - pNode->JSNode()->Script_Som_DefaultValue(hNewValue, true, (XFA_ATTRIBUTE)-1); + pNode->JSNode()->Script_Som_DefaultValue(hNewValue, true, + XFA_Attribute::Unknown); return true; } @@ -5882,7 +5883,7 @@ int32_t CFXJSE_FormCalcContext::ResolveObjects( if (bHasNoResolveName) { WideString wsName; if (CXFA_Node* pXFANode = pNode->AsNode()) - pXFANode->JSNode()->GetAttribute(XFA_ATTRIBUTE_Name, wsName, false); + pXFANode->JSNode()->GetAttribute(XFA_Attribute::Name, wsName, false); if (wsName.IsEmpty()) wsName = L"#" + pNode->GetClassName(); -- cgit v1.2.3