From 5548984944785d80daa03d98e92698309a3bc604 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 13 Dec 2017 01:19:24 +0000 Subject: Move Script_Som_* methods to CJX_Object The CJX_Node isn't the root of the CJX hierarchy. This causes issues now that CJX_Object has child objects which don't inherit from CJX_Node. This CL moves Script_Som_* from CJX_Node to CJX_Object. Change-Id: Iacb21758d9bf83f148044af225c710ad7d8521d2 Reviewed-on: https://pdfium-review.googlesource.com/20993 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- fxjs/xfa/cjx_object.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'fxjs/xfa/cjx_object.h') diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index 1263bf82c5..10146f4ef9 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h @@ -77,6 +77,18 @@ class CJX_Object { pdfium::Optional TryAttribute(XFA_Attribute eAttr, bool bUseDefault); + pdfium::Optional TryContent(bool bScriptModify, bool bProto); + bool SetContent(const WideString& wsContent, + const WideString& wsXMLValue, + bool bNotify, + bool bScriptModify, + bool bSyncData); + WideString GetContent(bool bScriptModify); + + CXFA_Node* GetProperty(int32_t index, + XFA_Element eType, + bool bCreateProperty); + void SetAttributeValue(const WideString& wsValue, const WideString& wsXMLValue, bool bNotify, @@ -113,6 +125,21 @@ class CJX_Object { void Script_Field_FormatMessage(CFXJSE_Value* pValue, bool bSetting, XFA_Attribute eAttribute); + void Script_Som_DefaultValue(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Som_DefaultValue_Read(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Som_DataNode(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Som_Mandatory(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Som_InstanceIndex(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); pdfium::Optional TryInteger(XFA_Attribute eAttr, bool bUseDefault); bool SetInteger(XFA_Attribute eAttr, int32_t iValue, bool bNotify); @@ -170,6 +197,16 @@ class CJX_Object { void Script_Som_Message(CFXJSE_Value* pValue, bool bSetting, XFA_SOM_MESSAGETYPE iMessageType); + void Script_Boolean_DefaultValue(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Draw_DefaultValue(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + void Script_Field_DefaultValue(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + int32_t Subform_and_SubformSet_InstanceIndex(); void OnChanged(XFA_Attribute eAttr, bool bNotify, bool bScriptModify); void OnChanging(XFA_Attribute eAttr, bool bNotify); -- cgit v1.2.3