summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-26 11:14:08 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 11:14:08 -0700
commit12a6b0c1bb3ab86a03a84464bed168995ae0d82a (patch)
tree03c381e1eb6afd47f14c76cc3f9b91641a603dff /xfa/fxfa/app
parentd3e354a43531eaed87e43d9ff2df4525186ea28d (diff)
downloadpdfium-12a6b0c1bb3ab86a03a84464bed168995ae0d82a.tar.xz
Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value*
This CL replaces FXJSE_HOBJECT and FXJSE_HVALUE with the concrete CFXJSE_Value* type. All variables are renamed to match. Review-Url: https://codereview.chromium.org/2012253002
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffdochandler.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp20
3 files changed, 16 insertions, 16 deletions
diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp
index 389e5ac6da..53ce9c0e26 100644
--- a/xfa/fxfa/app/xfa_ffdochandler.cpp
+++ b/xfa/fxfa/app/xfa_ffdochandler.cpp
@@ -15,7 +15,7 @@ CXFA_FFDocHandler::CXFA_FFDocHandler() {}
CXFA_FFDocHandler::~CXFA_FFDocHandler() {}
-FXJSE_HVALUE CXFA_FFDocHandler::GetXFAScriptObject(CXFA_FFDoc* hDoc) {
+CFXJSE_Value* CXFA_FFDocHandler::GetXFAScriptObject(CXFA_FFDoc* hDoc) {
CXFA_Document* pXFADoc = hDoc->GetXFADoc();
if (!pXFADoc)
return nullptr;
@@ -44,8 +44,8 @@ XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(CXFA_FFDoc* hDoc) {
FX_BOOL CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
XFA_SCRIPTTYPE eScriptType,
const CFX_WideStringC& wsScript,
- FXJSE_HVALUE hRetValue,
- FXJSE_HVALUE hThisObject) {
+ CFXJSE_Value* pRetValue,
+ CFXJSE_Value* pThisObject) {
CXFA_Document* pXFADoc = hDoc->GetXFADoc();
if (!pXFADoc)
return FALSE;
@@ -55,7 +55,7 @@ FX_BOOL CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
return FALSE;
return pScriptContext->RunScript(
- (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, hRetValue,
- hThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(hThisObject, nullptr)
+ (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, pRetValue,
+ pThisObject ? (CXFA_Object*)FXJSE_Value_ToObject(pThisObject, nullptr)
: nullptr);
}
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index e8fb4dd1dc..29da4860b3 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -201,7 +201,7 @@ FX_BOOL CXFA_FFNotify::RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) {
}
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Unknown;
- FXJSE_HVALUE pRetValue = NULL;
+ CFXJSE_Value* pRetValue = nullptr;
int32_t iRet =
pWidgetAcc->ExecuteScript(CXFA_Script(pScript), &EventParam, &pRetValue);
if (iRet == XFA_EVENTERROR_Success && pRetValue) {
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 2c84a7f9b7..1ba6c85804 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -366,7 +366,7 @@ int32_t CXFA_WidgetAcc::ProcessCalculate() {
void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate,
int32_t iRet,
- FXJSE_HVALUE pRetValue,
+ CFXJSE_Value* pRetValue,
FX_BOOL bVersionFlag) {
if (iRet == XFA_EVENTERROR_Success && pRetValue) {
if (FXJSE_Value_IsBoolean(pRetValue) && !FXJSE_Value_ToBoolean(pRetValue)) {
@@ -580,7 +580,7 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
FX_BOOL bStatus =
m_pDocView->GetLayoutStatus() < XFA_DOCVIEW_LAYOUTSTATUS_End;
int32_t iFormat = 0;
- FXJSE_HVALUE pRetValue = NULL;
+ CFXJSE_Value* pRetValue = nullptr;
int32_t iRet = XFA_EVENTERROR_NotExist;
CXFA_Script script = validate.GetScript();
if (script) {
@@ -616,7 +616,7 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
}
int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
CXFA_EventParam* pEventParam,
- FXJSE_HVALUE* pRetValue) {
+ CFXJSE_Value** pRetValue) {
static const uint32_t MAX_RECURSION_DEPTH = 2;
if (m_nRecursionDepth > MAX_RECURSION_DEPTH)
return XFA_EVENTERROR_Success;
@@ -645,21 +645,21 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
pEventParam->m_eType == XFA_EVENT_Calculate) {
pContext->SetNodesOfRunScript(&refNodes);
}
- FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime());
+ CFXJSE_Value* pTmpRetValue = FXJSE_Value_Create(pContext->GetRuntime());
++m_nRecursionDepth;
FX_BOOL bRet =
pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
- wsExpression.AsStringC(), hRetValue, m_pNode);
+ wsExpression.AsStringC(), pTmpRetValue, m_pNode);
--m_nRecursionDepth;
int32_t iRet = XFA_EVENTERROR_Error;
if (bRet) {
iRet = XFA_EVENTERROR_Success;
if (pEventParam->m_eType == XFA_EVENT_Calculate ||
pEventParam->m_eType == XFA_EVENT_InitCalculate) {
- if (!FXJSE_Value_IsUndefined(hRetValue)) {
- if (!FXJSE_Value_IsNull(hRetValue)) {
+ if (!FXJSE_Value_IsUndefined(pTmpRetValue)) {
+ if (!FXJSE_Value_IsNull(pTmpRetValue)) {
CFX_ByteString bsString;
- FXJSE_Value_ToUTF8String(hRetValue, bsString);
+ FXJSE_Value_ToUTF8String(pTmpRetValue, bsString);
pEventParam->m_wsResult =
CFX_WideString::FromUTF8(bsString.AsStringC());
}
@@ -695,9 +695,9 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script,
}
}
if (pRetValue) {
- *pRetValue = hRetValue;
+ *pRetValue = pTmpRetValue;
} else {
- FXJSE_Value_Release(hRetValue);
+ FXJSE_Value_Release(pTmpRetValue);
}
pContext->SetNodesOfRunScript(NULL);
return iRet;