Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "../../../foxitlib.h" 7 #include "../../../foxitlib.h"
8 #include "../common/xfa_utils.h" 8 #include "../common/xfa_utils.h"
9 #include "../common/xfa_object.h" 9 #include "../common/xfa_object.h"
10 #include "../common/xfa_document.h" 10 #include "../common/xfa_document.h"
(...skipping 13 matching lines...) Expand all
24 { 24 {
25 m_pNodeHelper = FX_NEW CXFA_NodeHelper; 25 m_pNodeHelper = FX_NEW CXFA_NodeHelper;
26 } 26 }
27 CXFA_ResolveProcessor::~CXFA_ResolveProcessor(void) 27 CXFA_ResolveProcessor::~CXFA_ResolveProcessor(void)
28 { 28 {
29 if(m_pNodeHelper) { 29 if(m_pNodeHelper) {
30 delete m_pNodeHelper; 30 delete m_pNodeHelper;
31 m_pNodeHelper = NULL; 31 m_pNodeHelper = NULL;
32 } 32 }
33 } 33 }
34 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData &rnd) 34 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData &rnd)
35 { 35 {
36 if (rnd.m_CurNode == NULL) { 36 if (rnd.m_CurNode == NULL) {
37 return -1; 37 return -1;
38 } 38 }
39 if(!rnd.m_CurNode->IsNode()) { 39 if(!rnd.m_CurNode->IsNode()) {
40 if(rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) { 40 if(rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) {
41 return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsN ame); 41 return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsN ame);
42 } 42 }
43 return 0; 43 return 0;
44 } 44 }
(...skipping 25 matching lines...) Expand all
70 } else if (rnd.m_uHashName == XFA_HASHCODE_Xfa) { 70 } else if (rnd.m_uHashName == XFA_HASHCODE_Xfa) {
71 rnd.m_Nodes.Add(rnd.m_CurNode); 71 rnd.m_Nodes.Add(rnd.m_CurNode);
72 } else if ((rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) && XFA_ResolveN odes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsName)) { 72 } else if ((rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) && XFA_ResolveN odes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsName)) {
73 return 1; 73 return 1;
74 } 74 }
75 if (rnd.m_Nodes.GetSize() > 0) { 75 if (rnd.m_Nodes.GetSize() > 0) {
76 XFA_ResolveNode_FilterCondition(rnd, rnd.m_wsCondition); 76 XFA_ResolveNode_FilterCondition(rnd, rnd.m_wsCondition);
77 } 77 }
78 return rnd.m_Nodes.GetSize(); 78 return rnd.m_Nodes.GetSize();
79 } 79 }
80 FX_INT32 nRet = XFA_ResolveNodes_Normal(rnd); 80 int32_t nRet = XFA_ResolveNodes_Normal(rnd);
81 if (nRet < 1 && rnd.m_uHashName == XFA_HASHCODE_Xfa) { 81 if (nRet < 1 && rnd.m_uHashName == XFA_HASHCODE_Xfa) {
82 rnd.m_Nodes.Add(rnd.m_pSC->GetDocument()->GetRoot()); 82 rnd.m_Nodes.Add(rnd.m_pSC->GetDocument()->GetRoot());
83 } 83 }
84 return rnd.m_Nodes.GetSize(); 84 return rnd.m_Nodes.GetSize();
85 } 85 }
86 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData &rnd) 86 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_AnyChild(CXFA_ResolveNodesData & rnd)
87 { 87 {
88 CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); 88 CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
89 CFX_WideString wsCondition = rnd.m_wsCondition; 89 CFX_WideString wsCondition = rnd.m_wsCondition;
90 CXFA_Node* findNode = NULL; 90 CXFA_Node* findNode = NULL;
91 CXFA_NodeArray siblings; 91 CXFA_NodeArray siblings;
92 FX_BOOL bClassName = FALSE; 92 FX_BOOL bClassName = FALSE;
93 if(wsName.GetAt(0) == '#') { 93 if(wsName.GetAt(0) == '#') {
94 bClassName = TRUE; 94 bClassName = TRUE;
95 wsName = wsName.Right(wsName.GetLength() - 1); 95 wsName = wsName.Right(wsName.GetLength() - 1);
96 } 96 }
97 findNode = m_pNodeHelper->XFA_ResolveNodes_GetOneChild((CXFA_Node*)rnd.m_Cur Node, wsName, bClassName); 97 findNode = m_pNodeHelper->XFA_ResolveNodes_GetOneChild((CXFA_Node*)rnd.m_Cur Node, wsName, bClassName);
98 if (findNode == NULL) { 98 if (findNode == NULL) {
99 return 0; 99 return 0;
100 } 100 }
101 if (wsCondition.IsEmpty()) { 101 if (wsCondition.IsEmpty()) {
102 rnd.m_Nodes.Add(findNode); 102 rnd.m_Nodes.Add(findNode);
103 return rnd.m_Nodes.GetSize(); 103 return rnd.m_Nodes.GetSize();
104 } 104 }
105 m_pNodeHelper->XFA_CountSiblings(findNode, XFA_LOGIC_Transparent, (CXFA_Node Array*)&rnd.m_Nodes, bClassName); 105 m_pNodeHelper->XFA_CountSiblings(findNode, XFA_LOGIC_Transparent, (CXFA_Node Array*)&rnd.m_Nodes, bClassName);
106 XFA_ResolveNode_FilterCondition(rnd, wsCondition); 106 XFA_ResolveNode_FilterCondition(rnd, wsCondition);
107 return rnd.m_Nodes.GetSize(); 107 return rnd.m_Nodes.GetSize();
108 } 108 }
109 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &r nd) 109 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Dollar(CXFA_ResolveNodesData &rn d)
110 { 110 {
111 CXFA_ObjArray &nodes = rnd.m_Nodes; 111 CXFA_ObjArray &nodes = rnd.m_Nodes;
112 CFX_WideString wsName = rnd.m_wsName; 112 CFX_WideString wsName = rnd.m_wsName;
113 CFX_WideString wsCondition = rnd.m_wsCondition; 113 CFX_WideString wsCondition = rnd.m_wsCondition;
114 FX_INT32 iNameLen = wsName.GetLength(); 114 int32_t iNameLen = wsName.GetLength();
115 if (iNameLen == 1) { 115 if (iNameLen == 1) {
116 nodes.Add(rnd.m_CurNode); 116 nodes.Add(rnd.m_CurNode);
117 return 1; 117 return 1;
118 } 118 }
119 if (rnd.m_nLevel > 0) { 119 if (rnd.m_nLevel > 0) {
120 return -1; 120 return -1;
121 } 121 }
122 FX_DWORD dwNameHash = FX_HashCode_String_GetW((FX_LPCWSTR)wsName + 1, iNameL en - 1); 122 FX_DWORD dwNameHash = FX_HashCode_String_GetW((FX_LPCWSTR)wsName + 1, iNameL en - 1);
123 if (dwNameHash == XFA_HASHCODE_Xfa) { 123 if (dwNameHash == XFA_HASHCODE_Xfa) {
124 nodes.Add(rnd.m_pSC->GetDocument()->GetRoot()); 124 nodes.Add(rnd.m_pSC->GetDocument()->GetRoot());
125 } else { 125 } else {
126 CXFA_Object* pObjNode = rnd.m_pSC->GetDocument()->GetXFANode(dwNameHash) ; 126 CXFA_Object* pObjNode = rnd.m_pSC->GetDocument()->GetXFANode(dwNameHash) ;
127 if(pObjNode) { 127 if(pObjNode) {
128 rnd.m_Nodes.Add(pObjNode); 128 rnd.m_Nodes.Add(pObjNode);
129 } 129 }
130 } 130 }
131 if (rnd.m_Nodes.GetSize() > 0) { 131 if (rnd.m_Nodes.GetSize() > 0) {
132 XFA_ResolveNode_FilterCondition(rnd, wsCondition); 132 XFA_ResolveNode_FilterCondition(rnd, wsCondition);
133 } 133 }
134 return rnd.m_Nodes.GetSize(); 134 return rnd.m_Nodes.GetSize();
135 } 135 }
136 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesDa ta &rnd) 136 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Excalmatory(CXFA_ResolveNodesDat a &rnd)
137 { 137 {
138 if (rnd.m_nLevel > 0) { 138 if (rnd.m_nLevel > 0) {
139 return 0; 139 return 0;
140 } 140 }
141 CXFA_Node* datasets = (CXFA_Node*)rnd.m_pSC->GetDocument()->GetXFANode(XFA_H ASHCODE_Datasets); 141 CXFA_Node* datasets = (CXFA_Node*)rnd.m_pSC->GetDocument()->GetXFANode(XFA_H ASHCODE_Datasets);
142 if (datasets == NULL) { 142 if (datasets == NULL) {
143 return 0; 143 return 0;
144 } 144 }
145 CXFA_ResolveNodesData rndFind; 145 CXFA_ResolveNodesData rndFind;
146 rndFind.m_pSC = rnd.m_pSC; 146 rndFind.m_pSC = rnd.m_pSC;
147 rndFind.m_CurNode = datasets; 147 rndFind.m_CurNode = datasets;
148 rndFind.m_wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); 148 rndFind.m_wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
149 rndFind.m_uHashName = FX_HashCode_String_GetW(rndFind.m_wsName, rndFind.m_ws Name.GetLength()); 149 rndFind.m_uHashName = FX_HashCode_String_GetW(rndFind.m_wsName, rndFind.m_ws Name.GetLength());
150 rndFind.m_nLevel = rnd.m_nLevel + 1; 150 rndFind.m_nLevel = rnd.m_nLevel + 1;
151 rndFind.m_dwStyles = XFA_RESOLVENODE_Children; 151 rndFind.m_dwStyles = XFA_RESOLVENODE_Children;
152 rndFind.m_wsCondition = rnd.m_wsCondition; 152 rndFind.m_wsCondition = rnd.m_wsCondition;
153 XFA_ResolveNodes(rndFind); 153 XFA_ResolveNodes(rndFind);
154 if (rndFind.m_Nodes.GetSize() > 0) { 154 if (rndFind.m_Nodes.GetSize() > 0) {
155 rnd.m_Nodes.Append(rndFind.m_Nodes); 155 rnd.m_Nodes.Append(rndFind.m_Nodes);
156 rndFind.m_Nodes.RemoveAll(); 156 rndFind.m_Nodes.RemoveAll();
157 } 157 }
158 return rnd.m_Nodes.GetSize(); 158 return rnd.m_Nodes.GetSize();
159 } 159 }
160 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesDat a &rnd) 160 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign(CXFA_ResolveNodesData &rnd)
161 { 161 {
162 FX_DWORD dwStyles = rnd.m_dwStyles; 162 FX_DWORD dwStyles = rnd.m_dwStyles;
163 CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); 163 CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1);
164 CFX_WideString wsCondition = rnd.m_wsCondition; 164 CFX_WideString wsCondition = rnd.m_wsCondition;
165 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode; 165 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode;
166 if(XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { 166 if(XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) {
167 return 1; 167 return 1;
168 } 168 }
169 CXFA_ResolveNodesData rndFind; 169 CXFA_ResolveNodesData rndFind;
170 rndFind.m_pSC = rnd.m_pSC; 170 rndFind.m_pSC = rnd.m_pSC;
171 rndFind.m_nLevel = rnd.m_nLevel + 1; 171 rndFind.m_nLevel = rnd.m_nLevel + 1;
172 rndFind.m_dwStyles = rnd.m_dwStyles; 172 rndFind.m_dwStyles = rnd.m_dwStyles;
173 rndFind.m_dwStyles |= XFA_RESOLVENODE_TagName; 173 rndFind.m_dwStyles |= XFA_RESOLVENODE_TagName;
174 rndFind.m_dwStyles &= ~XFA_RESOLVENODE_Attributes; 174 rndFind.m_dwStyles &= ~XFA_RESOLVENODE_Attributes;
175 rndFind.m_wsName = wsName; 175 rndFind.m_wsName = wsName;
176 rndFind.m_uHashName = FX_HashCode_String_GetW(rndFind.m_wsName, rndFind.m_ws Name.GetLength()); 176 rndFind.m_uHashName = FX_HashCode_String_GetW(rndFind.m_wsName, rndFind.m_ws Name.GetLength());
177 rndFind.m_wsCondition = wsCondition; 177 rndFind.m_wsCondition = wsCondition;
178 rndFind.m_CurNode = curNode; 178 rndFind.m_CurNode = curNode;
179 XFA_ResolveNodes_Normal(rndFind); 179 XFA_ResolveNodes_Normal(rndFind);
180 if (rndFind.m_Nodes.GetSize() > 0) { 180 if (rndFind.m_Nodes.GetSize() > 0) {
181 if(wsCondition.GetLength() == 0 && rndFind.m_Nodes.Find(curNode) >= 0) { 181 if(wsCondition.GetLength() == 0 && rndFind.m_Nodes.Find(curNode) >= 0) {
182 rnd.m_Nodes.Add(curNode); 182 rnd.m_Nodes.Add(curNode);
183 } else { 183 } else {
184 rnd.m_Nodes.Append(rndFind.m_Nodes); 184 rnd.m_Nodes.Append(rndFind.m_Nodes);
185 rndFind.m_Nodes.RemoveAll(); 185 rndFind.m_Nodes.RemoveAll();
186 } 186 }
187 } 187 }
188 return rnd.m_Nodes.GetSize(); 188 return rnd.m_Nodes.GetSize();
189 } 189 }
190 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* cur Node, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr) 190 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_ForAttributeRs(CXFA_Object* curN ode, CXFA_ResolveNodesData &rnd, FX_WSTR strAttr)
191 { 191 {
192 XFA_LPCSCRIPTATTRIBUTEINFO lpScriptAttribute = XFA_GetScriptAttributeByName( curNode->GetClassID(), strAttr); 192 XFA_LPCSCRIPTATTRIBUTEINFO lpScriptAttribute = XFA_GetScriptAttributeByName( curNode->GetClassID(), strAttr);
193 if(lpScriptAttribute) { 193 if(lpScriptAttribute) {
194 rnd.m_pScriptAttribute = lpScriptAttribute; 194 rnd.m_pScriptAttribute = lpScriptAttribute;
195 rnd.m_Nodes.Add(curNode); 195 rnd.m_Nodes.Add(curNode);
196 rnd.m_dwFlag = XFA_RESOVENODE_RSTYPE_Attribute; 196 rnd.m_dwFlag = XFA_RESOVENODE_RSTYPE_Attribute;
197 return 1; 197 return 1;
198 } 198 }
199 return 0; 199 return 0;
200 } 200 }
201 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &r nd) 201 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal(CXFA_ResolveNodesData &rn d)
202 { 202 {
203 if (rnd.m_nLevel > 32) { 203 if (rnd.m_nLevel > 32) {
204 return 0; 204 return 0;
205 } 205 }
206 if(!rnd.m_CurNode->IsNode()) { 206 if(!rnd.m_CurNode->IsNode()) {
207 return 0; 207 return 0;
208 } 208 }
209 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode; 209 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode;
210 CXFA_ObjArray &nodes = rnd.m_Nodes; 210 CXFA_ObjArray &nodes = rnd.m_Nodes;
211 FX_INT32 nNum = nodes.GetSize(); 211 int32_t nNum = nodes.GetSize();
212 FX_DWORD dwStyles = rnd.m_dwStyles; 212 FX_DWORD dwStyles = rnd.m_dwStyles;
213 CFX_WideString &wsName = rnd.m_wsName; 213 CFX_WideString &wsName = rnd.m_wsName;
214 FX_UINT32 uNameHash = rnd.m_uHashName; 214 uint32_t uNameHash = rnd.m_uHashName;
215 CFX_WideString &wsCondition = rnd.m_wsCondition; 215 CFX_WideString &wsCondition = rnd.m_wsCondition;
216 CXFA_ResolveNodesData rndFind; 216 CXFA_ResolveNodesData rndFind;
217 rndFind.m_wsName = rnd.m_wsName; 217 rndFind.m_wsName = rnd.m_wsName;
218 rndFind.m_wsCondition = rnd.m_wsCondition; 218 rndFind.m_wsCondition = rnd.m_wsCondition;
219 rndFind.m_pSC = rnd.m_pSC; 219 rndFind.m_pSC = rnd.m_pSC;
220 rndFind.m_nLevel = rnd.m_nLevel + 1; 220 rndFind.m_nLevel = rnd.m_nLevel + 1;
221 rndFind.m_uHashName = uNameHash; 221 rndFind.m_uHashName = uNameHash;
222 CXFA_NodeArray children; 222 CXFA_NodeArray children;
223 CXFA_NodeArray properties; 223 CXFA_NodeArray properties;
224 CXFA_Node* pVariablesNode = NULL; 224 CXFA_Node* pVariablesNode = NULL;
(...skipping 12 matching lines...) Expand all
237 XFA_LPCPROPERTY pPropert = XFA_GetPropertyOfElement(curNode->GetClas sID(), pChild->GetClassID(), XFA_XDPPACKET_UNKNOWN); 237 XFA_LPCPROPERTY pPropert = XFA_GetPropertyOfElement(curNode->GetClas sID(), pChild->GetClassID(), XFA_XDPPACKET_UNKNOWN);
238 if(pPropert) { 238 if(pPropert) {
239 properties.Add(pChild); 239 properties.Add(pChild);
240 } else { 240 } else {
241 children.Add(pChild); 241 children.Add(pChild);
242 } 242 }
243 } 243 }
244 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); 244 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling);
245 } 245 }
246 if((dwStyles & XFA_RESOLVENODE_Properties) && pVariablesNode) { 246 if((dwStyles & XFA_RESOLVENODE_Properties) && pVariablesNode) {
247 FX_UINT32 uPropHash = pVariablesNode->GetClassHashCode(); 247 uint32_t uPropHash = pVariablesNode->GetClassHashCode();
248 if (uPropHash == uNameHash) { 248 if (uPropHash == uNameHash) {
249 nodes.Add(pVariablesNode); 249 nodes.Add(pVariablesNode);
250 } else { 250 } else {
251 rndFind.m_CurNode = pVariablesNode; 251 rndFind.m_CurNode = pVariablesNode;
252 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); 252 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind);
253 CFX_WideString wsSaveCondition = rndFind.m_wsCondition; 253 CFX_WideString wsSaveCondition = rndFind.m_wsCondition;
254 rndFind.m_wsCondition.Empty(); 254 rndFind.m_wsCondition.Empty();
255 XFA_ResolveNodes_Normal(rndFind); 255 XFA_ResolveNodes_Normal(rndFind);
256 rndFind.m_wsCondition = wsSaveCondition; 256 rndFind.m_wsCondition = wsSaveCondition;
257 if (rndFind.m_Nodes.GetSize() > 0) { 257 if (rndFind.m_Nodes.GetSize() > 0) {
258 nodes.Append(rndFind.m_Nodes); 258 nodes.Append(rndFind.m_Nodes);
259 rndFind.m_Nodes.RemoveAll(); 259 rndFind.m_Nodes.RemoveAll();
260 } 260 }
261 } 261 }
262 if (nodes.GetSize() > nNum) { 262 if (nodes.GetSize() > nNum) {
263 XFA_ResolveNode_FilterCondition(rnd, wsCondition); 263 XFA_ResolveNode_FilterCondition(rnd, wsCondition);
264 if (nodes.GetSize() > 0) { 264 if (nodes.GetSize() > 0) {
265 return 1; 265 return 1;
266 } 266 }
267 return 0; 267 return 0;
268 } 268 }
269 } 269 }
270 if (dwStyles & XFA_RESOLVENODE_Children) { 270 if (dwStyles & XFA_RESOLVENODE_Children) {
271 FX_BOOL bSetFlag = FALSE; 271 FX_BOOL bSetFlag = FALSE;
272 if(pPageSetNode && (dwStyles & XFA_RESOLVENODE_Properties)) { 272 if(pPageSetNode && (dwStyles & XFA_RESOLVENODE_Properties)) {
273 children.Add(pPageSetNode); 273 children.Add(pPageSetNode);
274 } 274 }
275 for(FX_INT32 i = 0; i < children.GetSize(); i++) { 275 for(int32_t i = 0; i < children.GetSize(); i++) {
276 CXFA_Node* child = children[i]; 276 CXFA_Node* child = children[i];
277 if (dwStyles & XFA_RESOLVENODE_TagName) { 277 if (dwStyles & XFA_RESOLVENODE_TagName) {
278 if (child->GetClassHashCode() == uNameHash) { 278 if (child->GetClassHashCode() == uNameHash) {
279 nodes.Add(child); 279 nodes.Add(child);
280 } 280 }
281 } else if (child->GetNameHash() == uNameHash) { 281 } else if (child->GetNameHash() == uNameHash) {
282 nodes.Add(child); 282 nodes.Add(child);
283 } 283 }
284 if (m_pNodeHelper->XFA_NodeIsTransparent(child) && child->GetClassID () != XFA_ELEMENT_PageSet) { 284 if (m_pNodeHelper->XFA_NodeIsTransparent(child) && child->GetClassID () != XFA_ELEMENT_PageSet) {
285 if(!bSetFlag) { 285 if(!bSetFlag) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return 0; 317 return 0;
318 } 318 }
319 } 319 }
320 if (dwStyles & XFA_RESOLVENODE_Attributes) { 320 if (dwStyles & XFA_RESOLVENODE_Attributes) {
321 if(XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { 321 if(XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) {
322 return 1; 322 return 1;
323 } 323 }
324 } 324 }
325 if (dwStyles & XFA_RESOLVENODE_Properties) { 325 if (dwStyles & XFA_RESOLVENODE_Properties) {
326 FX_BOOL bSetFlag = FALSE; 326 FX_BOOL bSetFlag = FALSE;
327 for(FX_INT32 i = 0; i < properties.GetSize(); i++) { 327 for(int32_t i = 0; i < properties.GetSize(); i++) {
328 CXFA_Node* childProperty = properties[i]; 328 CXFA_Node* childProperty = properties[i];
329 if(childProperty->IsUnnamed()) { 329 if(childProperty->IsUnnamed()) {
330 FX_UINT32 uPropHash = childProperty->GetClassHashCode(); 330 uint32_t uPropHash = childProperty->GetClassHashCode();
331 XFA_ELEMENT eName = childProperty->GetClassID(); 331 XFA_ELEMENT eName = childProperty->GetClassID();
332 if (uPropHash == uNameHash) { 332 if (uPropHash == uNameHash) {
333 nodes.Add(childProperty); 333 nodes.Add(childProperty);
334 } 334 }
335 } else if(childProperty->GetNameHash() == uNameHash && childProperty ->GetClassID() != XFA_ELEMENT_Extras 335 } else if(childProperty->GetNameHash() == uNameHash && childProperty ->GetClassID() != XFA_ELEMENT_Extras
336 && childProperty->GetClassID() != XFA_ELEMENT_Items) { 336 && childProperty->GetClassID() != XFA_ELEMENT_Items) {
337 nodes.Add(childProperty); 337 nodes.Add(childProperty);
338 } 338 }
339 } 339 }
340 if (nodes.GetSize() > nNum) { 340 if (nodes.GetSize() > nNum) {
(...skipping 14 matching lines...) Expand all
355 if (pElement) { 355 if (pElement) {
356 pProp = ((CXFA_Node*)curNode)->GetProperty(0, pElement->eName, p Element->eName != XFA_ELEMENT_PageSet); 356 pProp = ((CXFA_Node*)curNode)->GetProperty(0, pElement->eName, p Element->eName != XFA_ELEMENT_PageSet);
357 } 357 }
358 } 358 }
359 if (pProp) { 359 if (pProp) {
360 nodes.Add(pProp); 360 nodes.Add(pProp);
361 return nodes.GetSize(); 361 return nodes.GetSize();
362 } 362 }
363 } 363 }
364 CXFA_Node* parentNode = m_pNodeHelper->XFA_ResolveNodes_GetParent((CXFA_Node *)curNode, XFA_LOGIC_NoTransparent); 364 CXFA_Node* parentNode = m_pNodeHelper->XFA_ResolveNodes_GetParent((CXFA_Node *)curNode, XFA_LOGIC_NoTransparent);
365 FX_UINT32 uCurClassHash = curNode->GetClassHashCode(); 365 uint32_t uCurClassHash = curNode->GetClassHashCode();
366 if (parentNode == NULL) { 366 if (parentNode == NULL) {
367 if(uCurClassHash == uNameHash) { 367 if(uCurClassHash == uNameHash) {
368 nodes.Add((CXFA_Node*)curNode); 368 nodes.Add((CXFA_Node*)curNode);
369 XFA_ResolveNode_FilterCondition(rnd, wsCondition); 369 XFA_ResolveNode_FilterCondition(rnd, wsCondition);
370 if(nodes.GetSize() > 0) { 370 if(nodes.GetSize() > 0) {
371 return 1; 371 return 1;
372 } 372 }
373 } 373 }
374 return 0; 374 return 0;
375 } 375 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 if (rndFind.m_Nodes.GetSize() > 0) { 470 if (rndFind.m_Nodes.GetSize() > 0) {
471 nodes.Append(rndFind.m_Nodes); 471 nodes.Append(rndFind.m_Nodes);
472 rndFind.m_Nodes.RemoveAll(); 472 rndFind.m_Nodes.RemoveAll();
473 } 473 }
474 if (nodes.GetSize() > nNum) { 474 if (nodes.GetSize() > nNum) {
475 return 1; 475 return 1;
476 } 476 }
477 } 477 }
478 return 0; 478 return 0;
479 } 479 }
480 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData &rnd) 480 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Asterisk(CXFA_ResolveNodesData & rnd)
481 { 481 {
482 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode; 482 CXFA_Node* curNode = (CXFA_Node*)rnd.m_CurNode;
483 CXFA_ObjArray &nodes = rnd.m_Nodes; 483 CXFA_ObjArray &nodes = rnd.m_Nodes;
484 CXFA_NodeArray array; 484 CXFA_NodeArray array;
485 curNode->GetNodeList(array, XFA_NODEFILTER_Children | XFA_NODEFILTER_Propert ies); 485 curNode->GetNodeList(array, XFA_NODEFILTER_Children | XFA_NODEFILTER_Propert ies);
486 nodes.Append((CXFA_ObjArray &)array); 486 nodes.Append((CXFA_ObjArray &)array);
487 return nodes.GetSize(); 487 return nodes.GetSize();
488 } 488 }
489 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_PopStack(CFX_Int32Array &stack) 489 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_PopStack(CFX_Int32Array &stack)
490 { 490 {
491 FX_INT32 nType = -1; 491 int32_t nType = -1;
492 FX_INT32 iSize = stack.GetSize() - 1; 492 int32_t iSize = stack.GetSize() - 1;
493 if (iSize > -1) { 493 if (iSize > -1) {
494 nType = stack[iSize]; 494 nType = stack[iSize];
495 stack.RemoveAt(iSize, 1); 495 stack.RemoveAt(iSize, 1);
496 } 496 }
497 return nType; 497 return nType;
498 } 498 }
499 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, FX_INT32 nStart, CXFA_ResolveNodesData &rnd) 499 int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_GetFilter(FX_WSTR wsExpression, int32_t nStart, CXFA_ResolveNodesData &rnd)
500 { 500 {
501 FXSYS_assert(nStart > -1); 501 FXSYS_assert(nStart > -1);
502 FX_INT32 iLength = wsExpression.GetLength(); 502 int32_t iLength = wsExpression.GetLength();
503 if (nStart >= iLength) { 503 if (nStart >= iLength) {
504 return 0; 504 return 0;
505 } 505 }
506 CFX_WideString& wsName = rnd.m_wsName; 506 CFX_WideString& wsName = rnd.m_wsName;
507 CFX_WideString& wsCondition = rnd.m_wsCondition; 507 CFX_WideString& wsCondition = rnd.m_wsCondition;
508 FX_LPWSTR pNameBuf = wsName.GetBuffer(iLength - nStart); 508 FX_LPWSTR pNameBuf = wsName.GetBuffer(iLength - nStart);
509 FX_LPWSTR pConditionBuf = wsCondition.GetBuffer(iLength - nStart); 509 FX_LPWSTR pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
510 FX_INT32 nCount = 0; 510 int32_t nCount = 0;
511 FX_INT32 nNameCount = 0; 511 int32_t nNameCount = 0;
512 FX_INT32 nConditionCount = 0; 512 int32_t nConditionCount = 0;
513 CFX_Int32Array stack; 513 CFX_Int32Array stack;
514 FX_INT32 nType = -1; 514 int32_t nType = -1;
515 FX_LPCWSTR pSrc = wsExpression.GetPtr(); 515 FX_LPCWSTR pSrc = wsExpression.GetPtr();
516 FX_WCHAR wPrev = 0, wCur; 516 FX_WCHAR wPrev = 0, wCur;
517 FX_BOOL bIsCondition = FALSE; 517 FX_BOOL bIsCondition = FALSE;
518 while (nStart < iLength) { 518 while (nStart < iLength) {
519 wCur = pSrc[nStart ++]; 519 wCur = pSrc[nStart ++];
520 if (wCur == '.') { 520 if (wCur == '.') {
521 if (wPrev == '\\') { 521 if (wPrev == '\\') {
522 pNameBuf[nNameCount - 1] = wPrev = '.'; 522 pNameBuf[nNameCount - 1] = wPrev = '.';
523 continue; 523 continue;
524 } 524 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 587 }
588 wsName.ReleaseBuffer(nNameCount); 588 wsName.ReleaseBuffer(nNameCount);
589 wsName.TrimLeft(); 589 wsName.TrimLeft();
590 wsName.TrimRight(); 590 wsName.TrimRight();
591 wsCondition.ReleaseBuffer(nConditionCount); 591 wsCondition.ReleaseBuffer(nConditionCount);
592 wsCondition.TrimLeft(); 592 wsCondition.TrimLeft();
593 wsCondition.TrimRight(); 593 wsCondition.TrimRight();
594 rnd.m_uHashName = FX_HashCode_String_GetW(wsName, wsName.GetLength()); 594 rnd.m_uHashName = FX_HashCode_String_GetW(wsName, wsName.GetLength());
595 return nStart; 595 return nStart;
596 } 596 }
597 void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(FX_INT32 iCurIndex, C FX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd) 597 void CXFA_ResolveProcessor::XFA_ResolveNode_ConditionArray(int32_t iCurIndex, CF X_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd)
598 { 598 {
599 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes; 599 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
600 FX_INT32 iLen = wsCondition.GetLength(); 600 int32_t iLen = wsCondition.GetLength();
601 FX_BOOL bRelative = FALSE; 601 FX_BOOL bRelative = FALSE;
602 FX_BOOL bAll = FALSE; 602 FX_BOOL bAll = FALSE;
603 FX_INT32 i = 1; 603 int32_t i = 1;
604 for (; i < iLen; ++i) { 604 for (; i < iLen; ++i) {
605 FX_WCHAR ch = wsCondition[i]; 605 FX_WCHAR ch = wsCondition[i];
606 if (ch == ' ') { 606 if (ch == ' ') {
607 continue; 607 continue;
608 } 608 }
609 if (ch == '+' || ch == '-') { 609 if (ch == '+' || ch == '-') {
610 bRelative = TRUE; 610 bRelative = TRUE;
611 break; 611 break;
612 } else if (ch == '*') { 612 } else if (ch == '*') {
613 bAll = TRUE; 613 bAll = TRUE;
(...skipping 21 matching lines...) Expand all
635 m_pNodeHelper->m_iCurAllStart = m_iCurStart; 635 m_pNodeHelper->m_iCurAllStart = m_iCurStart;
636 } 636 }
637 } 637 }
638 return; 638 return;
639 } 639 }
640 if (iFoundCount == 1 && !iLen) { 640 if (iFoundCount == 1 && !iLen) {
641 return; 641 return;
642 } 642 }
643 CFX_WideString wsIndex; 643 CFX_WideString wsIndex;
644 wsIndex = wsCondition.Mid(i, iLen - 1 - i); 644 wsIndex = wsCondition.Mid(i, iLen - 1 - i);
645 FX_INT32 iIndex = wsIndex.GetInteger(); 645 int32_t iIndex = wsIndex.GetInteger();
646 if (bRelative) { 646 if (bRelative) {
647 iIndex += iCurIndex; 647 iIndex += iCurIndex;
648 } 648 }
649 if (iFoundCount <= iIndex || iIndex < 0) { 649 if (iFoundCount <= iIndex || iIndex < 0) {
650 if(rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) { 650 if(rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) {
651 m_pNodeHelper->m_pCreateParent = (CXFA_Node*)rnd.m_CurNode; 651 m_pNodeHelper->m_pCreateParent = (CXFA_Node*)rnd.m_CurNode;
652 m_pNodeHelper->m_iCreateCount = iIndex - iFoundCount + 1; 652 m_pNodeHelper->m_iCreateCount = iIndex - iFoundCount + 1;
653 } 653 }
654 findNodes.RemoveAll(); 654 findNodes.RemoveAll();
655 } else { 655 } else {
656 CXFA_Node* ret = findNodes[iIndex]; 656 CXFA_Node* ret = findNodes[iIndex];
657 findNodes.RemoveAll(); 657 findNodes.RemoveAll();
658 findNodes.Add(ret); 658 findNodes.Add(ret);
659 } 659 }
660 } 660 }
661 void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(FX_INT32 iCurIndex , CFX_WideString wsCondition, FX_INT32 iFoundCount, CXFA_ResolveNodesData &rnd) 661 void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter(int32_t iCurIndex, CFX_WideString wsCondition, int32_t iFoundCount, CXFA_ResolveNodesData &rnd)
662 { 662 {
663 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes; 663 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
664 FXSYS_assert(iFoundCount == findNodes.GetSize()); 664 FXSYS_assert(iFoundCount == findNodes.GetSize());
665 CFX_WideString wsExpression; 665 CFX_WideString wsExpression;
666 IXFA_ScriptContext* pContext = NULL; 666 IXFA_ScriptContext* pContext = NULL;
667 XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown; 667 XFA_SCRIPTLANGTYPE eLangType = XFA_SCRIPTLANGTYPE_Unkown;
668 if (wsCondition.Left(2) == FX_WSTRC(L".[") && wsCondition.Right(1) == FX_WST RC(L"]")) { 668 if (wsCondition.Left(2) == FX_WSTRC(L".[") && wsCondition.Right(1) == FX_WST RC(L"]")) {
669 eLangType = XFA_SCRIPTLANGTYPE_Formcalc; 669 eLangType = XFA_SCRIPTLANGTYPE_Formcalc;
670 } else if (wsCondition.Left(2) == FX_WSTRC(L".(") && wsCondition.Right(1) == FX_WSTRC(L")")) { 670 } else if (wsCondition.Left(2) == FX_WSTRC(L".(") && wsCondition.Right(1) == FX_WSTRC(L")")) {
671 eLangType = XFA_SCRIPTLANGTYPE_Javascript; 671 eLangType = XFA_SCRIPTLANGTYPE_Javascript;
672 } else { 672 } else {
673 return; 673 return;
674 } 674 }
675 pContext = rnd.m_pSC; 675 pContext = rnd.m_pSC;
676 wsExpression = wsCondition.Mid(2, wsCondition.GetLength() - 3); 676 wsExpression = wsCondition.Mid(2, wsCondition.GetLength() - 3);
677 for(FX_INT32 i = iFoundCount - 1; i >= 0; i--) { 677 for(int32_t i = iFoundCount - 1; i >= 0; i--) {
678 CXFA_Object* node = findNodes[i]; 678 CXFA_Object* node = findNodes[i];
679 FX_BOOL bRet = FALSE; 679 FX_BOOL bRet = FALSE;
680 FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime()); 680 FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime());
681 bRet = pContext->RunScript(eLangType, wsExpression, pRetValue, node); 681 bRet = pContext->RunScript(eLangType, wsExpression, pRetValue, node);
682 if(!bRet || !FXJSE_Value_ToBoolean(pRetValue)) { 682 if(!bRet || !FXJSE_Value_ToBoolean(pRetValue)) {
683 findNodes.RemoveAt(i); 683 findNodes.RemoveAt(i);
684 } 684 }
685 FXJSE_Value_Release(pRetValue); 685 FXJSE_Value_Release(pRetValue);
686 } 686 }
687 return; 687 return;
688 } 688 }
689 void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesDat a &rnd, CFX_WideString wsCondition) 689 void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition(CXFA_ResolveNodesDat a &rnd, CFX_WideString wsCondition)
690 { 690 {
691 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes; 691 CXFA_NodeArray &findNodes = (CXFA_NodeArray&)rnd.m_Nodes;
692 FX_INT32 iCurrIndex = 0; 692 int32_t iCurrIndex = 0;
693 const CXFA_NodeArray &array = rnd.m_pSC->GetUpObjectArray(); 693 const CXFA_NodeArray &array = rnd.m_pSC->GetUpObjectArray();
694 FX_INT32 iSize = array.GetSize(); 694 int32_t iSize = array.GetSize();
695 if (iSize) { 695 if (iSize) {
696 CXFA_Node* curNode = array[iSize - 1]; 696 CXFA_Node* curNode = array[iSize - 1];
697 FX_BOOL bIsProperty = m_pNodeHelper->XFA_NodeIsProperty(curNode); 697 FX_BOOL bIsProperty = m_pNodeHelper->XFA_NodeIsProperty(curNode);
698 if(curNode->IsUnnamed() || (bIsProperty && curNode->GetClassID() != XFA_ ELEMENT_PageSet)) { 698 if(curNode->IsUnnamed() || (bIsProperty && curNode->GetClassID() != XFA_ ELEMENT_PageSet)) {
699 iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transpar ent, bIsProperty, TRUE); 699 iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transpar ent, bIsProperty, TRUE);
700 } else { 700 } else {
701 iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transpar ent, bIsProperty, FALSE); 701 iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transpar ent, bIsProperty, FALSE);
702 } 702 }
703 } 703 }
704 FX_INT32 iFoundCount = findNodes.GetSize(); 704 int32_t iFoundCount = findNodes.GetSize();
705 wsCondition.TrimLeft(); 705 wsCondition.TrimLeft();
706 wsCondition.TrimRight(); 706 wsCondition.TrimRight();
707 FX_INT32 iLen = wsCondition.GetLength(); 707 int32_t iLen = wsCondition.GetLength();
708 if (!iLen) { 708 if (!iLen) {
709 if (rnd.m_dwStyles & XFA_RESOLVENODE_ALL) { 709 if (rnd.m_dwStyles & XFA_RESOLVENODE_ALL) {
710 return; 710 return;
711 } 711 }
712 if (iFoundCount == 1) { 712 if (iFoundCount == 1) {
713 return; 713 return;
714 } 714 }
715 if (iFoundCount <= iCurrIndex) { 715 if (iFoundCount <= iCurrIndex) {
716 if(rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) { 716 if(rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) {
717 m_pNodeHelper->m_pCreateParent = (CXFA_Node*)rnd.m_CurNode; 717 m_pNodeHelper->m_pCreateParent = (CXFA_Node*)rnd.m_CurNode;
(...skipping 30 matching lines...) Expand all
748 FX_DWORD dwSubStyles = XFA_RESOLVENODE_Children; 748 FX_DWORD dwSubStyles = XFA_RESOLVENODE_Children;
749 if (dwParentStyles & XFA_RESOLVENODE_TagName) { 749 if (dwParentStyles & XFA_RESOLVENODE_TagName) {
750 dwSubStyles |= XFA_RESOLVENODE_TagName; 750 dwSubStyles |= XFA_RESOLVENODE_TagName;
751 } 751 }
752 dwSubStyles &= ~XFA_RESOLVENODE_Parent; 752 dwSubStyles &= ~XFA_RESOLVENODE_Parent;
753 dwSubStyles &= ~XFA_RESOLVENODE_Siblings; 753 dwSubStyles &= ~XFA_RESOLVENODE_Siblings;
754 dwSubStyles &= ~XFA_RESOLVENODE_Properties; 754 dwSubStyles &= ~XFA_RESOLVENODE_Properties;
755 dwSubStyles |= XFA_RESOLVENODE_ALL; 755 dwSubStyles |= XFA_RESOLVENODE_ALL;
756 rnd.m_dwStyles = dwSubStyles; 756 rnd.m_dwStyles = dwSubStyles;
757 } 757 }
758 FX_INT32 CXFA_ResolveProcessor::XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVEN ODE_RS& resolveNodeRS, CFX_WideString &wsLastCondition) 758 int32_t CXFA_ResolveProcessor::XFA_ResolveNode_SetResultCreateNode(XFA_RESOLVENO DE_RS& resolveNodeRS, CFX_WideString &wsLastCondition)
759 { 759 {
760 if(m_pNodeHelper->m_pCreateParent) { 760 if(m_pNodeHelper->m_pCreateParent) {
761 resolveNodeRS.nodes.Add(m_pNodeHelper->m_pCreateParent); 761 resolveNodeRS.nodes.Add(m_pNodeHelper->m_pCreateParent);
762 } else { 762 } else {
763 m_pNodeHelper->XFA_CreateNode_ForCondition(wsLastCondition); 763 m_pNodeHelper->XFA_CreateNode_ForCondition(wsLastCondition);
764 } 764 }
765 resolveNodeRS.dwFlags = m_pNodeHelper->m_iCreateFlag; 765 resolveNodeRS.dwFlags = m_pNodeHelper->m_iCreateFlag;
766 if(resolveNodeRS.dwFlags == XFA_RESOLVENODE_RSTYPE_CreateNodeOne) { 766 if(resolveNodeRS.dwFlags == XFA_RESOLVENODE_RSTYPE_CreateNodeOne) {
767 if(m_pNodeHelper->m_iCurAllStart != -1) { 767 if(m_pNodeHelper->m_iCurAllStart != -1) {
768 resolveNodeRS.dwFlags = XFA_RESOLVENODE_RSTYPE_CreateNodeMidAll; 768 resolveNodeRS.dwFlags = XFA_RESOLVENODE_RSTYPE_CreateNodeMidAll;
769 } 769 }
770 } 770 }
771 return resolveNodeRS.nodes.GetSize(); 771 return resolveNodeRS.nodes.GetSize();
772 } 772 }
773 void CXFA_ResolveProcessor::XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsN extCondition, FX_INT32 &iIndex, FX_INT32 iCount) 773 void CXFA_ResolveProcessor::XFA_ResolveNode_SetIndexDataBind(CFX_WideString &wsN extCondition, int32_t &iIndex, int32_t iCount)
774 { 774 {
775 if(m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { 775 if(m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) {
776 if(m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { 776 if(m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) {
777 iIndex = 0; 777 iIndex = 0;
778 } else { 778 } else {
779 iIndex = iCount - 1; 779 iIndex = iCount - 1;
780 } 780 }
781 } else { 781 } else {
782 iIndex = iCount - 1; 782 iIndex = iCount - 1;
783 } 783 }
784 } 784 }
OLDNEW
« no previous file with comments | « xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h ('k') | xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698