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, bool bNotify); |
| 138 void ClearFlag(uint32_t dwFlag); |
| 139 |
138 FX_BOOL IsAttributeInXML(); | 140 FX_BOOL IsAttributeInXML(); |
139 FX_BOOL IsFormContainer() { | 141 bool IsFormContainer() const { |
140 return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode(); | 142 return m_ePacket == XFA_XDPPACKET_Form && IsContainerNode(); |
141 } | 143 } |
142 void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; } | 144 void SetXMLMappingNode(CFDE_XMLNode* pXMLNode) { m_pXMLNode = pXMLNode; } |
143 CFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; } | 145 CFDE_XMLNode* GetXMLMappingNode() const { return m_pXMLNode; } |
144 CFDE_XMLNode* CreateXMLMappingNode(); | 146 CFDE_XMLNode* CreateXMLMappingNode(); |
145 FX_BOOL IsNeedSavingXMLNode(); | 147 FX_BOOL IsNeedSavingXMLNode(); |
146 uint32_t GetNameHash() const { return m_dwNameHash; } | 148 uint32_t GetNameHash() const { return m_dwNameHash; } |
147 bool IsUnnamed() const { return m_dwNameHash == 0; } | 149 bool IsUnnamed() const { return m_dwNameHash == 0; } |
148 CXFA_Node* GetModelNode(); | 150 CXFA_Node* GetModelNode(); |
149 void UpdateNameHash(); | 151 void UpdateNameHash(); |
150 FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE); | 152 FX_BOOL HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit = FALSE); |
151 FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, | 153 FX_BOOL SetAttribute(XFA_ATTRIBUTE eAttr, |
152 const CFX_WideStringC& wsValue, | 154 const CFX_WideStringC& wsValue, |
153 FX_BOOL bNotify = FALSE); | 155 bool bNotify = false); |
154 FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr, | 156 FX_BOOL GetAttribute(XFA_ATTRIBUTE eAttr, |
155 CFX_WideString& wsValue, | 157 CFX_WideString& wsValue, |
156 FX_BOOL bUseDefault = TRUE); | 158 FX_BOOL bUseDefault = TRUE); |
157 FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr, | 159 FX_BOOL SetAttribute(const CFX_WideStringC& wsAttr, |
158 const CFX_WideStringC& wsValue, | 160 const CFX_WideStringC& wsValue, |
159 FX_BOOL bNotify = FALSE); | 161 bool bNotify = false); |
160 FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr, | 162 FX_BOOL GetAttribute(const CFX_WideStringC& wsAttr, |
161 CFX_WideString& wsValue, | 163 CFX_WideString& wsValue, |
162 FX_BOOL bUseDefault = TRUE); | 164 FX_BOOL bUseDefault = TRUE); |
163 FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr); | 165 FX_BOOL RemoveAttribute(const CFX_WideStringC& wsAttr); |
164 FX_BOOL SetContent(const CFX_WideString& wsContent, | 166 FX_BOOL SetContent(const CFX_WideString& wsContent, |
165 const CFX_WideString& wsXMLValue, | 167 const CFX_WideString& wsXMLValue, |
166 FX_BOOL bNotify = FALSE, | 168 bool bNotify = false, |
167 FX_BOOL bScriptModify = FALSE, | 169 FX_BOOL bScriptModify = FALSE, |
168 FX_BOOL bSyncData = TRUE); | 170 FX_BOOL bSyncData = TRUE); |
169 FX_BOOL TryContent(CFX_WideString& wsContent, | 171 FX_BOOL TryContent(CFX_WideString& wsContent, |
170 FX_BOOL bScriptModify = FALSE, | 172 FX_BOOL bScriptModify = FALSE, |
171 FX_BOOL bProto = TRUE); | 173 FX_BOOL bProto = TRUE); |
172 CFX_WideString GetContent(); | 174 CFX_WideString GetContent(); |
173 | 175 |
174 FX_BOOL TryNamespace(CFX_WideString& wsNamespace); | 176 FX_BOOL TryNamespace(CFX_WideString& wsNamespace); |
175 | 177 |
176 FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, | 178 FX_BOOL SetBoolean(XFA_ATTRIBUTE eAttr, |
177 FX_BOOL bValue, | 179 FX_BOOL bValue, |
178 FX_BOOL bNotify = FALSE) { | 180 bool bNotify = false) { |
179 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, | 181 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, (void*)(uintptr_t)bValue, |
180 bNotify); | 182 bNotify); |
181 } | 183 } |
182 FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, | 184 FX_BOOL TryBoolean(XFA_ATTRIBUTE eAttr, |
183 FX_BOOL& bValue, | 185 FX_BOOL& bValue, |
184 FX_BOOL bUseDefault = TRUE); | 186 FX_BOOL bUseDefault = TRUE); |
185 FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) { | 187 FX_BOOL GetBoolean(XFA_ATTRIBUTE eAttr) { |
186 FX_BOOL bValue; | 188 FX_BOOL bValue; |
187 return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE; | 189 return TryBoolean(eAttr, bValue, TRUE) ? bValue : FALSE; |
188 } | 190 } |
189 FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, | 191 FX_BOOL SetInteger(XFA_ATTRIBUTE eAttr, |
190 int32_t iValue, | 192 int32_t iValue, |
191 FX_BOOL bNotify = FALSE) { | 193 bool bNotify = false) { |
192 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, | 194 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, (void*)(uintptr_t)iValue, |
193 bNotify); | 195 bNotify); |
194 } | 196 } |
195 FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, | 197 FX_BOOL TryInteger(XFA_ATTRIBUTE eAttr, |
196 int32_t& iValue, | 198 int32_t& iValue, |
197 FX_BOOL bUseDefault = TRUE); | 199 FX_BOOL bUseDefault = TRUE); |
198 int32_t GetInteger(XFA_ATTRIBUTE eAttr) { | 200 int32_t GetInteger(XFA_ATTRIBUTE eAttr) { |
199 int32_t iValue; | 201 int32_t iValue; |
200 return TryInteger(eAttr, iValue, TRUE) ? iValue : 0; | 202 return TryInteger(eAttr, iValue, TRUE) ? iValue : 0; |
201 } | 203 } |
202 FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, | 204 FX_BOOL SetEnum(XFA_ATTRIBUTE eAttr, |
203 XFA_ATTRIBUTEENUM eValue, | 205 XFA_ATTRIBUTEENUM eValue, |
204 FX_BOOL bNotify = FALSE) { | 206 bool bNotify = false) { |
205 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, | 207 return SetValue(eAttr, XFA_ATTRIBUTETYPE_Enum, (void*)(uintptr_t)eValue, |
206 bNotify); | 208 bNotify); |
207 } | 209 } |
208 FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, | 210 FX_BOOL TryEnum(XFA_ATTRIBUTE eAttr, |
209 XFA_ATTRIBUTEENUM& eValue, | 211 XFA_ATTRIBUTEENUM& eValue, |
210 FX_BOOL bUseDefault = TRUE); | 212 FX_BOOL bUseDefault = TRUE); |
211 XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) { | 213 XFA_ATTRIBUTEENUM GetEnum(XFA_ATTRIBUTE eAttr) { |
212 XFA_ATTRIBUTEENUM eValue; | 214 XFA_ATTRIBUTEENUM eValue; |
213 return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown; | 215 return TryEnum(eAttr, eValue, TRUE) ? eValue : XFA_ATTRIBUTEENUM_Unknown; |
214 } | 216 } |
215 FX_BOOL SetCData(XFA_ATTRIBUTE eAttr, | 217 FX_BOOL SetCData(XFA_ATTRIBUTE eAttr, |
216 const CFX_WideString& wsValue, | 218 const CFX_WideString& wsValue, |
217 FX_BOOL bNotify = FALSE, | 219 bool bNotify = false, |
218 FX_BOOL bScriptModify = FALSE); | 220 FX_BOOL bScriptModify = FALSE); |
219 FX_BOOL SetAttributeValue(const CFX_WideString& wsValue, | 221 FX_BOOL SetAttributeValue(const CFX_WideString& wsValue, |
220 const CFX_WideString& wsXMLValue, | 222 const CFX_WideString& wsXMLValue, |
221 FX_BOOL bNotify = FALSE, | 223 bool bNotify = false, |
222 FX_BOOL bScriptModify = FALSE); | 224 FX_BOOL bScriptModify = FALSE); |
223 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, | 225 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, |
224 CFX_WideString& wsValue, | 226 CFX_WideString& wsValue, |
225 FX_BOOL bUseDefault = TRUE, | 227 FX_BOOL bUseDefault = TRUE, |
226 FX_BOOL bProto = TRUE); | 228 FX_BOOL bProto = TRUE); |
227 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, | 229 FX_BOOL TryCData(XFA_ATTRIBUTE eAttr, |
228 CFX_WideStringC& wsValue, | 230 CFX_WideStringC& wsValue, |
229 FX_BOOL bUseDefault = TRUE, | 231 FX_BOOL bUseDefault = TRUE, |
230 FX_BOOL bProto = TRUE); | 232 FX_BOOL bProto = TRUE); |
231 CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) { | 233 CFX_WideStringC GetCData(XFA_ATTRIBUTE eAttr) { |
232 CFX_WideStringC wsValue; | 234 CFX_WideStringC wsValue; |
233 return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC(); | 235 return TryCData(eAttr, wsValue) ? wsValue : CFX_WideStringC(); |
234 } | 236 } |
235 FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, | 237 FX_BOOL SetMeasure(XFA_ATTRIBUTE eAttr, |
236 CXFA_Measurement mValue, | 238 CXFA_Measurement mValue, |
237 FX_BOOL bNotify = FALSE); | 239 bool bNotify = false); |
238 FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, | 240 FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, |
239 CXFA_Measurement& mValue, | 241 CXFA_Measurement& mValue, |
240 FX_BOOL bUseDefault = TRUE) const; | 242 FX_BOOL bUseDefault = TRUE) const; |
241 CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) const; | 243 CXFA_Measurement GetMeasure(XFA_ATTRIBUTE eAttr) const; |
242 FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, | 244 FX_BOOL SetObject(XFA_ATTRIBUTE eAttr, |
243 void* pData, | 245 void* pData, |
244 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); | 246 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); |
245 FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData); | 247 FX_BOOL TryObject(XFA_ATTRIBUTE eAttr, void*& pData); |
246 void* GetObject(XFA_ATTRIBUTE eAttr) { | 248 void* GetObject(XFA_ATTRIBUTE eAttr) { |
247 void* pData; | 249 void* pData; |
248 return TryObject(eAttr, pData) ? pData : NULL; | 250 return TryObject(eAttr, pData) ? pData : NULL; |
249 } | 251 } |
250 FX_BOOL SetUserData(void* pKey, | 252 FX_BOOL SetUserData(void* pKey, |
251 void* pData, | 253 void* pData, |
252 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); | 254 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = NULL); |
253 FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE); | 255 FX_BOOL TryUserData(void* pKey, void*& pData, FX_BOOL bProtoAlso = FALSE); |
254 void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) { | 256 void* GetUserData(void* pKey, FX_BOOL bProtoAlso = FALSE) { |
255 void* pData; | 257 void* pData; |
256 return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL; | 258 return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL; |
257 } | 259 } |
258 CXFA_Node* GetProperty(int32_t index, | 260 CXFA_Node* GetProperty(int32_t index, |
259 XFA_ELEMENT eProperty, | 261 XFA_ELEMENT eProperty, |
260 FX_BOOL bCreateProperty = TRUE); | 262 FX_BOOL bCreateProperty = TRUE); |
261 int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE); | 263 int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE); |
262 CXFA_Node* GetChild(int32_t index, | 264 CXFA_Node* GetChild(int32_t index, |
263 XFA_ELEMENT eElement, | 265 XFA_ELEMENT eElement, |
264 FX_BOOL bOnlyChild = FALSE); | 266 FX_BOOL bOnlyChild = FALSE); |
265 int32_t InsertChild(int32_t index, CXFA_Node* pNode); | 267 int32_t InsertChild(int32_t index, CXFA_Node* pNode); |
266 FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL); | 268 FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL); |
267 FX_BOOL RemoveChild(CXFA_Node* pNode, FX_BOOL bNotify = TRUE); | 269 FX_BOOL RemoveChild(CXFA_Node* pNode, bool bNotify = true); |
268 CXFA_Node* Clone(FX_BOOL bRecursive); | 270 CXFA_Node* Clone(FX_BOOL bRecursive); |
269 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const; | 271 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const; |
270 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const; | 272 CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_OBJECTTYPE eType) const; |
271 int32_t GetNodeList(CXFA_NodeArray& nodes, | 273 int32_t GetNodeList(CXFA_NodeArray& nodes, |
272 uint32_t dwTypeFilter = XFA_NODEFILTER_Children | | 274 uint32_t dwTypeFilter = XFA_NODEFILTER_Children | |
273 XFA_NODEFILTER_Properties, | 275 XFA_NODEFILTER_Properties, |
274 XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, | 276 XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, |
275 int32_t iLevel = 1); | 277 int32_t iLevel = 1); |
276 CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, | 278 CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, |
277 uint32_t dwFlags = XFA_NODEFLAG_Initialized); | 279 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); | 371 void Script_Delta_Restore(CFXJSE_Arguments* pArguments); |
370 void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, | 372 void Script_Delta_CurrentValue(FXJSE_HVALUE hValue, |
371 FX_BOOL bSetting, | 373 FX_BOOL bSetting, |
372 XFA_ATTRIBUTE eAttribute); | 374 XFA_ATTRIBUTE eAttribute); |
373 void Script_Delta_SavedValue(FXJSE_HVALUE hValue, | 375 void Script_Delta_SavedValue(FXJSE_HVALUE hValue, |
374 FX_BOOL bSetting, | 376 FX_BOOL bSetting, |
375 XFA_ATTRIBUTE eAttribute); | 377 XFA_ATTRIBUTE eAttribute); |
376 void Script_Delta_Target(FXJSE_HVALUE hValue, | 378 void Script_Delta_Target(FXJSE_HVALUE hValue, |
377 FX_BOOL bSetting, | 379 FX_BOOL bSetting, |
378 XFA_ATTRIBUTE eAttribute); | 380 XFA_ATTRIBUTE eAttribute); |
379 void Script_Attribute_SendAttributeChangeMessage(void* eAttribute, | 381 void Script_Attribute_SendAttributeChangeMessage(XFA_ATTRIBUTE eAttribute, |
380 void* eValue, | |
381 FX_BOOL bScriptModify); | 382 FX_BOOL bScriptModify); |
382 void Script_Attribute_Integer(FXJSE_HVALUE hValue, | 383 void Script_Attribute_Integer(FXJSE_HVALUE hValue, |
383 FX_BOOL bSetting, | 384 FX_BOOL bSetting, |
384 XFA_ATTRIBUTE eAttribute); | 385 XFA_ATTRIBUTE eAttribute); |
385 void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, | 386 void Script_Attribute_IntegerRead(FXJSE_HVALUE hValue, |
386 FX_BOOL bSetting, | 387 FX_BOOL bSetting, |
387 XFA_ATTRIBUTE eAttribute); | 388 XFA_ATTRIBUTE eAttribute); |
388 void Script_Attribute_BOOL(FXJSE_HVALUE hValue, | 389 void Script_Attribute_BOOL(FXJSE_HVALUE hValue, |
389 FX_BOOL bSetting, | 390 FX_BOOL bSetting, |
390 XFA_ATTRIBUTE eAttribute); | 391 XFA_ATTRIBUTE eAttribute); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 XFA_ATTRIBUTE eAttribute); | 587 XFA_ATTRIBUTE eAttribute); |
587 | 588 |
588 protected: | 589 protected: |
589 CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement); | 590 CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement); |
590 ~CXFA_Node(); | 591 ~CXFA_Node(); |
591 friend class CXFA_Document; | 592 friend class CXFA_Document; |
592 CXFA_Node* Deprecated_GetPrevSibling(); | 593 CXFA_Node* Deprecated_GetPrevSibling(); |
593 FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, | 594 FX_BOOL SetValue(XFA_ATTRIBUTE eAttr, |
594 XFA_ATTRIBUTETYPE eType, | 595 XFA_ATTRIBUTETYPE eType, |
595 void* pValue, | 596 void* pValue, |
596 FX_BOOL bNotify); | 597 bool bNotify); |
597 FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, | 598 FX_BOOL GetValue(XFA_ATTRIBUTE eAttr, |
598 XFA_ATTRIBUTETYPE eType, | 599 XFA_ATTRIBUTETYPE eType, |
599 FX_BOOL bUseDefault, | 600 FX_BOOL bUseDefault, |
600 void*& pValue); | 601 void*& pValue); |
601 void OnRemoved(CXFA_Node* pParent, CXFA_Node* pRemoved, FX_BOOL bNotify); | 602 void OnRemoved(bool bNotify); |
602 void OnChanging(XFA_ATTRIBUTE eAttr, void* pNewValue, FX_BOOL bNotify); | 603 void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify); |
603 void OnChanged(XFA_ATTRIBUTE eAttr, | 604 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, | 605 int32_t execSingleEventByName(const CFX_WideStringC& wsEventName, |
608 XFA_ELEMENT eElementType); | 606 XFA_ELEMENT eElementType); |
609 FX_BOOL SetScriptContent(const CFX_WideString& wsContent, | 607 FX_BOOL SetScriptContent(const CFX_WideString& wsContent, |
610 const CFX_WideString& wsXMLValue, | 608 const CFX_WideString& wsXMLValue, |
611 FX_BOOL bNotify = TRUE, | 609 bool bNotify = true, |
612 FX_BOOL bScriptModify = FALSE, | 610 FX_BOOL bScriptModify = FALSE, |
613 FX_BOOL bSyncData = TRUE); | 611 FX_BOOL bSyncData = TRUE); |
614 CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE); | 612 CFX_WideString GetScriptContent(FX_BOOL bScriptModify = FALSE); |
615 XFA_MAPMODULEDATA* CreateMapModuleData(); | 613 XFA_MAPMODULEDATA* CreateMapModuleData(); |
616 XFA_MAPMODULEDATA* GetMapModuleData() const; | 614 XFA_MAPMODULEDATA* GetMapModuleData() const; |
617 void SetMapModuleValue(void* pKey, void* pValue); | 615 void SetMapModuleValue(void* pKey, void* pValue); |
618 FX_BOOL GetMapModuleValue(void* pKey, void*& pValue); | 616 FX_BOOL GetMapModuleValue(void* pKey, void*& pValue); |
619 void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue); | 617 void SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue); |
620 FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue); | 618 FX_BOOL GetMapModuleString(void* pKey, CFX_WideStringC& wsValue); |
621 void SetMapModuleBuffer(void* pKey, | 619 void SetMapModuleBuffer(void* pKey, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 return pObj ? pObj->AsNode() : nullptr; | 794 return pObj ? pObj->AsNode() : nullptr; |
797 } | 795 } |
798 inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { | 796 inline const CXFA_OrdinaryObject* ToOrdinaryObject(const CXFA_Object* pObj) { |
799 return pObj ? pObj->AsOrdinaryObject() : nullptr; | 797 return pObj ? pObj->AsOrdinaryObject() : nullptr; |
800 } | 798 } |
801 inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { | 799 inline const CXFA_NodeList* ToNodeList(const CXFA_Object* pObj) { |
802 return pObj ? pObj->AsNodeList() : nullptr; | 800 return pObj ? pObj->AsNodeList() : nullptr; |
803 } | 801 } |
804 | 802 |
805 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ | 803 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ |
OLD | NEW |