summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/xfa_object.h132
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp400
-rw-r--r--xfa/fxfa/parser/xfa_script.h23
-rw-r--r--xfa/fxfa/parser/xfa_script_datawindow.cpp8
-rw-r--r--xfa/fxfa/parser/xfa_script_datawindow.h8
-rw-r--r--xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp116
-rw-r--r--xfa/fxfa/parser/xfa_script_eventpseudomodel.h34
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp146
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.h30
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp229
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.h42
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp62
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.h2
-rw-r--r--xfa/fxfa/parser/xfa_script_resolveprocessor.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp18
15 files changed, 629 insertions, 623 deletions
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index f6267b5998..28d4712e46 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -80,7 +80,7 @@ class CXFA_Object {
XFA_ELEMENT GetClassID() const;
void GetClassName(CFX_WideStringC& wsName) const;
uint32_t GetClassHashCode() const;
- void Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
+ void Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void ThrowScriptErrorMessage(int32_t iStringID, ...);
@@ -307,29 +307,29 @@ class CXFA_Node : public CXFA_Object {
CXFA_Node* GetOccurNode();
void Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments);
void Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments);
- void Script_Som_ResolveNodeList(FXJSE_HVALUE hValue,
+ void Script_Som_ResolveNodeList(CFXJSE_Value* pValue,
CFX_WideString wsExpression,
uint32_t dwFlag,
CXFA_Node* refNode = NULL);
- void Script_TreeClass_All(FXJSE_HVALUE hValue,
+ void Script_TreeClass_All(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
+ void Script_TreeClass_Nodes(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_ClassAll(FXJSE_HVALUE hValue,
+ void Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Parent(FXJSE_HVALUE hValue,
+ void Script_TreeClass_Parent(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_Index(FXJSE_HVALUE hValue,
+ void Script_TreeClass_Index(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_ClassIndex(FXJSE_HVALUE hValue,
+ void Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_TreeClass_SomExpression(FXJSE_HVALUE hValue,
+ void Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments);
@@ -343,19 +343,19 @@ class CXFA_Node : public CXFA_Object {
void Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments);
void Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments);
void Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments);
- void Script_NodeClass_Ns(FXJSE_HVALUE hValue,
+ void Script_NodeClass_Ns(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_Model(FXJSE_HVALUE hValue,
+ void Script_NodeClass_Model(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_IsContainer(FXJSE_HVALUE hValue,
+ void Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_IsNull(FXJSE_HVALUE hValue,
+ void Script_NodeClass_IsNull(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue,
+ void Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ContainerClass_GetDelta(CFXJSE_Arguments* pArguments);
@@ -363,104 +363,104 @@ class CXFA_Node : public CXFA_Object {
void Script_ModelClass_ClearErrorList(CFXJSE_Arguments* pArguments);
void Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments);
void Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments);
- void Script_ModelClass_Context(FXJSE_HVALUE hValue,
+ void Script_ModelClass_Context(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_ModelClass_AliasNode(FXJSE_HVALUE hValue,
+ void Script_ModelClass_AliasNode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments);
void Script_Delta_Restore(CFXJSE_Arguments* pArguments);
- void Script_Delta_CurrentValue(FXJSE_HVALUE hValue,
+ void Script_Delta_CurrentValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Delta_SavedValue(FXJSE_HVALUE hValue,
+ void Script_Delta_SavedValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Delta_Target(FXJSE_HVALUE hValue,
+ void Script_Delta_Target(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Attribute_SendAttributeChangeMessage(XFA_ATTRIBUTE eAttribute,
FX_BOOL bScriptModify);
- void Script_Attribute_Integer(FXJSE_HVALUE hValue,
+ void Script_Attribute_Integer(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue,
+ void Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_BOOL(FXJSE_HVALUE hValue,
+ void Script_Attribute_BOOL(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_BOOLRead(FXJSE_HVALUE hValue,
+ void Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_String(FXJSE_HVALUE hValue,
+ void Script_Attribute_String(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Attribute_StringRead(FXJSE_HVALUE hValue,
+ void Script_Attribute_StringRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_ValidationMessage(FXJSE_HVALUE hValue,
+ void Script_Som_ValidationMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_Length(FXJSE_HVALUE hValue,
+ void Script_Field_Length(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_DefaultValue(FXJSE_HVALUE hValue,
+ void Script_Som_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue,
+ void Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Boolean_Value(FXJSE_HVALUE hValue,
+ void Script_Boolean_Value(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_Message(FXJSE_HVALUE hValue,
+ void Script_Som_Message(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_SOM_MESSAGETYPE iMessageType);
- void Script_Som_BorderColor(FXJSE_HVALUE hValue,
+ void Script_Som_BorderColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_BorderWidth(FXJSE_HVALUE hValue,
+ void Script_Som_BorderWidth(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_FillColor(FXJSE_HVALUE hValue,
+ void Script_Som_FillColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_DataNode(FXJSE_HVALUE hValue,
+ void Script_Som_DataNode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_FontColor(FXJSE_HVALUE hValue,
+ void Script_Som_FontColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_Mandatory(FXJSE_HVALUE hValue,
+ void Script_Som_Mandatory(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_MandatoryMessage(FXJSE_HVALUE hValue,
+ void Script_Som_MandatoryMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Som_InstanceIndex(FXJSE_HVALUE hValue,
+ void Script_Som_InstanceIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
+ void Script_Draw_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_DefaultValue(FXJSE_HVALUE hValue,
+ void Script_Field_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_EditValue(FXJSE_HVALUE hValue,
+ void Script_Field_EditValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_FormatMessage(FXJSE_HVALUE hValue,
+ void Script_Field_FormatMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_FormattedValue(FXJSE_HVALUE hValue,
+ void Script_Field_FormattedValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_ParentSubform(FXJSE_HVALUE hValue,
+ void Script_Field_ParentSubform(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Field_SelectedIndex(FXJSE_HVALUE hValue,
+ void Script_Field_SelectedIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Field_ClearItems(CFXJSE_Arguments* pArguments);
@@ -476,13 +476,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Field_SetItemState(CFXJSE_Arguments* pArguments);
void Script_Field_AddItem(CFXJSE_Arguments* pArguments);
void Script_Field_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue,
+ void Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_ExclGroup_ErrorText(FXJSE_HVALUE hValue,
+ void Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_ExclGroup_Transient(FXJSE_HVALUE hValue,
+ void Script_ExclGroup_Transient(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments);
@@ -490,10 +490,10 @@ class CXFA_Node : public CXFA_Object {
void Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments);
void Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments);
void Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Subform_InstanceManager(FXJSE_HVALUE hValue,
+ void Script_Subform_InstanceManager(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Subform_Locale(FXJSE_HVALUE hValue,
+ void Script_Subform_Locale(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments);
@@ -511,13 +511,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments);
void Script_Template_ExecValidate(CFXJSE_Arguments* pArguments);
void Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments);
- void Script_InstanceManager_Count(FXJSE_HVALUE hValue,
+ void Script_InstanceManager_Count(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_InstanceManager_Max(FXJSE_HVALUE hValue,
+ void Script_InstanceManager_Max(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_InstanceManager_Min(FXJSE_HVALUE hValue,
+ void Script_InstanceManager_Min(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_InstanceManager_MoveInstance(CFXJSE_Arguments* pArguments);
@@ -527,10 +527,10 @@ class CXFA_Node : public CXFA_Object {
void Script_InstanceManager_InsertInstance(CFXJSE_Arguments* pArguments);
int32_t InstanceManager_SetInstances(int32_t iCount);
int32_t InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom);
- void Script_Occur_Max(FXJSE_HVALUE hValue,
+ void Script_Occur_Max(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Occur_Min(FXJSE_HVALUE hValue,
+ void Script_Occur_Min(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Desc_Metadata(CFXJSE_Arguments* pArguments);
@@ -540,13 +540,13 @@ class CXFA_Node : public CXFA_Object {
void Script_Form_Recalculate(CFXJSE_Arguments* pArguments);
void Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments);
void Script_Form_ExecValidate(CFXJSE_Arguments* pArguments);
- void Script_Form_Checksum(FXJSE_HVALUE hValue,
+ void Script_Form_Checksum(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments);
void Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments);
void Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments);
- void Script_Packet_Content(FXJSE_HVALUE hValue,
+ void Script_Packet_Content(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
void Script_Source_Next(CFXJSE_Arguments* pArguments);
@@ -566,25 +566,25 @@ class CXFA_Node : public CXFA_Object {
void Script_Source_Close(CFXJSE_Arguments* pArguments);
void Script_Source_Last(CFXJSE_Arguments* pArguments);
void Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments);
- void Script_Source_Db(FXJSE_HVALUE hValue,
+ void Script_Source_Db(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Xfa_This(FXJSE_HVALUE hValue,
+ void Script_Xfa_This(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Handler_Version(FXJSE_HVALUE hValue,
+ void Script_Handler_Version(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_SubmitFormat_Mode(FXJSE_HVALUE hValue,
+ void Script_SubmitFormat_Mode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Extras_Type(FXJSE_HVALUE hValue,
+ void Script_Extras_Type(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Encrypt_Format(FXJSE_HVALUE hValue,
+ void Script_Encrypt_Format(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_Script_Stateless(FXJSE_HVALUE hValue,
+ void Script_Script_Stateless(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
@@ -695,7 +695,7 @@ class CXFA_NodeList : public CXFA_Object {
void Script_ListClass_Item(CFXJSE_Arguments* pArguments);
void Script_TreelistClass_NamedItem(CFXJSE_Arguments* pArguments);
- void Script_ListClass_Length(FXJSE_HVALUE hValue,
+ void Script_ListClass_Length(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
};
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 1d1a5a2290..6ee95eb8aa 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -52,14 +52,14 @@ XFA_ELEMENT CXFA_Object::GetClassID() const {
ASSERT(FALSE);
return (XFA_ELEMENT)0;
}
-void CXFA_Object::Script_ObjectClass_ClassName(FXJSE_HVALUE hValue,
+void CXFA_Object::Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CFX_WideStringC className;
GetClassName(className);
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(className.c_str(), className.GetLength()).AsStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
@@ -654,20 +654,20 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
if (iRet < 1) {
return FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
- FXJSE_HVALUE hValue = NULL;
+ CFXJSE_Value* pValue = nullptr;
if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
CXFA_Object* pNode = resoveNodeRS.nodes[0];
- hValue = pScriptContext->GetJSValueFromMap(pNode);
- FXJSE_Value_Set(pArguments->GetReturnValue(), hValue);
+ pValue = pScriptContext->GetJSValueFromMap(pNode);
+ FXJSE_Value_Set(pArguments->GetReturnValue(), pValue);
} else {
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
resoveNodeRS.pScriptAttribute;
if (lpAttributeInfo && lpAttributeInfo->eValueType == XFA_SCRIPT_Object) {
- hValue = FXJSE_Value_Create(pScriptContext->GetRuntime());
+ pValue = FXJSE_Value_Create(pScriptContext->GetRuntime());
(resoveNodeRS.nodes[0]->*(lpAttributeInfo->lpfnCallback))(
- hValue, FALSE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
- FXJSE_Value_Set(pArguments->GetReturnValue(), hValue);
- FXJSE_Value_Release(hValue);
+ pValue, FALSE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ FXJSE_Value_Set(pArguments->GetReturnValue(), pValue);
+ FXJSE_Value_Release(pValue);
} else {
FXJSE_Value_SetNull(pArguments->GetReturnValue());
}
@@ -682,8 +682,8 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) {
}
CFX_WideString wsExpression =
CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (!hValue) {
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (!pValue) {
return;
}
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes |
@@ -693,9 +693,9 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) {
if (refNode->GetClassID() == XFA_ELEMENT_Xfa) {
refNode = ToNode(m_pDocument->GetScriptContext()->GetThisObject());
}
- Script_Som_ResolveNodeList(hValue, wsExpression, dwFlag, refNode);
+ Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag, refNode);
}
-void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_ResolveNodeList(CFXJSE_Value* pValue,
CFX_WideString wsExpression,
uint32_t dwFlag,
CXFA_Node* refNode) {
@@ -716,20 +716,20 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue,
pNodeList->Append(resoveNodeRS.nodes[i]->AsNode());
}
} else {
- CXFA_HVALUEArray hValueArray(pScriptContext->GetRuntime());
- if (resoveNodeRS.GetAttributeResult(hValueArray) > 0) {
+ CXFA_ValueArray valueArray(pScriptContext->GetRuntime());
+ if (resoveNodeRS.GetAttributeResult(valueArray) > 0) {
CXFA_ObjArray objectArray;
- hValueArray.GetAttributeObject(objectArray);
+ valueArray.GetAttributeObject(objectArray);
for (int32_t i = 0; i < objectArray.GetSize(); i++) {
if (objectArray[i]->IsNode())
pNodeList->Append(objectArray[i]->AsNode());
}
}
}
- FXJSE_Value_SetObject(hValue, (CXFA_Object*)pNodeList,
+ FXJSE_Value_SetObject(pValue, (CXFA_Object*)pNodeList,
pScriptContext->GetJseNormalClass());
}
-void CXFA_Node::Script_TreeClass_All(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -739,10 +739,10 @@ void CXFA_Node::Script_TreeClass_All(FXJSE_HVALUE hValue,
CFX_WideString wsName;
GetAttribute(XFA_ATTRIBUTE_Name, wsName);
CFX_WideString wsExpression = wsName + FX_WSTRC(L"[*]");
- Script_Som_ResolveNodeList(hValue, wsExpression, dwFlag);
+ Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag);
}
}
-void CXFA_Node::Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_Nodes(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
@@ -759,11 +759,11 @@ void CXFA_Node::Script_TreeClass_Nodes(FXJSE_HVALUE hValue,
FX_UTF8Encode(wsMessage.c_str(), wsMessage.GetLength()).AsStringC());
} else {
CXFA_AttachNodeList* pNodeList = new CXFA_AttachNodeList(m_pDocument, this);
- FXJSE_Value_SetObject(hValue, (CXFA_Object*)pNodeList,
+ FXJSE_Value_SetObject(pValue, (CXFA_Object*)pNodeList,
pScriptContext->GetJseNormalClass());
}
}
-void CXFA_Node::Script_TreeClass_ClassAll(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -773,10 +773,10 @@ void CXFA_Node::Script_TreeClass_ClassAll(FXJSE_HVALUE hValue,
CFX_WideStringC wsName;
GetClassName(wsName);
CFX_WideString wsExpression = FX_WSTRC(L"#") + wsName + FX_WSTRC(L"[*]");
- Script_Som_ResolveNodeList(hValue, wsExpression, dwFlag);
+ Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag);
}
}
-void CXFA_Node::Script_TreeClass_Parent(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_Parent(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -785,31 +785,31 @@ void CXFA_Node::Script_TreeClass_Parent(FXJSE_HVALUE hValue,
CXFA_Node* pParent = GetNodeItem(XFA_NODEITEM_Parent);
if (pParent) {
FXJSE_Value_Set(
- hValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(pParent));
+ pValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(pParent));
} else {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
}
}
}
-void CXFA_Node::Script_TreeClass_Index(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_Index(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
- FXJSE_Value_SetInteger(hValue, GetNodeSameNameIndex());
+ FXJSE_Value_SetInteger(pValue, GetNodeSameNameIndex());
}
}
-void CXFA_Node::Script_TreeClass_ClassIndex(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
- FXJSE_Value_SetInteger(hValue, GetNodeSameClassIndex());
+ FXJSE_Value_SetInteger(pValue, GetNodeSameClassIndex());
}
}
-void CXFA_Node::Script_TreeClass_SomExpression(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -817,7 +817,7 @@ void CXFA_Node::Script_TreeClass_SomExpression(FXJSE_HVALUE hValue,
} else {
CFX_WideString wsSOMExpression;
GetSOMExpression(wsSOMExpression);
- FXJSE_Value_SetUTF8String(hValue,
+ FXJSE_Value_SetUTF8String(pValue,
FX_UTF8Encode(wsSOMExpression).AsStringC());
}
}
@@ -876,9 +876,9 @@ void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) {
CFX_WideString::FromUTF8(pArguments->GetUTF8String(0).AsStringC());
CFX_WideString wsValue;
GetAttribute(wsExpression.AsStringC(), wsValue);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments) {
@@ -939,9 +939,9 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
bHas = !!m_pParent->GetProperty(iIndex, pElementInfo->eName);
}
}
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue)
- FXJSE_Value_SetBoolean(hValue, bHas);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue)
+ FXJSE_Value_SetBoolean(pValue, bHas);
}
void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
@@ -1155,7 +1155,7 @@ void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) {
wsName = CFX_WideString::FromUTF8(bsName.AsStringC());
}
}
-void CXFA_Node::Script_NodeClass_Ns(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_NodeClass_Ns(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -1163,43 +1163,43 @@ void CXFA_Node::Script_NodeClass_Ns(FXJSE_HVALUE hValue,
} else {
CFX_WideString wsNameSpace;
TryNamespace(wsNameSpace);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsNameSpace).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsNameSpace).AsStringC());
}
}
-void CXFA_Node::Script_NodeClass_Model(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_NodeClass_Model(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
- FXJSE_Value_Set(hValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(
+ FXJSE_Value_Set(pValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(
GetModelNode()));
}
}
-void CXFA_Node::Script_NodeClass_IsContainer(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
- FXJSE_Value_SetBoolean(hValue, IsContainerNode());
+ FXJSE_Value_SetBoolean(pValue, IsContainerNode());
}
}
-void CXFA_Node::Script_NodeClass_IsNull(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_NodeClass_IsNull(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
if (GetClassID() == XFA_ELEMENT_Subform) {
- FXJSE_Value_SetBoolean(hValue, FALSE);
+ FXJSE_Value_SetBoolean(pValue, FALSE);
return;
}
CFX_WideString strValue;
- FXJSE_Value_SetBoolean(hValue, !TryContent(strValue) || strValue.IsEmpty());
+ FXJSE_Value_SetBoolean(pValue, !TryContent(strValue) || strValue.IsEmpty());
}
}
-void CXFA_Node::Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -1209,7 +1209,7 @@ void CXFA_Node::Script_NodeClass_OneOfChild(FXJSE_HVALUE hValue,
int32_t iSize = GetNodeList(properts, XFA_NODEFILTER_OneOfProperty);
if (iSize > 0) {
FXJSE_Value_Set(
- hValue,
+ pValue,
m_pDocument->GetScriptContext()->GetJSValueFromMap(properts[0]));
}
}
@@ -1239,49 +1239,49 @@ void CXFA_Node::Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments) {
}
CFX_WideString wsNodeNameSpace;
TryNamespace(wsNodeNameSpace);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetBoolean(hValue, wsNodeNameSpace == wsNameSpace);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetBoolean(pValue, wsNodeNameSpace == wsNameSpace);
}
}
-void CXFA_Node::Script_ModelClass_Context(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_ModelClass_Context(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_ModelClass_AliasNode(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_ModelClass_AliasNode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Attribute_Integer(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_Integer(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- SetInteger(eAttribute, FXJSE_Value_ToInteger(hValue), true);
+ SetInteger(eAttribute, FXJSE_Value_ToInteger(pValue), true);
} else {
- FXJSE_Value_SetInteger(hValue, GetInteger(eAttribute));
+ FXJSE_Value_SetInteger(pValue, GetInteger(eAttribute));
}
}
-void CXFA_Node::Script_Attribute_IntegerRead(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
- FXJSE_Value_SetInteger(hValue, GetInteger(eAttribute));
+ FXJSE_Value_SetInteger(pValue, GetInteger(eAttribute));
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Node::Script_Attribute_BOOL(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_BOOL(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- SetBoolean(eAttribute, FXJSE_Value_ToBoolean(hValue), true);
+ SetBoolean(eAttribute, FXJSE_Value_ToBoolean(pValue), true);
} else {
- FXJSE_Value_SetUTF8String(hValue, GetBoolean(eAttribute) ? "1" : "0");
+ FXJSE_Value_SetUTF8String(pValue, GetBoolean(eAttribute) ? "1" : "0");
}
}
-void CXFA_Node::Script_Attribute_BOOLRead(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
- FXJSE_Value_SetUTF8String(hValue, GetBoolean(eAttribute) ? "1" : "0");
+ FXJSE_Value_SetUTF8String(pValue, GetBoolean(eAttribute) ? "1" : "0");
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
@@ -1441,12 +1441,12 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage(
}
}
-void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_String(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString szValue;
- FXJSE_Value_ToUTF8String(hValue, szValue);
+ FXJSE_Value_ToUTF8String(pValue, szValue);
CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue.AsStringC());
SetAttribute(eAttribute, wsValue.AsStringC(), true);
if (eAttribute == XFA_ATTRIBUTE_Use && GetClassID() == XFA_ELEMENT_Desc) {
@@ -1503,18 +1503,18 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
GetAttribute(eAttribute, wsValue);
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(wsValue.c_str(), wsValue.GetLength()).AsStringC());
}
}
-void CXFA_Node::Script_Attribute_StringRead(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Attribute_StringRead(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CFX_WideString wsValue;
GetAttribute(eAttribute, wsValue);
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(wsValue.c_str(), wsValue.GetLength()).AsStringC());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
@@ -1535,16 +1535,16 @@ void CXFA_Node::Script_Delta_Restore(CFXJSE_Arguments* pArguments) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"restore");
}
}
-void CXFA_Node::Script_Delta_CurrentValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Delta_CurrentValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Delta_SavedValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Delta_SavedValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Delta_Target(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Delta_Target(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Som_Message(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_Message(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_SOM_MESSAGETYPE iMessageType) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -1559,7 +1559,7 @@ void CXFA_Node::Script_Som_Message(FXJSE_HVALUE hValue,
}
if (bSetting) {
CFX_ByteString bsMessage;
- FXJSE_Value_ToUTF8String(hValue, bsMessage);
+ FXJSE_Value_ToUTF8String(pValue, bsMessage);
switch (iMessageType) {
case XFA_SOM_ValidationMessage:
validate.SetScriptMessageText(
@@ -1598,15 +1598,15 @@ void CXFA_Node::Script_Som_Message(FXJSE_HVALUE hValue,
default:
break;
}
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsMessage).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsMessage).AsStringC());
}
}
-void CXFA_Node::Script_Som_ValidationMessage(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_ValidationMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_Som_Message(hValue, bSetting, XFA_SOM_ValidationMessage);
+ Script_Som_Message(pValue, bSetting, XFA_SOM_ValidationMessage);
}
-void CXFA_Node::Script_Field_Length(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_Length(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -1614,30 +1614,30 @@ void CXFA_Node::Script_Field_Length(FXJSE_HVALUE hValue,
} else {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
- FXJSE_Value_SetInteger(hValue, 0);
+ FXJSE_Value_SetInteger(pValue, 0);
return;
}
- FXJSE_Value_SetInteger(hValue, pWidgetData->CountChoiceListItems(TRUE));
+ FXJSE_Value_SetInteger(pValue, pWidgetData->CountChoiceListItems(TRUE));
}
}
-void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
XFA_ELEMENT classID = GetClassID();
if (classID == XFA_ELEMENT_Field) {
- Script_Field_DefaultValue(hValue, bSetting, eAttribute);
+ Script_Field_DefaultValue(pValue, bSetting, eAttribute);
return;
} else if (classID == XFA_ELEMENT_Draw) {
- Script_Draw_DefaultValue(hValue, bSetting, eAttribute);
+ Script_Draw_DefaultValue(pValue, bSetting, eAttribute);
return;
} else if (classID == XFA_ELEMENT_Boolean) {
- Script_Boolean_Value(hValue, bSetting, eAttribute);
+ Script_Boolean_Value(pValue, bSetting, eAttribute);
return;
}
if (bSetting) {
CFX_ByteString newValue;
- if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
- FXJSE_Value_ToUTF8String(hValue, newValue);
+ if (!(FXJSE_Value_IsNull(pValue) || FXJSE_Value_IsUndefined(pValue))) {
+ FXJSE_Value_ToUTF8String(pValue, newValue);
}
CFX_WideString wsNewValue = CFX_WideString::FromUTF8(newValue.AsStringC());
CFX_WideString wsFormatValue(wsNewValue);
@@ -1672,20 +1672,20 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue,
CFX_WideString content = GetScriptContent(TRUE);
if (content.IsEmpty() && classID != XFA_ELEMENT_Text &&
classID != XFA_ELEMENT_SubmitUrl) {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
} else if (classID == XFA_ELEMENT_Integer) {
- FXJSE_Value_SetInteger(hValue, FXSYS_wtoi(content.c_str()));
+ FXJSE_Value_SetInteger(pValue, FXSYS_wtoi(content.c_str()));
} else if (classID == XFA_ELEMENT_Float || classID == XFA_ELEMENT_Decimal) {
CFX_Decimal decimal(content.AsStringC());
- FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
+ FXJSE_Value_SetFloat(pValue, (FX_FLOAT)(double)decimal);
} else {
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
}
}
}
-void CXFA_Node::Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -1694,20 +1694,20 @@ void CXFA_Node::Script_Som_DefaultValue_Read(FXJSE_HVALUE hValue,
}
CFX_WideString content = GetScriptContent(TRUE);
if (content.IsEmpty()) {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
} else {
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
}
}
-void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Boolean_Value(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString newValue;
- if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
- FXJSE_Value_ToUTF8String(hValue, newValue);
+ if (!(FXJSE_Value_IsNull(pValue) || FXJSE_Value_IsUndefined(pValue))) {
+ FXJSE_Value_ToUTF8String(pValue, newValue);
}
int32_t iValue = FXSYS_atoi(newValue.c_str());
CFX_WideString wsNewValue(iValue == 0 ? L"0" : L"1");
@@ -1719,7 +1719,7 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue,
SetScriptContent(wsNewValue, wsFormatValue, true, TRUE);
} else {
CFX_WideString wsValue = GetScriptContent(TRUE);
- FXJSE_Value_SetBoolean(hValue, wsValue == FX_WSTRC(L"1"));
+ FXJSE_Value_SetBoolean(pValue, wsValue == FX_WSTRC(L"1"));
}
}
struct XFA_ExecEventParaInfo {
@@ -1809,7 +1809,7 @@ void XFA_STRING_TO_RGB(CFX_WideString& strRGB,
}
}
}
-void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_BorderColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -1821,7 +1821,7 @@ void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue,
CFX_WideString strColor;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
strColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r = 0, g = 0, b = 0;
XFA_STRING_TO_RGB(strColor, r, g, b);
@@ -1836,10 +1836,10 @@ void CXFA_Node::Script_Som_BorderColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
strColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(strColor).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(strColor).AsStringC());
}
}
-void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_BorderWidth(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -1851,7 +1851,7 @@ void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue,
CFX_WideString wsThickness;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsThickness = CFX_WideString::FromUTF8(bsValue.AsStringC());
for (int32_t i = 0; i < iSize; ++i) {
CXFA_Edge edge = border.GetEdge(i);
@@ -1862,10 +1862,10 @@ void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue,
CXFA_Edge edge = border.GetEdge(0);
CXFA_Measurement thickness = edge.GetMSThickness();
thickness.ToString(wsThickness);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsThickness).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsThickness).AsStringC());
}
}
-void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_FillColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -1881,7 +1881,7 @@ void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
CFX_WideString wsColor;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
@@ -1892,36 +1892,36 @@ void CXFA_Node::Script_Som_FillColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsColor).AsStringC());
}
}
-void CXFA_Node::Script_Som_DataNode(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_DataNode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CXFA_Node* pDataNode = GetBindData();
if (pDataNode) {
FXJSE_Value_Set(
- hValue,
+ pValue,
m_pDocument->GetScriptContext()->GetJSValueFromMap(pDataNode));
} else {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
}
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Node::Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- if (FXJSE_Value_IsUTF8String(hValue)) {
+ if (FXJSE_Value_IsUTF8String(pValue)) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
ASSERT(pWidgetData);
XFA_ELEMENT uiType = pWidgetData->GetUIType();
if (uiType == XFA_ELEMENT_Text) {
CFX_ByteString newValue;
- FXJSE_Value_ToUTF8String(hValue, newValue);
+ FXJSE_Value_ToUTF8String(pValue, newValue);
CFX_WideString wsNewValue =
CFX_WideString::FromUTF8(newValue.AsStringC());
CFX_WideString wsFormatValue(wsNewValue);
@@ -1932,15 +1932,15 @@ void CXFA_Node::Script_Draw_DefaultValue(FXJSE_HVALUE hValue,
} else {
CFX_WideString content = GetScriptContent(TRUE);
if (content.IsEmpty()) {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
} else {
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
}
}
}
-void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -1948,7 +1948,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
return;
}
if (bSetting) {
- if (FXJSE_Value_IsNull(hValue)) {
+ if (FXJSE_Value_IsNull(pValue)) {
pWidgetData->m_bPreNull = pWidgetData->m_bIsNull;
pWidgetData->m_bIsNull = TRUE;
} else {
@@ -1956,8 +1956,8 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
pWidgetData->m_bIsNull = FALSE;
}
CFX_ByteString newValue;
- if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
- FXJSE_Value_ToUTF8String(hValue, newValue);
+ if (!(FXJSE_Value_IsNull(pValue) || FXJSE_Value_IsUndefined(pValue))) {
+ FXJSE_Value_ToUTF8String(pValue, newValue);
}
CFX_WideString wsNewText = CFX_WideString::FromUTF8(newValue.AsStringC());
CXFA_Node* pUIChild = pWidgetData->GetUIChild();
@@ -1978,7 +1978,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
} else {
CFX_WideString content = GetScriptContent(TRUE);
if (content.IsEmpty()) {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
} else {
CXFA_Node* pUIChild = pWidgetData->GetUIChild();
XFA_ELEMENT eUI = pUIChild->GetClassID();
@@ -1988,29 +1988,29 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue,
if (eUI == XFA_ELEMENT_NumericEdit &&
(pNode->GetInteger(XFA_ATTRIBUTE_FracDigits) == -1)) {
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
} else {
CFX_Decimal decimal(content.AsStringC());
- FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
+ FXJSE_Value_SetFloat(pValue, (FX_FLOAT)(double)decimal);
}
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Integer) {
- FXJSE_Value_SetInteger(hValue, FXSYS_wtoi(content.c_str()));
+ FXJSE_Value_SetInteger(pValue, FXSYS_wtoi(content.c_str()));
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Boolean) {
- FXJSE_Value_SetBoolean(hValue,
+ FXJSE_Value_SetBoolean(pValue,
FXSYS_wtoi(content.c_str()) == 0 ? FALSE : TRUE);
} else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Float) {
CFX_Decimal decimal(content.AsStringC());
- FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal);
+ FXJSE_Value_SetFloat(pValue, (FX_FLOAT)(double)decimal);
} else {
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC());
}
}
}
}
-void CXFA_Node::Script_Field_EditValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_EditValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2020,15 +2020,15 @@ void CXFA_Node::Script_Field_EditValue(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
pWidgetData->SetValue(wsValue, XFA_VALUEPICTURE_Edit);
} else {
pWidgetData->GetValue(wsValue, XFA_VALUEPICTURE_Edit);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
-void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_FontColor(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2043,7 +2043,7 @@ void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
CFX_WideString wsColor;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsColor = CFX_WideString::FromUTF8(bsValue.AsStringC());
int32_t r, g, b;
XFA_STRING_TO_RGB(wsColor, r, g, b);
@@ -2054,15 +2054,15 @@ void CXFA_Node::Script_Som_FontColor(FXJSE_HVALUE hValue,
int32_t a, r, g, b;
ArgbDecode(color, a, r, g, b);
wsColor.Format(L"%d,%d,%d", r, g, b);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsColor).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsColor).AsStringC());
}
}
-void CXFA_Node::Script_Field_FormatMessage(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_FormatMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_Som_Message(hValue, bSetting, XFA_SOM_FormatMessage);
+ Script_Som_Message(pValue, bSetting, XFA_SOM_FormatMessage);
}
-void CXFA_Node::Script_Field_FormattedValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_FormattedValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2072,15 +2072,15 @@ void CXFA_Node::Script_Field_FormattedValue(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
pWidgetData->SetValue(wsValue, XFA_VALUEPICTURE_Display);
} else {
pWidgetData->GetValue(wsValue, XFA_VALUEPICTURE_Display);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
-void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_Mandatory(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2091,7 +2091,7 @@ void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
CFX_WideString wsValue;
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
validate.SetNullTest(wsValue);
} else {
@@ -2101,24 +2101,24 @@ void CXFA_Node::Script_Som_Mandatory(FXJSE_HVALUE hValue,
if (pInfo) {
wsValue = pInfo->pName;
}
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
-void CXFA_Node::Script_Som_MandatoryMessage(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_MandatoryMessage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_Som_Message(hValue, bSetting, XFA_SOM_MandatoryMessage);
+ Script_Som_Message(pValue, bSetting, XFA_SOM_MandatoryMessage);
}
-void CXFA_Node::Script_Field_ParentSubform(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_ParentSubform(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
} else {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
}
}
-void CXFA_Node::Script_Field_SelectedIndex(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Field_SelectedIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2126,14 +2126,14 @@ void CXFA_Node::Script_Field_SelectedIndex(FXJSE_HVALUE hValue,
return;
}
if (bSetting) {
- int32_t iIndex = FXJSE_Value_ToInteger(hValue);
+ int32_t iIndex = FXJSE_Value_ToInteger(pValue);
if (iIndex == -1) {
pWidgetData->ClearAllSelections();
return;
}
pWidgetData->SetItemState(iIndex, TRUE, TRUE, TRUE);
} else {
- FXJSE_Value_SetInteger(hValue, pWidgetData->GetSelectedItem());
+ FXJSE_Value_SetInteger(pValue, pWidgetData->GetSelectedItem());
}
}
void CXFA_Node::Script_Field_ClearItems(CFXJSE_Arguments* pArguments) {
@@ -2183,9 +2183,9 @@ void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments) {
}
int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bValue = pWidgetData->DeleteItem(iIndex, TRUE, TRUE);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetBoolean(hValue, bValue);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetBoolean(pValue, bValue);
}
}
void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments) {
@@ -2228,9 +2228,9 @@ void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments) {
CFX_WideString wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
CFX_WideString wsBoundValue;
pWidgetData->GetItemValue(wsValue.AsStringC(), wsBoundValue);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsBoundValue).AsStringC());
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsBoundValue).AsStringC());
}
}
void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments) {
@@ -2246,9 +2246,9 @@ void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments) {
}
int32_t iIndex = pArguments->GetInt32(0);
FX_BOOL bValue = pWidgetData->GetItemState(iIndex);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetBoolean(hValue, bValue);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetBoolean(pValue, bValue);
}
}
void CXFA_Node::Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments) {
@@ -2351,7 +2351,7 @@ void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) {
L"execValidate");
}
}
-void CXFA_Node::Script_ExclGroup_ErrorText(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
@@ -2359,7 +2359,7 @@ void CXFA_Node::Script_ExclGroup_ErrorText(FXJSE_HVALUE hValue,
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2368,20 +2368,20 @@ void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue,
}
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
pWidgetData->SetSelectedMemberByValue(
CFX_WideString::FromUTF8(bsValue.AsStringC()).AsStringC(), TRUE, TRUE);
} else {
CFX_WideString wsValue = GetScriptContent(TRUE);
XFA_VERSION curVersion = GetDocument()->GetCurVersionMode();
if (wsValue.IsEmpty() && curVersion >= XFA_VERSION_300) {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
} else {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
}
-void CXFA_Node::Script_ExclGroup_Transient(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_ExclGroup_Transient(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) {
@@ -2500,11 +2500,11 @@ static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node* pInstMgrNode,
}
return NULL;
}
-void CXFA_Node::Script_Som_InstanceIndex(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Som_InstanceIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- int32_t iTo = FXJSE_Value_ToInteger(hValue);
+ int32_t iTo = FXJSE_Value_ToInteger(pValue);
int32_t iFrom = Subform_and_SubformSet_InstanceIndex();
CXFA_Node* pManagerNode = NULL;
for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode;
@@ -2532,10 +2532,10 @@ void CXFA_Node::Script_Som_InstanceIndex(FXJSE_HVALUE hValue,
}
}
} else {
- FXJSE_Value_SetInteger(hValue, Subform_and_SubformSet_InstanceIndex());
+ FXJSE_Value_SetInteger(pValue, Subform_and_SubformSet_InstanceIndex());
}
}
-void CXFA_Node::Script_Subform_InstanceManager(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Subform_InstanceManager(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
@@ -2554,28 +2554,28 @@ void CXFA_Node::Script_Subform_InstanceManager(FXJSE_HVALUE hValue,
}
if (pInstanceMgr) {
FXJSE_Value_Set(
- hValue,
+ pValue,
m_pDocument->GetScriptContext()->GetJSValueFromMap(pInstanceMgr));
} else {
- FXJSE_Value_SetNull(hValue);
+ FXJSE_Value_SetNull(pValue);
}
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Node::Script_Subform_Locale(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Subform_Locale(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString bsLocaleName;
- FXJSE_Value_ToUTF8String(hValue, bsLocaleName);
+ FXJSE_Value_ToUTF8String(pValue, bsLocaleName);
SetCData(XFA_ATTRIBUTE_Locale,
CFX_WideString::FromUTF8(bsLocaleName.AsStringC()), true, TRUE);
} else {
CFX_WideString wsLocaleName;
GetLocaleName(wsLocaleName);
FXJSE_Value_SetUTF8String(
- hValue, FX_UTF8Encode(wsLocaleName.c_str(), wsLocaleName.GetLength())
+ pValue, FX_UTF8Encode(wsLocaleName.c_str(), wsLocaleName.GetLength())
.AsStringC());
}
}
@@ -2777,7 +2777,7 @@ void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments) {
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"evaluate");
}
}
-void CXFA_Node::Script_InstanceManager_Max(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_InstanceManager_Max(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -2785,9 +2785,9 @@ void CXFA_Node::Script_InstanceManager_Max(FXJSE_HVALUE hValue,
return;
}
CXFA_Occur nodeOccur(GetOccurNode());
- FXJSE_Value_SetInteger(hValue, nodeOccur.GetMax());
+ FXJSE_Value_SetInteger(pValue, nodeOccur.GetMax());
}
-void CXFA_Node::Script_InstanceManager_Min(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_InstanceManager_Min(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
@@ -2795,7 +2795,7 @@ void CXFA_Node::Script_InstanceManager_Min(FXJSE_HVALUE hValue,
return;
}
CXFA_Occur nodeOccur(GetOccurNode());
- FXJSE_Value_SetInteger(hValue, nodeOccur.GetMin());
+ FXJSE_Value_SetInteger(pValue, nodeOccur.GetMin());
}
static int32_t XFA_ScriptInstanceManager_GetCount(CXFA_Node* pInstMgrNode) {
ASSERT(pInstMgrNode);
@@ -3070,14 +3070,14 @@ static CXFA_Node* XFA_ScriptInstanceManager_CreateInstance(
}
return pInstance;
}
-void CXFA_Node::Script_InstanceManager_Count(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_InstanceManager_Count(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- int32_t iDesired = FXJSE_Value_ToInteger(hValue);
+ int32_t iDesired = FXJSE_Value_ToInteger(pValue);
InstanceManager_SetInstances(iDesired);
} else {
- FXJSE_Value_SetInteger(hValue, XFA_ScriptInstanceManager_GetCount(this));
+ FXJSE_Value_SetInteger(pValue, XFA_ScriptInstanceManager_GetCount(this));
}
}
void CXFA_Node::Script_InstanceManager_MoveInstance(
@@ -3314,26 +3314,26 @@ int32_t CXFA_Node::InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom) {
}
return 0;
}
-void CXFA_Node::Script_Occur_Max(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Occur_Max(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_Occur occur(this);
if (bSetting) {
- int32_t iMax = FXJSE_Value_ToInteger(hValue);
+ int32_t iMax = FXJSE_Value_ToInteger(pValue);
occur.SetMax(iMax);
} else {
- FXJSE_Value_SetInteger(hValue, occur.GetMax());
+ FXJSE_Value_SetInteger(pValue, occur.GetMax());
}
}
-void CXFA_Node::Script_Occur_Min(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Occur_Min(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_Occur occur(this);
if (bSetting) {
- int32_t iMin = FXJSE_Value_ToInteger(hValue);
+ int32_t iMin = FXJSE_Value_ToInteger(pValue);
occur.SetMin(iMin);
} else {
- FXJSE_Value_SetInteger(hValue, occur.GetMin());
+ FXJSE_Value_SetInteger(pValue, occur.GetMin());
}
}
void CXFA_Node::Script_Desc_Metadata(CFXJSE_Arguments* pArguments) {
@@ -3436,19 +3436,19 @@ void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments) {
L"execValidate");
}
}
-void CXFA_Node::Script_Form_Checksum(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Form_Checksum(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString bsChecksum;
- FXJSE_Value_ToUTF8String(hValue, bsChecksum);
+ FXJSE_Value_ToUTF8String(pValue, bsChecksum);
SetAttribute(XFA_ATTRIBUTE_Checksum,
CFX_WideString::FromUTF8(bsChecksum.AsStringC()).AsStringC());
} else {
CFX_WideString wsChecksum;
GetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum, FALSE);
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(wsChecksum.c_str(), wsChecksum.GetLength()).AsStringC());
}
}
@@ -3507,12 +3507,12 @@ void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments) {
L"removeAttribute");
}
}
-void CXFA_Node::Script_Packet_Content(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Packet_Content(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
CFX_ByteString bsNewContent;
- FXJSE_Value_ToUTF8String(hValue, bsNewContent);
+ FXJSE_Value_ToUTF8String(pValue, bsNewContent);
CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
if (pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element) {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
@@ -3527,7 +3527,7 @@ void CXFA_Node::Script_Packet_Content(FXJSE_HVALUE hValue,
pXMLElement->GetTextData(wsTextData);
}
FXJSE_Value_SetUTF8String(
- hValue,
+ pValue,
FX_UTF8Encode(wsTextData.c_str(), wsTextData.GetLength()).AsStringC());
}
}
@@ -3651,38 +3651,38 @@ void CXFA_Node::Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments) {
L"hasDataChanged");
}
}
-void CXFA_Node::Script_Source_Db(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Source_Db(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Xfa_This(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Xfa_This(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
CXFA_Object* pThis = m_pDocument->GetScriptContext()->GetThisObject();
ASSERT(pThis);
- FXJSE_Value_Set(hValue,
+ FXJSE_Value_Set(pValue,
m_pDocument->GetScriptContext()->GetJSValueFromMap(pThis));
}
}
-void CXFA_Node::Script_Handler_Version(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Handler_Version(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_SubmitFormat_Mode(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_SubmitFormat_Mode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Extras_Type(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Extras_Type(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CXFA_Node::Script_Script_Stateless(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Script_Stateless(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
return;
}
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(FX_WSTRC(L"0")).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(FX_WSTRC(L"0")).AsStringC());
}
-void CXFA_Node::Script_Encrypt_Format(FXJSE_HVALUE hValue,
+void CXFA_Node::Script_Encrypt_Format(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
enum XFA_KEYTYPE {
@@ -5270,11 +5270,11 @@ void CXFA_NodeList::Script_TreelistClass_NamedItem(
ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"namedItem");
}
}
-void CXFA_NodeList::Script_ListClass_Length(FXJSE_HVALUE hValue,
+void CXFA_NodeList::Script_ListClass_Length(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
- FXJSE_Value_SetInteger(hValue, GetLength());
+ FXJSE_Value_SetInteger(pValue, GetLength());
} else {
ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
}
diff --git a/xfa/fxfa/parser/xfa_script.h b/xfa/fxfa/parser/xfa_script.h
index 04cc5b9a69..42d3ddfa47 100644
--- a/xfa/fxfa/parser/xfa_script.h
+++ b/xfa/fxfa/parser/xfa_script.h
@@ -35,38 +35,43 @@ enum XFA_RESOVENODE_RSTYPE {
XFA_RESOVENODE_RSTYPE_ExistNodes,
};
-class CXFA_HVALUEArray : public CFX_ArrayTemplate<FXJSE_HVALUE> {
+class CXFA_ValueArray : public CFX_ArrayTemplate<CFXJSE_Value*> {
public:
- CXFA_HVALUEArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
- ~CXFA_HVALUEArray() {
+ CXFA_ValueArray(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
+
+ ~CXFA_ValueArray() {
for (int32_t i = 0; i < GetSize(); i++) {
FXJSE_Value_Release(GetAt(i));
}
}
+
void GetAttributeObject(CXFA_ObjArray& objArray) {
for (int32_t i = 0; i < GetSize(); i++) {
CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(GetAt(i), NULL);
objArray.Add(pObject);
}
}
+
v8::Isolate* m_pIsolate;
};
struct XFA_RESOLVENODE_RS {
XFA_RESOLVENODE_RS()
: dwFlags(XFA_RESOVENODE_RSTYPE_Nodes), pScriptAttribute(NULL) {}
+
~XFA_RESOLVENODE_RS() { nodes.RemoveAll(); }
- int32_t GetAttributeResult(CXFA_HVALUEArray& hValueArray) const {
+
+ int32_t GetAttributeResult(CXFA_ValueArray& valueArray) const {
if (pScriptAttribute && pScriptAttribute->eValueType == XFA_SCRIPT_Object) {
- v8::Isolate* pIsolate = hValueArray.m_pIsolate;
+ v8::Isolate* pIsolate = valueArray.m_pIsolate;
for (int32_t i = 0; i < nodes.GetSize(); i++) {
- FXJSE_HVALUE hValue = FXJSE_Value_Create(pIsolate);
+ CFXJSE_Value* pValue = FXJSE_Value_Create(pIsolate);
(nodes[i]->*(pScriptAttribute->lpfnCallback))(
- hValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
- hValueArray.Add(hValue);
+ pValue, FALSE, (XFA_ATTRIBUTE)pScriptAttribute->eAttribute);
+ valueArray.Add(pValue);
}
}
- return hValueArray.GetSize();
+ return valueArray.GetSize();
}
CXFA_ObjArray nodes;
diff --git a/xfa/fxfa/parser/xfa_script_datawindow.cpp b/xfa/fxfa/parser/xfa_script_datawindow.cpp
index 8ce5061c03..f06c3110b9 100644
--- a/xfa/fxfa/parser/xfa_script_datawindow.cpp
+++ b/xfa/fxfa/parser/xfa_script_datawindow.cpp
@@ -30,18 +30,18 @@ void CScript_DataWindow::Script_DataWindow_GotoRecord(
void CScript_DataWindow::Script_DataWindow_IsRecordGroup(
CFXJSE_Arguments* pArguments) {}
void CScript_DataWindow::Script_DataWindow_RecordsBefore(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CScript_DataWindow::Script_DataWindow_CurrentRecordNumber(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
void CScript_DataWindow::Script_DataWindow_RecordsAfter(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {}
-void CScript_DataWindow::Script_DataWindow_IsDefined(FXJSE_HVALUE hValue,
+void CScript_DataWindow::Script_DataWindow_IsDefined(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
}
diff --git a/xfa/fxfa/parser/xfa_script_datawindow.h b/xfa/fxfa/parser/xfa_script_datawindow.h
index 515bb99b2e..55d12f8441 100644
--- a/xfa/fxfa/parser/xfa_script_datawindow.h
+++ b/xfa/fxfa/parser/xfa_script_datawindow.h
@@ -18,16 +18,16 @@ class CScript_DataWindow : public CXFA_OrdinaryObject {
void Script_DataWindow_Record(CFXJSE_Arguments* pArguments);
void Script_DataWindow_GotoRecord(CFXJSE_Arguments* pArguments);
void Script_DataWindow_IsRecordGroup(CFXJSE_Arguments* pArguments);
- void Script_DataWindow_RecordsBefore(FXJSE_HVALUE hValue,
+ void Script_DataWindow_RecordsBefore(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_DataWindow_CurrentRecordNumber(FXJSE_HVALUE hValue,
+ void Script_DataWindow_CurrentRecordNumber(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_DataWindow_RecordsAfter(FXJSE_HVALUE hValue,
+ void Script_DataWindow_RecordsAfter(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_DataWindow_IsDefined(FXJSE_HVALUE hValue,
+ void Script_DataWindow_IsDefined(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
};
diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
index 335df6a32e..c5d25bc246 100644
--- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp
@@ -25,37 +25,37 @@ CScript_EventPseudoModel::CScript_EventPseudoModel(CXFA_Document* pDocument)
m_uScriptHash = XFA_HASHCODE_Event;
}
CScript_EventPseudoModel::~CScript_EventPseudoModel() {}
-void Script_EventPseudoModel_StringProperty(FXJSE_HVALUE hValue,
+void Script_EventPseudoModel_StringProperty(CFXJSE_Value* pValue,
CFX_WideString& wsValue,
FX_BOOL bSetting) {
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
wsValue = CFX_WideString::FromUTF8(bsValue.AsStringC());
} else {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
}
-void Script_EventPseudoModel_InterProperty(FXJSE_HVALUE hValue,
+void Script_EventPseudoModel_InterProperty(CFXJSE_Value* pValue,
int32_t& iValue,
FX_BOOL bSetting) {
if (bSetting) {
- iValue = FXJSE_Value_ToInteger(hValue);
+ iValue = FXJSE_Value_ToInteger(pValue);
} else {
- FXJSE_Value_SetInteger(hValue, iValue);
+ FXJSE_Value_SetInteger(pValue, iValue);
}
}
-void Script_EventPseudoModel_BooleanProperty(FXJSE_HVALUE hValue,
+void Script_EventPseudoModel_BooleanProperty(CFXJSE_Value* pValue,
FX_BOOL& bValue,
FX_BOOL bSetting) {
if (bSetting)
- bValue = FXJSE_Value_ToBoolean(hValue);
+ bValue = FXJSE_Value_ToBoolean(pValue);
else
- FXJSE_Value_SetBoolean(hValue, bValue);
+ FXJSE_Value_SetBoolean(pValue, bValue);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Property(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
XFA_Event dwFlag,
FX_BOOL bSetting) {
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
@@ -69,67 +69,67 @@ void CScript_EventPseudoModel::Script_EventPseudoModel_Property(
switch (dwFlag) {
case XFA_Event::CancelAction:
Script_EventPseudoModel_BooleanProperty(
- hValue, pEventParam->m_bCancelAction, bSetting);
+ pValue, pEventParam->m_bCancelAction, bSetting);
break;
case XFA_Event::Change:
- Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsChange,
+ Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsChange,
bSetting);
break;
case XFA_Event::CommitKey:
- Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iCommitKey,
+ Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iCommitKey,
bSetting);
break;
case XFA_Event::FullText:
- Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsFullText,
+ Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsFullText,
bSetting);
break;
case XFA_Event::Keydown:
- Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bKeyDown,
+ Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bKeyDown,
bSetting);
break;
case XFA_Event::Modifier:
- Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bModifier,
+ Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bModifier,
bSetting);
break;
case XFA_Event::NewContentType:
Script_EventPseudoModel_StringProperty(
- hValue, pEventParam->m_wsNewContentType, bSetting);
+ pValue, pEventParam->m_wsNewContentType, bSetting);
break;
case XFA_Event::NewText:
- Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsNewText,
+ Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsNewText,
bSetting);
break;
case XFA_Event::PreviousContentType:
Script_EventPseudoModel_StringProperty(
- hValue, pEventParam->m_wsPrevContentType, bSetting);
+ pValue, pEventParam->m_wsPrevContentType, bSetting);
break;
case XFA_Event::PreviousText:
- Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsPrevText,
+ Script_EventPseudoModel_StringProperty(pValue, pEventParam->m_wsPrevText,
bSetting);
break;
case XFA_Event::Reenter:
- Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bReenter,
+ Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bReenter,
bSetting);
break;
case XFA_Event::SelectionEnd:
- Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelEnd,
+ Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iSelEnd,
bSetting);
break;
case XFA_Event::SelectionStart:
- Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelStart,
+ Script_EventPseudoModel_InterProperty(pValue, pEventParam->m_iSelStart,
bSetting);
break;
case XFA_Event::Shift:
- Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bShift,
+ Script_EventPseudoModel_BooleanProperty(pValue, pEventParam->m_bShift,
bSetting);
break;
case XFA_Event::SoapFaultCode:
Script_EventPseudoModel_StringProperty(
- hValue, pEventParam->m_wsSoapFaultCode, bSetting);
+ pValue, pEventParam->m_wsSoapFaultCode, bSetting);
break;
case XFA_Event::SoapFaultString:
Script_EventPseudoModel_StringProperty(
- hValue, pEventParam->m_wsSoapFaultString, bSetting);
+ pValue, pEventParam->m_wsSoapFaultString, bSetting);
break;
case XFA_Event::Target:
break;
@@ -138,102 +138,102 @@ void CScript_EventPseudoModel::Script_EventPseudoModel_Property(
}
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Change(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Change, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Change, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_CommitKey(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::CommitKey, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::CommitKey, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_FullText(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::FullText, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::FullText, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_KeyDown(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Keydown, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Keydown, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Modifier(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Modifier, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Modifier, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_NewContentType(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::NewContentType, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::NewContentType, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_NewText(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::NewText, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::NewText, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_PrevContentType(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::PreviousContentType,
+ Script_EventPseudoModel_Property(pValue, XFA_Event::PreviousContentType,
bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_PrevText(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::PreviousText, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::PreviousText, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Reenter(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Reenter, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Reenter, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_SelEnd(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::SelectionEnd, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::SelectionEnd, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_SelStart(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::SelectionStart, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::SelectionStart, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Shift(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Shift, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Shift, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultCode(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::SoapFaultCode, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::SoapFaultCode, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_SoapFaultString(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::SoapFaultString,
+ Script_EventPseudoModel_Property(pValue, XFA_Event::SoapFaultString,
bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Target(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
- Script_EventPseudoModel_Property(hValue, XFA_Event::Target, bSetting);
+ Script_EventPseudoModel_Property(pValue, XFA_Event::Target, bSetting);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Emit(
CFXJSE_Arguments* pArguments) {
diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.h b/xfa/fxfa/parser/xfa_script_eventpseudomodel.h
index d840329b4c..f7649eb643 100644
--- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.h
+++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.h
@@ -35,52 +35,52 @@ class CScript_EventPseudoModel : public CXFA_OrdinaryObject {
explicit CScript_EventPseudoModel(CXFA_Document* pDocument);
virtual ~CScript_EventPseudoModel();
- void Script_EventPseudoModel_Change(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Change(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_CommitKey(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_CommitKey(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_FullText(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_FullText(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_KeyDown(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_KeyDown(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_Modifier(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Modifier(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_NewContentType(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_NewContentType(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_NewText(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_NewText(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_PrevContentType(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_PrevContentType(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_PrevText(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_PrevText(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_Reenter(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Reenter(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_SelEnd(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_SelEnd(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_SelStart(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_SelStart(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_Shift(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Shift(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_SoapFaultCode(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_SoapFaultCode(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_SoapFaultString(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_SoapFaultString(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_EventPseudoModel_Target(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Target(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
@@ -88,7 +88,7 @@ class CScript_EventPseudoModel : public CXFA_OrdinaryObject {
void Script_EventPseudoModel_Reset(CFXJSE_Arguments* pArguments);
protected:
- void Script_EventPseudoModel_Property(FXJSE_HVALUE hValue,
+ void Script_EventPseudoModel_Property(CFXJSE_Value* pValue,
XFA_Event dwFlag,
FX_BOOL bSetting);
};
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 94fa8db96c..2bff14c77f 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -26,15 +26,15 @@ CScript_HostPseudoModel::CScript_HostPseudoModel(CXFA_Document* pDocument)
}
CScript_HostPseudoModel::~CScript_HostPseudoModel() {}
void CScript_HostPseudoModel::Script_HostPseudoModel_LoadString(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
CXFA_FFNotify* pNotify,
uint32_t dwFlag) {
CFX_WideString wsValue;
pNotify->GetAppProvider()->LoadString(dwFlag, wsValue);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsValue).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -47,10 +47,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
}
CFX_WideString wsAppType;
pNotify->GetAppProvider()->GetAppType(wsAppType);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsAppType).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -63,10 +63,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
}
CFX_WideString wsAppType;
pNotify->GetAppProvider()->GetFoxitAppType(wsAppType);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppType).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsAppType).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_CalculationsEnabled(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -76,14 +76,14 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CalculationsEnabled(
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
if (bSetting) {
pNotify->GetDocProvider()->SetCalculationsEnabled(
- hDoc, FXJSE_Value_ToBoolean(hValue));
+ hDoc, FXJSE_Value_ToBoolean(pValue));
return;
}
FX_BOOL bEnabled = pNotify->GetDocProvider()->IsCalculationsEnabled(hDoc);
- FXJSE_Value_SetBoolean(hValue, bEnabled);
+ FXJSE_Value_SetBoolean(pValue, bEnabled);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentPage(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -93,14 +93,14 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentPage(
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
if (bSetting) {
pNotify->GetDocProvider()->SetCurrentPage(hDoc,
- FXJSE_Value_ToInteger(hValue));
+ FXJSE_Value_ToInteger(pValue));
return;
}
int32_t iCurrentPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);
- FXJSE_Value_SetInteger(hValue, iCurrentPage);
+ FXJSE_Value_SetInteger(pValue, iCurrentPage);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Language(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -113,10 +113,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Language(
}
CFX_WideString wsLanguage;
pNotify->GetAppProvider()->GetLanguage(wsLanguage);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsLanguage).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsLanguage).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -129,10 +129,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(
return;
}
int32_t iNumPages = pNotify->GetDocProvider()->CountPages(hDoc);
- FXJSE_Value_SetInteger(hValue, iNumPages);
+ FXJSE_Value_SetInteger(pValue, iNumPages);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -145,10 +145,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(
}
CFX_WideString wsPlatform;
pNotify->GetAppProvider()->GetPlatform(wsPlatform);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsPlatform).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsPlatform).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
@@ -161,17 +161,17 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title(
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
if (bSetting) {
CFX_ByteString bsValue;
- FXJSE_Value_ToUTF8String(hValue, bsValue);
+ FXJSE_Value_ToUTF8String(pValue, bsValue);
pNotify->GetDocProvider()->SetTitle(
hDoc, CFX_WideString::FromUTF8(bsValue.AsStringC()));
return;
}
CFX_WideString wsTitle;
pNotify->GetDocProvider()->GetTitle(hDoc, wsTitle);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsTitle).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsTitle).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -181,14 +181,14 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled(
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
if (bSetting) {
pNotify->GetDocProvider()->SetValidationsEnabled(
- hDoc, FXJSE_Value_ToBoolean(hValue));
+ hDoc, FXJSE_Value_ToBoolean(pValue));
return;
}
FX_BOOL bEnabled = pNotify->GetDocProvider()->IsValidationsEnabled(hDoc);
- FXJSE_Value_SetBoolean(hValue, bEnabled);
+ FXJSE_Value_SetBoolean(pValue, bEnabled);
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Variation(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {
@@ -204,10 +204,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Variation(
}
CFX_WideString wsVariation;
pNotify->GetAppProvider()->GetVariation(wsVariation);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVariation).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsVariation).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -220,10 +220,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
}
CFX_WideString wsVersion;
pNotify->GetAppProvider()->GetVersion(wsVersion);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsVersion).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -236,10 +236,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
}
CFX_WideString wsVersion;
pNotify->GetAppProvider()->GetFoxitVersion(wsVersion);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsVersion).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsVersion).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -252,10 +252,10 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
}
CFX_WideString wsAppName;
pNotify->GetAppProvider()->GetAppName(wsAppName);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAppName).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsAppName).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -268,7 +268,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
}
CFX_WideString wsFoxitAppName;
pNotify->GetAppProvider()->GetFoxitAppName(wsFoxitAppName);
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsFoxitAppName).AsStringC());
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsFoxitAppName).AsStringC());
}
void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
CFXJSE_Arguments* pArguments) {
@@ -308,22 +308,22 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- FXJSE_HVALUE hValue = pArguments->GetValue(0);
- if (FXJSE_Value_IsObject(hValue)) {
- pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue, nullptr));
- } else if (FXJSE_Value_IsUTF8String(hValue)) {
+ CFXJSE_Value* pValue = pArguments->GetValue(0);
+ if (FXJSE_Value_IsObject(pValue)) {
+ pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(pValue, nullptr));
+ } else if (FXJSE_Value_IsUTF8String(pValue)) {
CFX_ByteString bsString;
- FXJSE_Value_ToUTF8String(hValue, bsString);
+ FXJSE_Value_ToUTF8String(pValue, bsString);
CFX_WideString wsExpression =
CFX_WideString::FromUTF8(bsString.AsStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
CXFA_Object* pObject = pScriptContext->GetThisObject();
if (!pObject) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent |
@@ -332,12 +332,12 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
int32_t iRet = pScriptContext->ResolveObjects(
pObject, wsExpression.AsStringC(), resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
pNode = resoveNodeRS.nodes[0]->AsNode();
}
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
}
CXFA_LayoutProcessor* pDocLayout = m_pDocument->GetDocLayout();
if (!pDocLayout) {
@@ -383,9 +383,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response(
}
CFX_WideString wsAnswer = pNotify->GetAppProvider()->Response(
wsQuestion, wsTitle, wsDefaultAnswer, bMark);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAnswer).AsStringC());
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsAnswer).AsStringC());
}
}
void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(
@@ -395,9 +395,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentInBatch(
return;
}
int32_t iCur = pNotify->GetAppProvider()->GetCurDocumentInBatch();
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iCur);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iCur);
}
}
static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
@@ -509,22 +509,22 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- FXJSE_HVALUE hValue = pArguments->GetValue(0);
- if (FXJSE_Value_IsObject(hValue)) {
- pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(hValue, NULL));
- } else if (FXJSE_Value_IsUTF8String(hValue)) {
+ CFXJSE_Value* pValue = pArguments->GetValue(0);
+ if (FXJSE_Value_IsObject(pValue)) {
+ pNode = static_cast<CXFA_Node*>(FXJSE_Value_ToObject(pValue, nullptr));
+ } else if (FXJSE_Value_IsUTF8String(pValue)) {
CFX_ByteString bsString;
- FXJSE_Value_ToUTF8String(hValue, bsString);
+ FXJSE_Value_ToUTF8String(pValue, bsString);
CFX_WideString wsExpression =
CFX_WideString::FromUTF8(bsString.AsStringC());
CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
if (!pScriptContext) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
CXFA_Object* pObject = pScriptContext->GetThisObject();
if (!pObject) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent |
@@ -533,12 +533,12 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
int32_t iRet = pScriptContext->ResolveObjects(
pObject, wsExpression.AsStringC(), resoveNodeRS, dwFlag);
if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) {
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
return;
}
pNode = resoveNodeRS.nodes[0]->AsNode();
}
- FXJSE_Value_Release(hValue);
+ FXJSE_Value_Release(pValue);
}
pNotify->SetFocusWidgetNode(pNode);
}
@@ -597,9 +597,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(
}
int32_t iValue = pNotify->GetAppProvider()->MsgBox(
wsMessage, bsTitle, dwMessageType, dwButtonType);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iValue);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iValue);
}
}
FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
@@ -614,20 +614,20 @@ FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
XFA_SCRIPTLANGTYPE_Javascript) {
bIsJsType = TRUE;
}
- FXJSE_HVALUE hValueArg = pArguments->GetValue(iArgIndex);
- if (!FXJSE_Value_IsUTF8String(hValueArg) && bIsJsType) {
+ CFXJSE_Value* pValueArg = pArguments->GetValue(iArgIndex);
+ if (!FXJSE_Value_IsUTF8String(pValueArg) && bIsJsType) {
ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
- FXJSE_Value_Release(hValueArg);
+ FXJSE_Value_Release(pValueArg);
return FALSE;
}
- if (FXJSE_Value_IsNull(hValueArg)) {
+ if (FXJSE_Value_IsNull(pValueArg)) {
wsValue = FX_WSTRC(L"");
} else {
CFX_ByteString byMessage;
- FXJSE_Value_ToUTF8String(hValueArg, byMessage);
+ FXJSE_Value_ToUTF8String(pValueArg, byMessage);
wsValue = CFX_WideString::FromUTF8(byMessage.AsStringC());
}
- FXJSE_Value_Release(hValueArg);
+ FXJSE_Value_Release(pValueArg);
return TRUE;
}
void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentCountInBatch(
@@ -637,9 +637,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_DocumentCountInBatch(
return;
}
int32_t iValue = pNotify->GetAppProvider()->GetDocumentCountInBatch();
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iValue);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iValue);
}
}
void CScript_HostPseudoModel::Script_HostPseudoModel_Print(
@@ -795,8 +795,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentDateTime(
return;
}
CFX_WideString wsDataTime = pNotify->GetCurrentDateTime();
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsDataTime).AsStringC());
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(wsDataTime).AsStringC());
}
}
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.h b/xfa/fxfa/parser/xfa_script_hostpseudomodel.h
index 1f456ffe7c..7ead797669 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.h
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.h
@@ -16,46 +16,46 @@ class CScript_HostPseudoModel : public CXFA_OrdinaryObject {
CScript_HostPseudoModel(CXFA_Document* pDocument);
virtual ~CScript_HostPseudoModel();
- void Script_HostPseudoModel_AppType(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_AppType(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_FoxitAppType(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_FoxitAppType(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_CalculationsEnabled(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_CalculationsEnabled(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_CurrentPage(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_CurrentPage(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Language(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Language(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_NumPages(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_NumPages(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Platform(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Platform(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Title(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Title(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_ValidationsEnabled(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_ValidationsEnabled(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Variation(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Variation(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Version(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Version(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_FoxitVersion(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_FoxitVersion(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_Name(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_Name(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void Script_HostPseudoModel_FoxitName(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_FoxitName(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
@@ -78,7 +78,7 @@ class CScript_HostPseudoModel : public CXFA_OrdinaryObject {
void Script_HostPseudoModel_CurrentDateTime(CFXJSE_Arguments* pArguments);
protected:
- void Script_HostPseudoModel_LoadString(FXJSE_HVALUE hValue,
+ void Script_HostPseudoModel_LoadString(CFXJSE_Value* pValue,
CXFA_FFNotify* pNotify,
uint32_t dwFlag);
FX_BOOL Script_HostPseudoModel_ValidateArgsForMsg(
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index c55a66cf9a..743719ca55 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -19,6 +19,7 @@
#include "xfa/fxfa/parser/xfa_script_resolveprocessor.h"
#include "xfa/fxfa/parser/xfa_utils.h"
#include "xfa/fxjse/cfxjse_arguments.h"
+#include "xfa/fxjse/value.h"
CXFA_ScriptContext::CXFA_ScriptContext(CXFA_Document* pDocument)
: m_pDocument(pDocument),
@@ -36,14 +37,14 @@ CXFA_ScriptContext::CXFA_ScriptContext(CXFA_Document* pDocument)
FXSYS_memset(&m_JsNormalClass, 0, sizeof(FXJSE_CLASS));
}
CXFA_ScriptContext::~CXFA_ScriptContext() {
- FX_POSITION ps = m_mapXFAToHValue.GetStartPosition();
+ FX_POSITION ps = m_mapXFAToValue.GetStartPosition();
while (ps) {
CXFA_Object* pXFAObj;
- FXJSE_HVALUE pValue;
- m_mapXFAToHValue.GetNextAssoc(ps, pXFAObj, pValue);
+ CFXJSE_Value* pValue;
+ m_mapXFAToValue.GetNextAssoc(ps, pXFAObj, pValue);
FXJSE_Value_Release(pValue);
}
- m_mapXFAToHValue.RemoveAll();
+ m_mapXFAToValue.RemoveAll();
ReleaseVariablesMap();
if (m_hFM2JSContext) {
XFA_FM2JS_ContextRelease(m_hFM2JSContext);
@@ -66,7 +67,7 @@ void CXFA_ScriptContext::Initialize(v8::Isolate* pIsolate) {
}
FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
const CFX_WideStringC& wsScript,
- FXJSE_HVALUE hRetValue,
+ CFXJSE_Value* hRetValue,
CXFA_Object* pThisObject) {
CFX_ByteString btScript;
XFA_SCRIPTLANGTYPE eSaveType = m_eScriptType;
@@ -91,18 +92,18 @@ FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
}
CXFA_Object* pOriginalObject = m_pThisObject;
m_pThisObject = pThisObject;
- FXJSE_HVALUE pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL;
+ CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL;
FX_BOOL bRet =
FXJSE_ExecuteScript(m_pJsContext, btScript.c_str(), hRetValue, pValue);
m_pThisObject = pOriginalObject;
m_eScriptType = eSaveType;
return bRet;
}
-void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
+void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) {
+ CFXJSE_Value* pValue) {
CXFA_Object* lpOrginalNode =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
+ (CXFA_Object*)FXJSE_Value_ToObject(pObject, nullptr);
CXFA_Document* pDoc = lpOrginalNode->GetDocument();
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pDoc->GetScriptContext();
@@ -115,13 +116,13 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
pRefNode = ToNode(lpCurNode);
}
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
dwFlag, TRUE)) {
return;
}
if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
- if (FXJSE_Value_IsUndefined(hValue)) {
- FXJSE_Value_SetObjectOwnProp(hObject, szPropName, hValue);
+ if (FXJSE_Value_IsUndefined(pValue)) {
+ FXJSE_Value_SetObjectOwnProp(pObject, szPropName, pValue);
return;
}
}
@@ -130,11 +131,11 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject,
return;
}
pNotify->GetDocProvider()->SetGlobalProperty(pNotify->GetHDOC(), szPropName,
- hValue);
+ pValue);
}
FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode,
const CFX_WideStringC& propname,
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
uint32_t dwFlag,
FX_BOOL bSetting) {
if (!refNode)
@@ -143,32 +144,31 @@ FX_BOOL CXFA_ScriptContext::QueryNodeByFlag(CXFA_Node* refNode,
if (ResolveObjects(refNode, propname, resolveRs, dwFlag) <= 0)
return false;
if (resolveRs.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) {
- FXJSE_HVALUE pValue = GetJSValueFromMap(resolveRs.nodes[0]);
- FXJSE_Value_Set(hValue, pValue);
+ FXJSE_Value_Set(pValue, GetJSValueFromMap(resolveRs.nodes[0]));
return true;
}
if (resolveRs.dwFlags == XFA_RESOVENODE_RSTYPE_Attribute) {
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = resolveRs.pScriptAttribute;
if (lpAttributeInfo) {
(resolveRs.nodes[0]->*(lpAttributeInfo->lpfnCallback))(
- hValue, bSetting, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ pValue, bSetting, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
}
}
return true;
}
-void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
+void CXFA_ScriptContext::GlobalPropertyGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
- CXFA_Document* pDoc = pOrginalObject->GetDocument();
+ CFXJSE_Value* pValue) {
+ CXFA_Object* pOriginalObject =
+ (CXFA_Object*)FXJSE_Value_ToObject(pObject, nullptr);
+ CXFA_Document* pDoc = pOriginalObject->GetDocument();
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pDoc->GetScriptContext();
- CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOrginalObject);
+ CXFA_Object* lpCurNode = lpScriptContext->GetVariablesThis(pOriginalObject);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
if (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Formcalc) {
if (szPropName == FOXIT_XFA_FM2JS_FORMCALC_RUNTIME) {
- XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, hValue);
+ XFA_FM2JS_GlobalPropertyGetter(lpScriptContext->m_hFM2JSContext, pValue);
return;
}
XFA_HashCode uHashCode = static_cast<XFA_HashCode>(
@@ -177,7 +177,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
CXFA_Object* pObject =
lpScriptContext->GetDocument()->GetXFAObject(uHashCode);
if (pObject) {
- FXJSE_Value_Set(hValue, lpScriptContext->GetJSValueFromMap(pObject));
+ FXJSE_Value_Set(pValue, lpScriptContext->GetJSValueFromMap(pObject));
return;
}
}
@@ -185,23 +185,23 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject());
- if (pOrginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
+ if (pOriginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
pRefNode = ToNode(lpCurNode);
}
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
dwFlag, FALSE)) {
return;
}
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
- if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), hValue,
+ if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
dwFlag, FALSE)) {
return;
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOrginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
if (pScriptObject &&
- lpScriptContext->QueryVariableHValue(pScriptObject->AsNode(), szPropName,
- hValue, TRUE)) {
+ lpScriptContext->QueryVariableValue(pScriptObject->AsNode(), szPropName,
+ pValue, TRUE)) {
return;
}
CXFA_FFNotify* pNotify = pDoc->GetNotify();
@@ -209,31 +209,31 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject,
return;
}
pNotify->GetDocProvider()->GetGlobalProperty(pNotify->GetHDOC(), szPropName,
- hValue);
+ pValue);
}
-void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
+void CXFA_ScriptContext::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
- if (pOrginalObject == NULL) {
- FXJSE_Value_SetUndefined(hValue);
+ CFXJSE_Value* pReturnValue) {
+ CXFA_Object* pOriginalObject =
+ (CXFA_Object*)FXJSE_Value_ToObject(pOriginalValue, nullptr);
+ if (!pOriginalObject) {
+ FXJSE_Value_SetUndefined(pReturnValue);
return;
}
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
CXFA_ScriptContext* lpScriptContext =
- (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
- CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
+ (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext();
+ CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject);
if (wsPropName == FX_WSTRC(L"xfa")) {
- FXJSE_HVALUE pValue = lpScriptContext->GetJSValueFromMap(
+ CFXJSE_Value* pValue = lpScriptContext->GetJSValueFromMap(
lpScriptContext->GetDocument()->GetRoot());
- FXJSE_Value_Set(hValue, pValue);
+ FXJSE_Value_Set(pReturnValue, pValue);
return;
}
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
FX_BOOL bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsStringC(), hValue, dwFlag, FALSE);
+ ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, FALSE);
if (bRet) {
return;
}
@@ -242,38 +242,38 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject,
!lpScriptContext->IsStrictScopeInJavaScript())) {
dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings;
bRet = lpScriptContext->QueryNodeByFlag(
- ToNode(pObject), wsPropName.AsStringC(), hValue, dwFlag, FALSE);
+ ToNode(pObject), wsPropName.AsStringC(), pReturnValue, dwFlag, FALSE);
}
if (bRet) {
return;
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOrginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
if (pScriptObject) {
- bRet = lpScriptContext->QueryVariableHValue(ToNode(pScriptObject),
- szPropName, hValue, TRUE);
+ bRet = lpScriptContext->QueryVariableValue(ToNode(pScriptObject),
+ szPropName, pReturnValue, TRUE);
}
if (!bRet) {
- FXJSE_Value_SetUndefined(hValue);
+ FXJSE_Value_SetUndefined(pReturnValue);
}
}
-void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
+void CXFA_ScriptContext::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue) {
- CXFA_Object* pOrginalObject =
- (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
- if (pOrginalObject == NULL) {
+ CFXJSE_Value* pReturnValue) {
+ CXFA_Object* pOriginalObject =
+ (CXFA_Object*)FXJSE_Value_ToObject(pOriginalValue, nullptr);
+ if (!pOriginalObject)
return;
- }
+
CXFA_ScriptContext* lpScriptContext =
- (CXFA_ScriptContext*)pOrginalObject->GetDocument()->GetScriptContext();
- CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject);
+ (CXFA_ScriptContext*)pOriginalObject->GetDocument()->GetScriptContext();
+ CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOriginalObject);
CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName);
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName(
pObject->GetClassID(), wsPropName.AsStringC());
if (lpAttributeInfo) {
(pObject->*(lpAttributeInfo->lpfnCallback))(
- hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ pReturnValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
} else {
if (pObject->IsNode()) {
if (wsPropName.GetAt(0) == '#') {
@@ -295,27 +295,28 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject,
wsDefaultName.AsStringC());
if (lpAttributeInfo) {
(pPropOrChild->*(lpAttributeInfo->lpfnCallback))(
- hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
+ pReturnValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute);
return;
}
}
}
CXFA_Object* pScriptObject =
- lpScriptContext->GetVariablesThis(pOrginalObject, TRUE);
+ lpScriptContext->GetVariablesThis(pOriginalObject, TRUE);
if (pScriptObject) {
- lpScriptContext->QueryVariableHValue(ToNode(pScriptObject), szPropName,
- hValue, FALSE);
+ lpScriptContext->QueryVariableValue(ToNode(pScriptObject), szPropName,
+ pReturnValue, FALSE);
}
}
}
int32_t CXFA_ScriptContext::NormalPropTypeGetter(
- FXJSE_HOBJECT hObject,
+ CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
- if (pObject == NULL) {
+ CXFA_Object* pObject =
+ (CXFA_Object*)FXJSE_Value_ToObject(pOriginalValue, nullptr);
+ if (!pObject)
return FXJSE_ClassPropType_None;
- }
+
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
@@ -331,13 +332,14 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter(
return FXJSE_ClassPropType_Property;
}
int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
- FXJSE_HOBJECT hObject,
+ CFXJSE_Value* pOriginalValue,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hObject, NULL);
- if (pObject == NULL) {
+ CXFA_Object* pObject =
+ (CXFA_Object*)FXJSE_Value_ToObject(pOriginalValue, nullptr);
+ if (!pObject)
return FXJSE_ClassPropType_None;
- }
+
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
@@ -348,22 +350,22 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter(
}
return FXJSE_ClassPropType_Property;
}
-void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis,
+void CXFA_ScriptContext::NormalMethodCall(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args) {
- CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(hThis, NULL);
- if (pObject == NULL) {
+ CXFA_Object* pObject = (CXFA_Object*)FXJSE_Value_ToObject(pThis, nullptr);
+ if (!pObject)
return;
- }
+
CXFA_ScriptContext* lpScriptContext =
(CXFA_ScriptContext*)pObject->GetDocument()->GetScriptContext();
pObject = lpScriptContext->GetVariablesThis(pObject);
CFX_WideString wsFunName = CFX_WideString::FromUTF8(szFuncName);
const XFA_METHODINFO* lpMethodInfo =
XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsStringC());
- if (NULL == lpMethodInfo) {
+ if (!lpMethodInfo)
return;
- }
+
(pObject->*(lpMethodInfo->lpfnCallback))(&args);
}
FX_BOOL CXFA_ScriptContext::IsStrictScopeInJavaScript() {
@@ -455,7 +457,7 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
CFX_ByteString btScript =
FX_UTF8Encode(wsScript.c_str(), wsScript.GetLength());
- FXJSE_HVALUE hRetValue = FXJSE_Value_Create(m_pIsolate);
+ CFXJSE_Value* hRetValue = FXJSE_Value_Create(m_pIsolate);
CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent);
CFXJSE_Context* pVariablesContext =
CreateVariablesContext(pScriptNode, pThisObject);
@@ -468,10 +470,10 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
return bRet;
}
-FX_BOOL CXFA_ScriptContext::QueryVariableHValue(
+FX_BOOL CXFA_ScriptContext::QueryVariableValue(
CXFA_Node* pScriptNode,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bGetter) {
if (!pScriptNode || pScriptNode->GetClassID() != XFA_ELEMENT_Script)
return FALSE;
@@ -486,23 +488,23 @@ FX_BOOL CXFA_ScriptContext::QueryVariableHValue(
FX_BOOL bRes = FALSE;
CFXJSE_Context* pVariableContext = static_cast<CFXJSE_Context*>(lpVariables);
- FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(pVariableContext);
- FXJSE_HVALUE hVariableValue = FXJSE_Value_Create(m_pIsolate);
+ CFXJSE_Value* pObject = FXJSE_Context_GetGlobalObject(pVariableContext);
+ CFXJSE_Value* hVariableValue = FXJSE_Value_Create(m_pIsolate);
if (!bGetter) {
- FXJSE_Value_SetObjectOwnProp(hObject, szPropName, hValue);
+ FXJSE_Value_SetObjectOwnProp(pObject, szPropName, pValue);
bRes = TRUE;
- } else if (FXJSE_Value_ObjectHasOwnProp(hObject, szPropName, FALSE)) {
- FXJSE_Value_GetObjectProp(hObject, szPropName, hVariableValue);
+ } else if (FXJSE_Value_ObjectHasOwnProp(pObject, szPropName, FALSE)) {
+ FXJSE_Value_GetObjectProp(pObject, szPropName, hVariableValue);
if (FXJSE_Value_IsFunction(hVariableValue))
- FXJSE_Value_SetFunctionBind(hValue, hVariableValue, hObject);
+ FXJSE_Value_SetFunctionBind(pValue, hVariableValue, pObject);
else if (bGetter)
- FXJSE_Value_Set(hValue, hVariableValue);
+ FXJSE_Value_Set(pValue, hVariableValue);
else
- FXJSE_Value_Set(hVariableValue, hValue);
+ FXJSE_Value_Set(hVariableValue, pValue);
bRes = TRUE;
}
FXJSE_Value_Release(hVariableValue);
- FXJSE_Value_Release(hObject);
+ FXJSE_Value_Release(pObject);
return bRes;
}
@@ -512,9 +514,9 @@ void CXFA_ScriptContext::ReleaseVariablesMap() {
CXFA_Object* pScriptNode;
CFXJSE_Context* pVariableContext = nullptr;
m_mapVariableToContext.GetNextAssoc(ps, pScriptNode, pVariableContext);
- FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(pVariableContext);
- delete static_cast<CXFA_ThisProxy*>(FXJSE_Value_ToObject(hObject, nullptr));
- FXJSE_Value_Release(hObject);
+ CFXJSE_Value* pObject = FXJSE_Context_GetGlobalObject(pVariableContext);
+ delete static_cast<CXFA_ThisProxy*>(FXJSE_Value_ToObject(pObject, nullptr));
+ FXJSE_Value_Release(pObject);
FXJSE_Context_Release(pVariableContext);
}
m_mapVariableToContext.RemoveAll();
@@ -536,14 +538,14 @@ void CXFA_ScriptContext::DefineJsClass() {
}
void CXFA_ScriptContext::RemoveBuiltInObjs(CFXJSE_Context* pContext) const {
static const CFX_ByteStringC OBJ_NAME[2] = {"Number", "Date"};
- FXJSE_HVALUE hObject = FXJSE_Context_GetGlobalObject(pContext);
- FXJSE_HVALUE hProp = FXJSE_Value_Create(m_pIsolate);
+ CFXJSE_Value* pObject = FXJSE_Context_GetGlobalObject(pContext);
+ CFXJSE_Value* hProp = FXJSE_Value_Create(m_pIsolate);
for (int i = 0; i < 2; ++i) {
- if (FXJSE_Value_GetObjectProp(hObject, OBJ_NAME[i], hProp))
- FXJSE_Value_DeleteObjectProp(hObject, OBJ_NAME[i]);
+ if (FXJSE_Value_GetObjectProp(pObject, OBJ_NAME[i], hProp))
+ FXJSE_Value_DeleteObjectProp(pObject, OBJ_NAME[i]);
}
FXJSE_Value_Release(hProp);
- FXJSE_Value_Release(hObject);
+ FXJSE_Value_Release(pObject);
}
CFXJSE_Class* CXFA_ScriptContext::GetJseNormalClass() {
return m_pJsClass;
@@ -643,13 +645,13 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
}
if (rndFind.m_dwFlag == XFA_RESOVENODE_RSTYPE_Attribute &&
rndFind.m_pScriptAttribute && nStart < wsExpression.GetLength()) {
- FXJSE_HVALUE hValue = FXJSE_Value_Create(m_pIsolate);
+ CFXJSE_Value* pValue = FXJSE_Value_Create(m_pIsolate);
(rndFind.m_Nodes[0]->*(rndFind.m_pScriptAttribute->lpfnCallback))(
- hValue, FALSE,
+ pValue, FALSE,
(XFA_ATTRIBUTE)rndFind.m_pScriptAttribute->eAttribute);
- rndFind.m_Nodes.SetAt(0,
- (CXFA_Object*)FXJSE_Value_ToObject(hValue, NULL));
- FXJSE_Value_Release(hValue);
+ rndFind.m_Nodes.SetAt(
+ 0, (CXFA_Object*)FXJSE_Value_ToObject(pValue, nullptr));
+ FXJSE_Value_Release(pValue);
}
int32_t iSize = m_upObjectArray.GetSize();
if (iSize) {
@@ -712,21 +714,20 @@ int32_t CXFA_ScriptContext::ResolveObjects(CXFA_Object* refNode,
}
return nNodes;
}
-FXJSE_HVALUE CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject) {
- if (!pObject) {
- return NULL;
- }
- if (pObject->IsNode()) {
+CFXJSE_Value* CXFA_ScriptContext::GetJSValueFromMap(CXFA_Object* pObject) {
+ if (!pObject)
+ return nullptr;
+ if (pObject->IsNode())
RunVariablesScript(pObject->AsNode());
- }
- void* pValue = m_mapXFAToHValue.GetValueAt(pObject);
- if (pValue == NULL) {
- FXJSE_HVALUE jsHvalue = FXJSE_Value_Create(m_pIsolate);
- FXJSE_Value_SetObject(jsHvalue, pObject, m_pJsClass);
- m_mapXFAToHValue.SetAt(pObject, jsHvalue);
- pValue = jsHvalue;
- }
- return (FXJSE_HVALUE)pValue;
+
+ void* pValue = m_mapXFAToValue.GetValueAt(pObject);
+ if (!pValue) {
+ CFXJSE_Value* jsValue = FXJSE_Value_Create(m_pIsolate);
+ FXJSE_Value_SetObject(jsValue, pObject, m_pJsClass);
+ m_mapXFAToValue.SetAt(pObject, jsValue);
+ pValue = jsValue;
+ }
+ return static_cast<CFXJSE_Value*>(pValue);
}
int32_t CXFA_ScriptContext::GetIndexByName(CXFA_Node* refNode) {
CXFA_NodeHelper* lpNodeHelper = m_pResolveProcessor->GetNodeHelper();
diff --git a/xfa/fxfa/parser/xfa_script_imp.h b/xfa/fxfa/parser/xfa_script_imp.h
index 5d1269b767..1060911e88 100644
--- a/xfa/fxfa/parser/xfa_script_imp.h
+++ b/xfa/fxfa/parser/xfa_script_imp.h
@@ -28,7 +28,7 @@ class CXFA_ScriptContext {
CXFA_EventParam* GetEventParam() { return &m_eventParam; }
FX_BOOL RunScript(XFA_SCRIPTLANGTYPE eScriptType,
const CFX_WideStringC& wsScript,
- FXJSE_HVALUE hRetValue,
+ CFXJSE_Value* pRetValue,
CXFA_Object* pThisObject = NULL);
int32_t ResolveObjects(CXFA_Object* refNode,
@@ -36,7 +36,7 @@ class CXFA_ScriptContext {
XFA_RESOLVENODE_RS& resolveNodeRS,
uint32_t dwStyles = XFA_RESOLVENODE_Children,
CXFA_Node* bindNode = NULL);
- FXJSE_HVALUE GetJSValueFromMap(CXFA_Object* pObject);
+ CFXJSE_Value* GetJSValueFromMap(CXFA_Object* pObject);
void CacheList(CXFA_NodeList* pList) { m_CacheListArray.Add(pList); }
CXFA_Object* GetThisObject() const { return m_pThisObject; }
v8::Isolate* GetRuntime() const { return m_pIsolate; }
@@ -54,34 +54,34 @@ class CXFA_ScriptContext {
FX_BOOL IsRunAtClient() { return m_eRunAtType != XFA_ATTRIBUTEENUM_Server; }
FX_BOOL QueryNodeByFlag(CXFA_Node* refNode,
const CFX_WideStringC& propname,
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
uint32_t dwFlag,
FX_BOOL bSetting);
- FX_BOOL QueryVariableHValue(CXFA_Node* pScriptNode,
- const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue,
- FX_BOOL bGetter);
- FX_BOOL QueryBuiltinHValue(const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
- static void GlobalPropertyGetter(FXJSE_HOBJECT hObject,
+ FX_BOOL QueryVariableValue(CXFA_Node* pScriptNode,
+ const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue,
+ FX_BOOL bGetter);
+ FX_BOOL QueryBuiltinValue(const CFX_ByteStringC& szPropName,
+ CFXJSE_Value* pValue);
+ static void GlobalPropertyGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
- static void GlobalPropertySetter(FXJSE_HOBJECT hObject,
+ CFXJSE_Value* pValue);
+ static void GlobalPropertySetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
- static void NormalPropertyGetter(FXJSE_HOBJECT hObject,
+ CFXJSE_Value* pValue);
+ static void NormalPropertyGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
- static void NormalPropertySetter(FXJSE_HOBJECT hObject,
+ CFXJSE_Value* pValue);
+ static void NormalPropertySetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
- FXJSE_HVALUE hValue);
- static void NormalMethodCall(FXJSE_HOBJECT hThis,
+ CFXJSE_Value* pValue);
+ static void NormalMethodCall(CFXJSE_Value* hThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
- static int32_t NormalPropTypeGetter(FXJSE_HOBJECT hObject,
+ static int32_t NormalPropTypeGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn);
- static int32_t GlobalPropTypeGetter(FXJSE_HOBJECT hObject,
+ static int32_t GlobalPropTypeGetter(CFXJSE_Value* pObject,
const CFX_ByteStringC& szPropName,
FX_BOOL bQueryIn);
FX_BOOL RunVariablesScript(CXFA_Node* pScriptNode);
@@ -107,7 +107,7 @@ class CXFA_ScriptContext {
XFA_SCRIPTLANGTYPE m_eScriptType;
FXJSE_CLASS m_JsGlobalClass;
FXJSE_CLASS m_JsNormalClass;
- CFX_MapPtrTemplate<CXFA_Object*, FXJSE_HVALUE> m_mapXFAToHValue;
+ CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Value*> m_mapXFAToValue;
FXJSE_CLASS m_JsGlobalVariablesClass;
CFX_MapPtrTemplate<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext;
CXFA_EventParam m_eventParam;
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index ffb3a9e588..1720d7350a 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -30,7 +30,7 @@ CScript_LayoutPseudoModel::CScript_LayoutPseudoModel(CXFA_Document* pDocument)
}
CScript_LayoutPseudoModel::~CScript_LayoutPseudoModel() {}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready(
- FXJSE_HVALUE hValue,
+ CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -42,7 +42,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready(
return;
}
int32_t iStatus = pNotify->GetLayoutStatus();
- FXJSE_Value_SetBoolean(hValue, iStatus >= 2);
+ FXJSE_Value_SetBoolean(pValue, iStatus >= 2);
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
CFXJSE_Arguments* pArguments,
@@ -99,9 +99,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
pLayoutItem = pLayoutItem->GetNext();
iIndex--;
}
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (!pLayoutItem) {
- FXJSE_Value_SetFloat(hValue, 0);
+ FXJSE_Value_SetFloat(pValue, 0);
return;
}
pLayoutItem->GetRect(rtRect, TRUE);
@@ -122,8 +122,8 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
XFA_UNIT unit = measure.GetUnit(wsUnit.AsStringC());
FX_FLOAT fValue = measure.ToUnit(unit);
fValue = FXSYS_round(fValue * 1000) / 1000.0f;
- if (hValue) {
- FXJSE_Value_SetFloat(hValue, fValue);
+ if (pValue) {
+ FXJSE_Value_SetFloat(pValue, fValue);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_H(
@@ -165,9 +165,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_NumberedPageCount(
} else {
iPageCount = iPageNum;
}
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageCount);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageCount);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageCount(
@@ -192,17 +192,17 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(
if (!pDocLayout) {
return;
}
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
CXFA_LayoutItem* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
if (!pLayoutItem) {
- FXJSE_Value_SetInteger(hValue, -1);
+ FXJSE_Value_SetInteger(pValue, -1);
return;
}
int32_t iLast = pLayoutItem->GetLast()->GetPage()->GetPageIndex();
int32_t iFirst = pLayoutItem->GetFirst()->GetPage()->GetPageIndex();
int32_t iPageSpan = iLast - iFirst + 1;
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageSpan);
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageSpan);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Page(
@@ -395,9 +395,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageCountInBatch(
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
int32_t iPageCount = pNotify->GetDocProvider()->AbsPageCountInBatch(hDoc);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageCount);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageCount);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetCountInBatch(
@@ -408,9 +408,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetCountInBatch(
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
int32_t iPageCount = pNotify->GetDocProvider()->SheetCountInBatch(hDoc);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageCount);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageCount);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Relayout(
@@ -459,9 +459,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
int32_t iPageCount = pNotify->GetDocProvider()->AbsPageInBatch(hDoc, hWidget);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageCount);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageCount);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(
@@ -494,9 +494,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
int32_t iPageCount = pNotify->GetDocProvider()->SheetInBatch(hDoc, hWidget);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, iPageCount);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, iPageCount);
}
}
void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Sheet(
@@ -532,9 +532,9 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(
pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
int32_t iPage = 0;
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (!pNode && hValue) {
- FXJSE_Value_SetInteger(hValue, iPage);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (!pNode && pValue) {
+ FXJSE_Value_SetInteger(pValue, iPage);
}
CXFA_LayoutProcessor* pDocLayout = m_pDocument->GetDocLayout();
if (!pDocLayout) {
@@ -542,11 +542,11 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(
}
CXFA_LayoutItem* pLayoutItem = pDocLayout->GetLayoutItem(pNode);
if (!pLayoutItem) {
- FXJSE_Value_SetInteger(hValue, -1);
+ FXJSE_Value_SetInteger(pValue, -1);
return;
}
iPage = pLayoutItem->GetFirst()->GetPage()->GetPageIndex();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, bAbsPage ? iPage : iPage + 1);
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, bAbsPage ? iPage : iPage + 1);
}
}
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.h b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.h
index 7473bc0fe1..5063153767 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.h
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.h
@@ -23,7 +23,7 @@ class CScript_LayoutPseudoModel : public CXFA_OrdinaryObject {
explicit CScript_LayoutPseudoModel(CXFA_Document* pDocument);
~CScript_LayoutPseudoModel();
- void Script_LayoutPseudoModel_Ready(FXJSE_HVALUE hValue,
+ void Script_LayoutPseudoModel_Ready(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 138ac66165..aa2fa87c4a 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -709,7 +709,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(
for (int32_t i = iFoundCount - 1; i >= 0; i--) {
CXFA_Object* node = findNodes[i];
FX_BOOL bRet = FALSE;
- FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
+ CFXJSE_Value* pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
bRet = pContext->RunScript(eLangType, wsExpression.AsStringC(), pRetValue,
node);
if (!bRet || !FXJSE_Value_ToBoolean(pRetValue)) {
diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
index 913269fd80..2a397541da 100644
--- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
@@ -42,9 +42,9 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(
pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
int32_t bVerify = pNotify->GetDocProvider()->Verify(hDoc, pNode);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetInteger(hValue, bVerify);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetInteger(pValue, bVerify);
}
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(
@@ -75,9 +75,9 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(
}
FX_BOOL bSign = pNotify->GetDocProvider()->Sign(
hDoc, pNodeList, wsExpression.AsStringC(), wsXMLIdent.AsStringC());
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetBoolean(hValue, bSign);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetBoolean(pValue, bSign);
}
}
void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(
@@ -119,8 +119,8 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Clear(
bClear = pArguments->GetInt32(1) == 0 ? FALSE : TRUE;
}
FX_BOOL bFlag = pNotify->GetDocProvider()->Clear(hDoc, pNode, bClear);
- FXJSE_HVALUE hValue = pArguments->GetReturnValue();
- if (hValue) {
- FXJSE_Value_SetBoolean(hValue, bFlag);
+ CFXJSE_Value* pValue = pArguments->GetReturnValue();
+ if (pValue) {
+ FXJSE_Value_SetBoolean(pValue, bFlag);
}
}