diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-14 18:34:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-14 18:34:43 +0000 |
commit | d1b1127cd452a173ec119587c3a6e137e27df6d7 (patch) | |
tree | 4fa719620920ad545ce2346904d253253659d4ab /xfa/fxfa/parser/cxfa_scriptdata.cpp | |
parent | a5b0e63b66e8bc8744677f4e5b8de2fe2c1b1a7b (diff) | |
download | pdfium-d1b1127cd452a173ec119587c3a6e137e27df6d7.tar.xz |
Cleanup const refs and some enums
This CL cleans up some const refs and some enum values from the previous
rename CLs.
Change-Id: Ifaa990c9c45485bb059e0bda0026093d0a2c0944
Reviewed-on: https://pdfium-review.googlesource.com/18230
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_scriptdata.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_scriptdata.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/cxfa_scriptdata.cpp b/xfa/fxfa/parser/cxfa_scriptdata.cpp index 1831046352..619dcc14b6 100644 --- a/xfa/fxfa/parser/cxfa_scriptdata.cpp +++ b/xfa/fxfa/parser/cxfa_scriptdata.cpp @@ -10,16 +10,15 @@ CXFA_ScriptData::CXFA_ScriptData(CXFA_Node* pNode) : CXFA_Data(pNode) {} -XFA_SCRIPTTYPE CXFA_ScriptData::GetContentType() { +XFA_ScriptDataType CXFA_ScriptData::GetContentType() { WideStringView cData; - if (m_pNode->JSNode()->TryCData(XFA_Attribute::ContentType, cData, false)) { - if (cData == L"application/x-javascript") - return XFA_SCRIPTTYPE_Javascript; - if (cData == L"application/x-formcalc") - return XFA_SCRIPTTYPE_Formcalc; - return XFA_SCRIPTTYPE_Unkown; - } - return XFA_SCRIPTTYPE_Formcalc; + if (!m_pNode->JSNode()->TryCData(XFA_Attribute::ContentType, cData, false)) + return XFA_ScriptDataType::Formcalc; + if (cData == L"application/x-javascript") + return XFA_ScriptDataType::Javascript; + if (cData == L"application/x-formcalc") + return XFA_ScriptDataType::Formcalc; + return XFA_ScriptDataType::Unknown; } int32_t CXFA_ScriptData::GetRunAt() { |