summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-06 21:19:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-06 21:19:32 +0000
commitccaf638782c9ed16b72e26598ecf9ddec7f12c94 (patch)
tree159ce111616b5ab19cbcdf6df4dd8d45aae34236
parent05a23e93325063b0bc93f382d6de5864e0e71d0e (diff)
downloadpdfium-ccaf638782c9ed16b72e26598ecf9ddec7f12c94.tar.xz
Remove CXFA_Validate::SetTestValue
The method is called once, so fold into caller. Change-Id: I850e822969e203ce8f204ba2d8e5d99330b36e4b Reviewed-on: https://pdfium-review.googlesource.com/17855 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
-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_