diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-06 21:19:32 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-06 21:19:32 +0000 |
commit | ccaf638782c9ed16b72e26598ecf9ddec7f12c94 (patch) | |
tree | 159ce111616b5ab19cbcdf6df4dd8d45aae34236 /xfa/fxfa/parser/cxfa_validate.cpp | |
parent | 05a23e93325063b0bc93f382d6de5864e0e71d0e (diff) | |
download | pdfium-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>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_validate.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_validate.cpp | 16 |
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); } |