summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_validatedata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_validatedata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_validatedata.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_validatedata.cpp b/xfa/fxfa/parser/cxfa_validatedata.cpp
index 8b3f539d48..dd45b5295b 100644
--- a/xfa/fxfa/parser/cxfa_validatedata.cpp
+++ b/xfa/fxfa/parser/cxfa_validatedata.cpp
@@ -24,11 +24,10 @@ XFA_ATTRIBUTEENUM CXFA_ValidateData::GetFormatTest() const {
}
void CXFA_ValidateData::SetNullTest(const WideString& wsValue) {
- const XFA_ATTRIBUTEENUMINFO* pInfo =
- XFA_GetAttributeEnumByName(wsValue.AsStringView());
+ pdfium::Optional<XFA_ATTRIBUTEENUM> item =
+ CXFA_Node::NameToAttributeEnum(wsValue.AsStringView());
m_pNode->JSNode()->SetEnum(XFA_Attribute::NullTest,
- pInfo ? pInfo->eName : XFA_ATTRIBUTEENUM_Disabled,
- false);
+ item ? *item : XFA_ATTRIBUTEENUM_Disabled, false);
}
XFA_ATTRIBUTEENUM CXFA_ValidateData::GetNullTest() const {