diff options
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() { |