| 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 #include "xfa/fxfa/parser/xfa_script_resolveprocessor.h" | 7 #include "xfa/fxfa/parser/xfa_script_resolveprocessor.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); | 255 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); |
| 256 } | 256 } |
| 257 if ((dwStyles & XFA_RESOLVENODE_Properties) && pVariablesNode) { | 257 if ((dwStyles & XFA_RESOLVENODE_Properties) && pVariablesNode) { |
| 258 uint32_t uPropHash = pVariablesNode->GetClassHashCode(); | 258 uint32_t uPropHash = pVariablesNode->GetClassHashCode(); |
| 259 if (uPropHash == uNameHash) { | 259 if (uPropHash == uNameHash) { |
| 260 nodes.Add(pVariablesNode); | 260 nodes.Add(pVariablesNode); |
| 261 } else { | 261 } else { |
| 262 rndFind.m_CurNode = pVariablesNode; | 262 rndFind.m_CurNode = pVariablesNode; |
| 263 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); | 263 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); |
| 264 CFX_WideString wsSaveCondition = rndFind.m_wsCondition; | 264 CFX_WideString wsSaveCondition = rndFind.m_wsCondition; |
| 265 rndFind.m_wsCondition.Empty(); | 265 rndFind.m_wsCondition.clear(); |
| 266 XFA_ResolveNodes_Normal(rndFind); | 266 XFA_ResolveNodes_Normal(rndFind); |
| 267 rndFind.m_wsCondition = wsSaveCondition; | 267 rndFind.m_wsCondition = wsSaveCondition; |
| 268 if (rndFind.m_Nodes.GetSize() > 0) { | 268 if (rndFind.m_Nodes.GetSize() > 0) { |
| 269 nodes.Append(rndFind.m_Nodes); | 269 nodes.Append(rndFind.m_Nodes); |
| 270 rndFind.m_Nodes.RemoveAll(); | 270 rndFind.m_Nodes.RemoveAll(); |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 if (nodes.GetSize() > nNum) { | 273 if (nodes.GetSize() > nNum) { |
| 274 XFA_ResolveNode_FilterCondition(rnd, wsCondition); | 274 XFA_ResolveNode_FilterCondition(rnd, wsCondition); |
| 275 if (nodes.GetSize() > 0) { | 275 if (nodes.GetSize() > 0) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 293 nodes.Add(child); | 293 nodes.Add(child); |
| 294 } | 294 } |
| 295 if (m_pNodeHelper->XFA_NodeIsTransparent(child) && | 295 if (m_pNodeHelper->XFA_NodeIsTransparent(child) && |
| 296 child->GetClassID() != XFA_ELEMENT_PageSet) { | 296 child->GetClassID() != XFA_ELEMENT_PageSet) { |
| 297 if (!bSetFlag) { | 297 if (!bSetFlag) { |
| 298 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); | 298 XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); |
| 299 bSetFlag = TRUE; | 299 bSetFlag = TRUE; |
| 300 } | 300 } |
| 301 rndFind.m_CurNode = child; | 301 rndFind.m_CurNode = child; |
| 302 CFX_WideString wsSaveCondition = rndFind.m_wsCondition; | 302 CFX_WideString wsSaveCondition = rndFind.m_wsCondition; |
| 303 rndFind.m_wsCondition.Empty(); | 303 rndFind.m_wsCondition.clear(); |
| 304 XFA_ResolveNodes_Normal(rndFind); | 304 XFA_ResolveNodes_Normal(rndFind); |
| 305 rndFind.m_wsCondition = wsSaveCondition; | 305 rndFind.m_wsCondition = wsSaveCondition; |
| 306 if (rndFind.m_Nodes.GetSize() > 0) { | 306 if (rndFind.m_Nodes.GetSize() > 0) { |
| 307 nodes.Append(rndFind.m_Nodes); | 307 nodes.Append(rndFind.m_Nodes); |
| 308 rndFind.m_Nodes.RemoveAll(); | 308 rndFind.m_Nodes.RemoveAll(); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 if (nodes.GetSize() > nNum) { | 312 if (nodes.GetSize() > nNum) { |
| 313 if (!(dwStyles & XFA_RESOLVENODE_ALL)) { | 313 if (!(dwStyles & XFA_RESOLVENODE_ALL)) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 bInnerSearch = TRUE; | 437 bInnerSearch = TRUE; |
| 438 } | 438 } |
| 439 } else { | 439 } else { |
| 440 if (m_pNodeHelper->XFA_NodeIsTransparent(child)) { | 440 if (m_pNodeHelper->XFA_NodeIsTransparent(child)) { |
| 441 bInnerSearch = TRUE; | 441 bInnerSearch = TRUE; |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 if (bInnerSearch) { | 444 if (bInnerSearch) { |
| 445 rndFind.m_CurNode = child; | 445 rndFind.m_CurNode = child; |
| 446 CFX_WideString wsOriginCondition = rndFind.m_wsCondition; | 446 CFX_WideString wsOriginCondition = rndFind.m_wsCondition; |
| 447 rndFind.m_wsCondition.Empty(); | 447 rndFind.m_wsCondition.clear(); |
| 448 uint32_t dwOriginStyle = rndFind.m_dwStyles; | 448 uint32_t dwOriginStyle = rndFind.m_dwStyles; |
| 449 rndFind.m_dwStyles = dwOriginStyle | XFA_RESOLVENODE_ALL; | 449 rndFind.m_dwStyles = dwOriginStyle | XFA_RESOLVENODE_ALL; |
| 450 XFA_ResolveNodes_Normal(rndFind); | 450 XFA_ResolveNodes_Normal(rndFind); |
| 451 rndFind.m_dwStyles = dwOriginStyle; | 451 rndFind.m_dwStyles = dwOriginStyle; |
| 452 rndFind.m_wsCondition = wsOriginCondition; | 452 rndFind.m_wsCondition = wsOriginCondition; |
| 453 if (rndFind.m_Nodes.GetSize() > 0) { | 453 if (rndFind.m_Nodes.GetSize() > 0) { |
| 454 nodes.Append(rndFind.m_Nodes); | 454 nodes.Append(rndFind.m_Nodes); |
| 455 rndFind.m_Nodes.RemoveAll(); | 455 rndFind.m_Nodes.RemoveAll(); |
| 456 } | 456 } |
| 457 } | 457 } |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 if (m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { | 820 if (m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { |
| 821 if (m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { | 821 if (m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { |
| 822 iIndex = 0; | 822 iIndex = 0; |
| 823 } else { | 823 } else { |
| 824 iIndex = iCount - 1; | 824 iIndex = iCount - 1; |
| 825 } | 825 } |
| 826 } else { | 826 } else { |
| 827 iIndex = iCount - 1; | 827 iIndex = iCount - 1; |
| 828 } | 828 } |
| 829 } | 829 } |
| OLD | NEW |