summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_validate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_validate.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp
index 3b567c2e69..2f97a02a51 100644
--- a/xfa/fxfa/parser/cxfa_validate.cpp
+++ b/xfa/fxfa/parser/cxfa_validate.cpp
@@ -15,23 +15,15 @@ int32_t CXFA_Validate::GetFormatTest() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_FormatTest);
}
-bool CXFA_Validate::SetTestValue(int32_t iType,
- WideString& wsValue,
- XFA_ATTRIBUTEENUM eName) {
+bool CXFA_Validate::SetNullTest(WideString wsValue) {
const XFA_ATTRIBUTEENUMINFO* pInfo =
XFA_GetAttributeEnumByName(wsValue.AsStringView());
- if (pInfo)
- eName = pInfo->eName;
-
- m_pNode->JSNode()->SetEnum((XFA_ATTRIBUTE)iType, eName, false);
+ m_pNode->JSNode()->SetEnum(XFA_ATTRIBUTE_NullTest,
+ pInfo ? pInfo->eName : XFA_ATTRIBUTEENUM_Disabled,
+ false);
return true;
}
-bool CXFA_Validate::SetNullTest(WideString wsValue) {
- return SetTestValue(XFA_ATTRIBUTE_NullTest, wsValue,
- XFA_ATTRIBUTEENUM_Disabled);
-}
-
int32_t CXFA_Validate::GetNullTest() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_NullTest);
}