summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffnotify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffnotify.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffnotify.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp
index df28aac0c1..3cad913d0a 100644
--- a/xfa/fxfa/cxfa_ffnotify.cpp
+++ b/xfa/fxfa/cxfa_ffnotify.cpp
@@ -6,7 +6,6 @@
#include "xfa/fxfa/cxfa_ffnotify.h"
-#include "fxjs/cfxjse_value.h"
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffarc.h"
#include "xfa/fxfa/cxfa_ffbarcode.h"
@@ -208,25 +207,22 @@ bool CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem,
}
bool CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) {
- bool bRet = false;
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
if (!pDocView)
- return bRet;
+ return false;
CXFA_WidgetAcc* pWidgetAcc = ToWidgetAcc(pFormItem->GetWidgetData());
if (!pWidgetAcc)
- return bRet;
+ return false;
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Unknown;
- CFXJSE_Value* pRetValue = nullptr;
- int32_t iRet =
- pWidgetAcc->ExecuteScript(CXFA_Script(pScript), &EventParam, &pRetValue);
- if (iRet == XFA_EVENTERROR_Success && pRetValue) {
- bRet = pRetValue->ToBoolean();
- delete pRetValue;
- }
- return bRet;
+
+ int32_t iRet;
+ bool bRet;
+ std::tie(iRet, bRet) =
+ pWidgetAcc->ExecuteBoolScript(CXFA_Script(pScript), &EventParam);
+ return iRet == XFA_EVENTERROR_Success && bRet;
}
int32_t CXFA_FFNotify::ExecEventByDeepFirst(CXFA_Node* pFormNode,