OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_ |
8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ | 8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ |
9 | 9 |
10 #include "xfa/fde/xml/fde_xml.h" | 10 #include "xfa/fde/xml/fde_xml.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 }; | 41 }; |
42 class CXFA_Object { | 42 class CXFA_Object { |
43 public: | 43 public: |
44 CXFA_Object(CXFA_Document* pDocument, uint32_t uFlags); | 44 CXFA_Object(CXFA_Document* pDocument, uint32_t uFlags); |
45 CXFA_Document* GetDocument() const { return m_pDocument; } | 45 CXFA_Document* GetDocument() const { return m_pDocument; } |
46 uint32_t GetFlag() const { return m_uFlags; } | 46 uint32_t GetFlag() const { return m_uFlags; } |
47 XFA_OBJECTTYPE GetObjectType() const { | 47 XFA_OBJECTTYPE GetObjectType() const { |
48 return (XFA_OBJECTTYPE)(m_uFlags & XFA_OBJECTTYPEMASK); | 48 return (XFA_OBJECTTYPE)(m_uFlags & XFA_OBJECTTYPEMASK); |
49 } | 49 } |
50 | 50 |
51 FX_BOOL IsNode() const { | 51 bool IsNode() const { |
52 return (m_uFlags & XFA_OBJECTTYPEMASK) >= XFA_OBJECTTYPE_Node; | 52 return (m_uFlags & XFA_OBJECTTYPEMASK) >= XFA_OBJECTTYPE_Node; |
53 } | 53 } |
54 FX_BOOL IsOrdinaryObject() const { | 54 bool IsOrdinaryObject() const { |
55 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryObject; | 55 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryObject; |
56 } | 56 } |
57 FX_BOOL IsNodeList() const { | 57 bool IsNodeList() const { |
58 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_NodeList; | 58 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_NodeList; |
59 } | 59 } |
60 FX_BOOL IsOrdinaryList() const { | 60 bool IsOrdinaryList() const { |
61 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryList; | 61 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_OrdinaryList; |
62 } | 62 } |
63 FX_BOOL IsContentNode() const { | 63 bool IsContentNode() const { |
64 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContentNode; | 64 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContentNode; |
65 } | 65 } |
66 FX_BOOL IsContainerNode() const { | 66 bool IsContainerNode() const { |
67 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContainerNode; | 67 return (m_uFlags & XFA_OBJECTTYPEMASK) == XFA_OBJECTTYPE_ContainerNode; |
68 } | 68 } |
69 | 69 |
70 CXFA_Node* AsNode(); | 70 CXFA_Node* AsNode(); |
71 CXFA_OrdinaryObject* AsOrdinaryObject(); | 71 CXFA_OrdinaryObject* AsOrdinaryObject(); |
72 CXFA_NodeList* AsNodeList(); | 72 CXFA_NodeList* AsNodeList(); |
73 | 73 |
74 const CXFA_Node* AsNode() const; | 74 const CXFA_Node* AsNode() const; |
75 const CXFA_OrdinaryObject* AsOrdinaryObject() const; | 75 const CXFA_OrdinaryObject* AsOrdinaryObject() const; |
76 const CXFA_NodeList* AsNodeList() const; | 76 const CXFA_NodeList* AsNodeList() const; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 }; | 127 }; |
128 | 128 |
129 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R') | 129 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R') |
130 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C') | 130 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C') |
131 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M') | 131 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M') |
132 class CXFA_Node : public CXFA_Object { | 132 class CXFA_Node : public CXFA_Object { |
133 public: | 133 public: |
134 XFA_ELEMENT GetClassID() const { return (XFA_ELEMENT)m_eNodeClass; } | 134 XFA_ELEMENT GetClassID() const { return (XFA_ELEMENT)m_eNodeClass; } |
135 uint32_t GetPacketID() const { return m_ePacket; } | 135 uint32_t GetPacketID() const { return m_ePacket; } |
136 FX_BOOL HasFlag(uint32_t dwFlag) const; | 136 FX_BOOL HasFlag(uint32_t dwFlag) const; |
137 void SetFlag(uint32_t dwFlag, FX_BOOL bOn = TRUE, FX_BOOL bNotify = TRUE); | 137 void SetFlag(uint32_t dwFlag, FX_BOOL bOn = TRUE, bool bNotify = true); |
138 FX_BOOL IsAttributeInXML(); | 138 FX_BOOL IsAttributeInXML(); |
139 FX_BOOL IsFormContainer() { | 139 bool IsFormContainer() const { |
140 return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode(); | 140 return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode(); |
141 } | 141 } |
142 void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; } | 142 void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; } |
143 CFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; } | 143 CFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; } |
144 CFDE_XMLNode* CreateXMLMappingNode(); | 144 CFDE_XMLNode* CreateXMLMappingNode(); |
145 FX_BOOL IsNeedSavingXMLNode(); | 145 FX_BOOL IsNeedSavingXMLNode(); |
146 uint32_t GetNameHash() const { return m_dwNameHash; } | 146 uint32_t GetNameHash() const { return m_dwNameHash; } |
147 bool IsUnnamed() const { return m_dwNameHash == 0; } | 147 bool IsUnnamed() const { return m_dwNameHash == 0; } |
148 CXFA_Node* GetModelNode(); | 148 CXFA_Node* GetModelNode(); |
149 void UpdateNameHash(); | 149 void UpdateNameHash(); |
150 FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE); | 150 FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE); |
151 FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, | 151 FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, |
152 const CFX_WideStringC& wsValue, | 152 const CFX_WideStringC& wsValue, |
153 FX_BOOL bNotify = FALSE); | 153 bool bNotify = false); |
154 FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr, | 154 FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr, |
155 CFX_WideString& wsValue, | 155 CFX_WideString& wsValue, |
156 FX_BOOL bUseDefault = TRUE); | 156 FX_BOOL bUseDefault = TRUE); |
157 FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr, | 157 FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr, |
158 const CFX_WideStringC& wsValue, | 158 const CFX_WideStringC& wsValue, |
159 FX_BOOL bNotify = FALSE); | 159 bool bNotify = false); |
160 FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr, | 160 FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr, |
161 CFX_WideString& wsValue, | 161 CFX_WideString& wsValue, |
162 FX_BOOL bUseDefault = TRUE); | 162 FX_BOOL bUseDefault = TRUE); |
163 FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr); | 163 FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr); |
164 FX_BOOL SetContent(const CFX_WideString& wsContent, | 164 FX_BOOL SetContent(const CFX_WideString& wsContent, |
165 const CFX_WideString& wsXMLValue, | 165 const CFX_WideString& wsXMLValue, |
166 FX_BOOL bNotify = FALSE, | 166 bool bNotify = false, |
167 FX_BOOL bScriptModify = FALSE, | 167 FX_BOOL bScriptModify = FALSE, |
168 FX_BOOL bSyncData = TRUE); | 168 FX_BOOL bSyncData = TRUE); |
169 FX_BOOL TryContent(CFX_WideString& wsContent, | 169 FX_BOOL TryContent(CFX_WideString& wsContent, |
170 FX_BOOL bScriptModify = FALSE, | 170 FX_BOOL bScriptModify = FALSE, |
171 FX_BOOL bProto = TRUE); | 171 FX_BOOL bProto = TRUE); |
172 CFX_WideString GetContent(); | 172 CFX_WideString GetContent(); |
173 | 173 |
174 FX_BOOL TryNamespace(CFX_WideString& wsNamespace); | 174 FX_BOOL TryNamespace(CFX_WideString& wsNamespace); |
175 | 175 |
176 FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, | 176 FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, |
177 FX_BOOL bValue, | 177 FX_BOOL bValue, |
178 FX_BOOL bNotify = FALSE) { | 178 bool bNotify = false) { |
179 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, | 179 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, |
180 bNotify); | 180 bNotify); |
181 } | 181 } |
182 FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, | 182 FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, |
183 FX_BOOL& bValue, | 183 FX_BOOL& bValue, |
184 FX_BOOL bUseDefault = TRUE); | 184 FX_BOOL bUseDefault = TRUE); |
185 FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) { | 185 FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) { |
186 FX_BOOL bValue; | 186 FX_BOOL bValue; |
187 return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE; | 187 return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE; |
188 } | 188 } |
189 FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, | 189 FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, |
190 int32_t iValue, | 190 int32_t iValue, |
191 FX_BOOL bNotify = FALSE) { | 191 bool bNotify = false) { |
192 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, | 192 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, |
193 bNotify); | 193 bNotify); |
194 } | 194 } |
195 FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, | 195 FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, |
196 int32_t& iValue, | 196 int32_t& iValue, |
197 FX_BOOL bUseDefault = TRUE); | 197 FX_BOOL bUseDefault = TRUE); |
198 int32_t GetInteger(XFA_ATTRIBUTE eAttr) { | 198 int32_t GetInteger(XFA_ATTRIBUTE eAttr) { |
199 int32_t iValue; | 199 int32_t iValue; |
200 return TryInteger(eAttr, iValue, TRUE) ? iValue : 0; | 200 return TryInteger(eAttr, iValue, TRUE) ? iValue : 0; |
201 } | 201 } |
202 FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, | 202 FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, |
203 XFA_ATTRIBUTEENUM eValue, | 203 XFA_ATTRIBUTEENUM eValue, |
204 FX_BOOL bNotify = FALSE) { | 204 bool bNotify = false) { |
205 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, | 205 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, |
206 bNotify); | 206 bNotify); |
207 } | 207 } |
208 FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, | 208 FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, |
209 XFA_ATTRIBUTEENUM& eValue, | 209 XFA_ATTRIBUTEENUM& eValue, |
210 FX_BOOL bUseDefault = TRUE); | 210 FX_BOOL bUseDefault = TRUE); |
211 XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) { | 211 XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) { |
212 XFA_ATTRIBUTEENUM eValue; | 212 XFA_ATTRIBUTEENUM eValue; |
213 return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown; | 213 return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown; |
214 } | 214 } |
215 FX_BOOL SetCData(XFA_ATTRIBUTE eAttr, | 215 FX_BOOL SetCData(XFA_ATTRIBUTE eAttr, |
216 const CFX_WideString& wsValue, | 216 const CFX_WideString& wsValue, |
217 FX_BOOL bNotify = FALSE, | 217 bool bNotify = false, |
218 FX_BOOL bScriptModify = FALSE); | 218 FX_BOOL bScriptModify = FALSE); |
219 FX_BOOL SetAttributeValue(const CFX_WideString& wsValue, | 219 FX_BOOL SetAttributeValue(const CFX_WideString& wsValue, |
220 const CFX_WideString& wsXMLValue, | 220 const CFX_WideString& wsXMLValue, |
221 FX_BOOL bNotify = FALSE, | 221 bool bNotify = false, |
222 FX_BOOL bScriptModify = FALSE); | 222 FX_BOOL bScriptModify = FALSE); |
223 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, | 223 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, |
224 CFX_WideString& wsValue, | 224 CFX_WideString& wsValue, |
225 FX_BOOL bUseDefault = TRUE, | 225 FX_BOOL bUseDefault = TRUE, |
226 FX_BOOL bProto = TRUE); | 226 FX_BOOL bProto = TRUE); |
227 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, | 227 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, |
228 CFX_WideStringC& wsValue, | 228 CFX_WideStringC& wsValue, |
229 FX_BOOL bUseDefault = TRUE, | 229 FX_BOOL bUseDefault = TRUE, |
230 FX_BOOL bProto = TRUE); | 230 FX_BOOL bProto = TRUE); |
231 CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) { | 231 CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) { |
232 CFX_WideStringC wsValue; | 232 CFX_WideStringC wsValue; |
233 return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC(); | 233 return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC(); |
234 } | 234 } |
235 FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, | 235 FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, |
236 CXFA_Measurement mValue, | 236 CXFA_Measurement mValue, |
237 FX_BOOL bNotify = FALSE); | 237 bool bNotify = false); |
238 FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, | 238 FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, |
239 CXFA_Measurement& mValue, | 239 CXFA_Measurement& mValue, |
240 FX_BOOL bUseDefault = TRUE) const; | 240 FX_BOOL bUseDefault = TRUE) const; |
241 CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) const; | 241 CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) const; |
242 FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, | 242 FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, |
243 void* pData, | 243 void* pData, |
244 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); | 244 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); |
245 FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData); | 245 FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData); |
246 void* GetObject(XFA_ATTRIBUTE eAttr) { | 246 void* GetObject(XFA_ATTRIBUTE eAttr) { |
247 void* pData; | 247 void* pData; |
248 return TryObject(eAttr, pData) ? pData : NULL; | 248 return TryObject(eAttr, pData) ? pData : NULL; |
249 } | 249 } |
250 FX_BOOL SetUserData(void* pKey, | 250 FX_BOOL SetUserData(void* pKey, |
251 void* pData, | 251 void* pData, |
252 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); | 252 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); |
253 FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE); | 253 FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE); |
254 void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) { | 254 void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) { |
255 void* pData; | 255 void* pData; |
256 return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL; | 256 return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL; |
257 } | 257 } |
258 CXFA_Node* GetProperty(int32_t index, | 258 CXFA_Node* GetProperty(int32_t index, |
259 XFA_ELEMENT eProperty, | 259 XFA_ELEMENT eProperty, |
260 FX_BOOL bCreateProperty = TRUE); | 260 FX_BOOL bCreateProperty = TRUE); |
261 int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE); | 261 int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE); |
262 CXFA_Node* GetChild(int32_t index, | 262 CXFA_Node* GetChild(int32_t index, |
263 XFA_ELEMENT eElement, | 263 XFA_ELEMENT eElement, |
264 FX_BOOL bOnlyChild = FALSE); | 264 FX_BOOL bOnlyChild = FALSE); |
265 int32_t InsertChild(int32_t index, CXFA_Node* pNode); | 265 int32_t InsertChild(int32_t index, CXFA_Node* pNode); |
266 FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL); | 266 FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL); |
267 FX_BOOL RemoveChild(CXFA_Node* pNode, FX_BOOL bNotify = TRUE); | 267 FX_BOOL RemoveChild(CXFA_Node* pNode, bool bNotify = true); |
268 CXFA_Node* Clone(FX_BOOL bRecursive); | 268 CXFA_Node* Clone(FX_BOOL bRecursive); |
269 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const; | 269 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const; |
270 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const; | 270 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const; |
271 int32_t GetNodeList(CXFA_NodeArray& nodes, | 271 int32_t GetNodeList(CXFA_NodeArray& nodes, |
272 uint32_t dwTypeFilter = XFA_NODEFILTER_Children | | 272 uint32_t dwTypeFilter = XFA_NODEFILTER_Children | |
273 XFA_NODEFILTER_Properties, | 273 XFA_NODEFILTER_Properties, |
274 XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, | 274 XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, |
275 int32_t iLevel = 1); | 275 int32_t iLevel = 1); |
276 CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, | 276 CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, |
277 uint32_t dwFlags = XFA_NODEFLAG_Initialized); | 277 uint32_t dwFlags = XFA_NODEFLAG_Initialized); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 void Script_Delta_Restore(CFXJSE_Arguments* pArguments); | 369 void Script_Delta_Restore(CFXJSE_Arguments* pArguments); |
370 void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, | 370 void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, |
371 FX_BOOL bSetting, | 371 FX_BOOL bSetting, |
372 XFA_ATTRIBUTE eAttribute); | 372 XFA_ATTRIBUTE eAttribute); |
373 void Script_Delta_SavedValue(FXJSE_HVALUE hValue, | 373 void Script_Delta_SavedValue(FXJSE_HVALUE hValue, |
374 FX_BOOL bSetting, | 374 FX_BOOL bSetting, |
375 XFA_ATTRIBUTE eAttribute); | 375 XFA_ATTRIBUTE eAttribute); |
376 void Script_Delta_Target(FXJSE_HVALUE hValue, | 376 void Script_Delta_Target(FXJSE_HVALUE hValue, |
377 FX_BOOL bSetting, | 377 FX_BOOL bSetting, |
378 XFA_ATTRIBUTE eAttribute); | 378 XFA_ATTRIBUTE eAttribute); |
379 void Script_Attribute_SendAttributeChangeMessage(void* eAttribute, | 379 void Script_Attribute_SendAttributeChangeMessage(XFA_ATTRIBUTE eAttribute, |
380 void* eValue, | |
381 FX_BOOL bScriptModify); | 380 FX_BOOL bScriptModify); |
382 void Script_Attribute_Integer(FXJSE_HVALUE hValue, | 381 void Script_Attribute_Integer(FXJSE_HVALUE hValue, |
383 FX_BOOL bSetting, | 382 FX_BOOL bSetting, |
384 XFA_ATTRIBUTE eAttribute); | 383 XFA_ATTRIBUTE eAttribute); |
385 void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, | 384 void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, |
386 FX_BOOL bSetting, | 385 FX_BOOL bSetting, |
387 XFA_ATTRIBUTE eAttribute); | 386 XFA_ATTRIBUTE eAttribute); |
388 void Script_Attribute_BOOL(FXJSE_HVALUE hValue, | 387 void Script_Attribute_BOOL(FXJSE_HVALUE hValue, |
389 FX_BOOL bSetting, | 388 FX_BOOL bSetting, |
390 XFA_ATTRIBUTE eAttribute); | 389 XFA_ATTRIBUTE eAttribute); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 XFA_ATTRIBUTE eAttribute); | 585 XFA_ATTRIBUTE eAttribute); |
587 | 586 |
588 protected: | 587 protected: |
589 CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement); | 588 CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement); |
590 ~CXFA_Node(); | 589 ~CXFA_Node(); |
591 friend class CXFA_Document; | 590 friend class CXFA_Document; |
592 CXFA_Node* Deprecated_GetPrevSibling(); | 591 CXFA_Node* Deprecated_GetPrevSibling(); |
593 FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, | 592 FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, |
594 XFA_ATTRIBUTETYPE eType, | 593 XFA_ATTRIBUTETYPE eType, |
595 void* pValue, | 594 void* pValue, |
596 FX_BOOL bNotify); | 595 bool bNotify); |
597 FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, | 596 FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, |
598 XFA_ATTRIBUTETYPE eType, | 597 XFA_ATTRIBUTETYPE eType, |
599 FX_BOOL bUseDefault, | 598 FX_BOOL bUseDefault, |
600 void*& pValue); | 599 void*& pValue); |
601 void OnRemoved(CXFA_Node* pParent, CXFA_Node* pRemoved, FX_BOOL bNotify); | 600 void OnRemoved(bool bNotify); |
602 void OnChanging(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify); | 601 void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify); |
603 void OnChanged(XFA_ATTRIBUTE eAttr, | 602 void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, FX_BOOL bScriptModify); |
604 void* pNewValue, | |
605 FX_BOOL bNotify, | |
606 FX_BOOL bScriptModify = FALSE); | |
607 int32_t execSingleEventByName(const CFX_WideStringC& wsEventName, | 603 int32_t execSingleEventByName(const CFX_WideStringC& wsEventName, |
608 XFA_ELEMENT eElementType); | 604 XFA_ELEMENT eElementType); |
609 FX_BOOL SetScriptContent(const CFX_WideString& wsContent, | 605 FX_BOOL SetScriptContent(const CFX_WideString& wsContent, |
610 const CFX_WideString& wsXMLValue, | 606 const CFX_WideString& wsXMLValue, |
611 FX_BOOL bNotify = TRUE, | 607 bool bNotify = true, |
612 FX_BOOL bScriptModify = FALSE, | 608 FX_BOOL bScriptModify = FALSE, |
613 FX_BOOL bSyncData = TRUE); | 609 FX_BOOL bSyncData = TRUE); |
614 CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE); | 610 CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE); |
615 XFA_MAPMODULEDATA* CreateMapModuleData(); | 611 XFA_MAPMODULEDATA* CreateMapModuleData(); |
616 XFA_MAPMODULEDATA* GetMapModuleData() const; | 612 XFA_MAPMODULEDATA* GetMapModuleData() const; |
617 void SetMapModuleValue(void* pKey, void* pValue); | 613 void SetMapModuleValue(void* pKey, void* pValue); |
618 FX_BOOL GetMapModuleValue(void* pKey, void*& pValue); | 614 FX_BOOL GetMapModuleValue(void* pKey, void*& pValue); |
619 void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue); | 615 void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue); |
620 FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue); | 616 FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue); |
621 void SetMapModuleBuffer(void* pKey, | 617 void SetMapModuleBuffer(void* pKey, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 return pObj ? pObj->AsNode() : nullptr; | 792 return pObj ? pObj->AsNode() : nullptr; |
797 } | 793 } |
798 inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { | 794 inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { |
799 return pObj ? pObj->AsOrdinaryObject() : nullptr; | 795 return pObj ? pObj->AsOrdinaryObject() : nullptr; |
800 } | 796 } |
801 inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { | 797 inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { |
802 return pObj ? pObj->AsNodeList() : nullptr; | 798 return pObj ? pObj->AsNodeList() : nullptr; |
803 } | 799 } |
804 | 800 |
805 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ | 801 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ |
OLD | NEW |