summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_validate.h3
2 files changed, 4 insertions, 15 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);
}
diff --git a/xfa/fxfa/parser/cxfa_validate.h b/xfa/fxfa/parser/cxfa_validate.h
index ce4ba647cc..ebe3eaee56 100644
--- a/xfa/fxfa/parser/cxfa_validate.h
+++ b/xfa/fxfa/parser/cxfa_validate.h
@@ -34,9 +34,6 @@ class CXFA_Validate : public CXFA_Data {
private:
void GetMessageText(WideString& wsMessage, const WideString& wsMessageType);
void SetMessageText(WideString& wsMessage, const WideString& wsMessageType);
- bool SetTestValue(int32_t iType,
- WideString& wsValue,
- XFA_ATTRIBUTEENUM eName);
};
#endif // XFA_FXFA_PARSER_CXFA_VALIDATE_H_