diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-21 22:02:20 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-21 22:02:20 +0000 |
commit | 307dfb406422f9589fcdb09039b4c31a9c5f6269 (patch) | |
tree | 7d176d1f37af77877cfb2714e5ea415f344ba9db /xfa/fxfa/cxfa_widgetacc.cpp | |
parent | 96d6f741b3c106ba0e48a05692910f64cf1e5e09 (diff) | |
download | pdfium-307dfb406422f9589fcdb09039b4c31a9c5f6269.tar.xz |
Cleanup CXFA_ScriptData
This CL cleans removes out params, makes methods const and moves the
XFA_ScriptDataType into CXFA_ScriptData.
Change-Id: I5a51a0eddc3608577a387472911000daa479af0f
Reviewed-on: https://pdfium-review.googlesource.com/19090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 816e2a2204..fcc1e69762 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -599,19 +599,18 @@ std::pair<int32_t, bool> CXFA_WidgetAcc::ExecuteBoolScript( if (scriptData.GetRunAt() == XFA_ATTRIBUTEENUM_Server) return {XFA_EVENTERROR_Disabled, false}; - WideString wsExpression; - scriptData.GetExpression(wsExpression); + WideString wsExpression = scriptData.GetExpression(); if (wsExpression.IsEmpty()) return {XFA_EVENTERROR_NotExist, false}; - XFA_ScriptDataType eScriptType = scriptData.GetContentType(); - if (eScriptType == XFA_ScriptDataType::Unknown) + CXFA_ScriptData::Type eScriptType = scriptData.GetContentType(); + if (eScriptType == CXFA_ScriptData::Type::Unknown) return {XFA_EVENTERROR_Success, false}; CXFA_FFDoc* pDoc = GetDoc(); CFXJSE_Engine* pContext = pDoc->GetXFADoc()->GetScriptContext(); pContext->SetEventParam(*pEventParam); - pContext->SetRunAtType((XFA_ATTRIBUTEENUM)scriptData.GetRunAt()); + pContext->SetRunAtType(scriptData.GetRunAt()); std::vector<CXFA_Node*> refNodes; if (pEventParam->m_eType == XFA_EVENT_InitCalculate || |