| 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 "../../../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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 rndFind.m_Nodes.RemoveAll(); | 307 rndFind.m_Nodes.RemoveAll(); |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 if (nodes.GetSize() > nNum) { | 311 if (nodes.GetSize() > nNum) { |
| 312 if (!(dwStyles & XFA_RESOLVENODE_ALL)) { | 312 if (!(dwStyles & XFA_RESOLVENODE_ALL)) { |
| 313 CXFA_NodeArray upArrayNodes; | 313 CXFA_NodeArray upArrayNodes; |
| 314 if (m_pNodeHelper->XFA_NodeIsTransparent((CXFA_Node*)curNode)) { | 314 if (m_pNodeHelper->XFA_NodeIsTransparent((CXFA_Node*)curNode)) { |
| 315 m_pNodeHelper->XFA_CountSiblings( | 315 m_pNodeHelper->XFA_CountSiblings( |
| 316 (CXFA_Node*)nodes[0], XFA_LOGIC_Transparent, &upArrayNodes, | 316 (CXFA_Node*)nodes[0], XFA_LOGIC_Transparent, &upArrayNodes, |
| 317 dwStyles & XFA_RESOLVENODE_TagName ? TRUE : FALSE); | 317 !!(dwStyles & XFA_RESOLVENODE_TagName)); |
| 318 } | 318 } |
| 319 if (upArrayNodes.GetSize() > nodes.GetSize()) { | 319 if (upArrayNodes.GetSize() > nodes.GetSize()) { |
| 320 upArrayNodes[0] = (CXFA_Node*)nodes[0]; | 320 upArrayNodes[0] = (CXFA_Node*)nodes[0]; |
| 321 nodes.RemoveAll(); | 321 nodes.RemoveAll(); |
| 322 nodes.Append((CXFA_ObjArray&)upArrayNodes); | 322 nodes.Append((CXFA_ObjArray&)upArrayNodes); |
| 323 upArrayNodes.RemoveAll(); | 323 upArrayNodes.RemoveAll(); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 XFA_ResolveNode_FilterCondition(rnd, wsCondition); | 326 XFA_ResolveNode_FilterCondition(rnd, wsCondition); |
| 327 if (nodes.GetSize() > 0) { | 327 if (nodes.GetSize() > 0) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 rndFind.m_Nodes.RemoveAll(); | 456 rndFind.m_Nodes.RemoveAll(); |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 child = child->GetNodeItem(XFA_NODEITEM_NextSibling); | 459 child = child->GetNodeItem(XFA_NODEITEM_NextSibling); |
| 460 } | 460 } |
| 461 if (nodes.GetSize() > nNum) { | 461 if (nodes.GetSize() > nNum) { |
| 462 if (m_pNodeHelper->XFA_NodeIsTransparent(parentNode)) { | 462 if (m_pNodeHelper->XFA_NodeIsTransparent(parentNode)) { |
| 463 CXFA_NodeArray upArrayNodes; | 463 CXFA_NodeArray upArrayNodes; |
| 464 m_pNodeHelper->XFA_CountSiblings( | 464 m_pNodeHelper->XFA_CountSiblings( |
| 465 (CXFA_Node*)nodes[0], XFA_LOGIC_Transparent, &upArrayNodes, | 465 (CXFA_Node*)nodes[0], XFA_LOGIC_Transparent, &upArrayNodes, |
| 466 dwStyles & XFA_RESOLVENODE_TagName ? TRUE : FALSE); | 466 !!(dwStyles & XFA_RESOLVENODE_TagName)); |
| 467 if (upArrayNodes.GetSize() > nodes.GetSize()) { | 467 if (upArrayNodes.GetSize() > nodes.GetSize()) { |
| 468 upArrayNodes[0] = (CXFA_Node*)nodes[0]; | 468 upArrayNodes[0] = (CXFA_Node*)nodes[0]; |
| 469 nodes.RemoveAll(); | 469 nodes.RemoveAll(); |
| 470 nodes.Append((CXFA_ObjArray&)upArrayNodes); | 470 nodes.Append((CXFA_ObjArray&)upArrayNodes); |
| 471 upArrayNodes.RemoveAll(); | 471 upArrayNodes.RemoveAll(); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 XFA_ResolveNode_FilterCondition(rnd, wsCondition); | 474 XFA_ResolveNode_FilterCondition(rnd, wsCondition); |
| 475 if (nodes.GetSize() > 0) { | 475 if (nodes.GetSize() > 0) { |
| 476 return 1; | 476 return 1; |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 if (m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { | 821 if (m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { |
| 822 if (m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { | 822 if (m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { |
| 823 iIndex = 0; | 823 iIndex = 0; |
| 824 } else { | 824 } else { |
| 825 iIndex = iCount - 1; | 825 iIndex = iCount - 1; |
| 826 } | 826 } |
| 827 } else { | 827 } else { |
| 828 iIndex = iCount - 1; | 828 iIndex = iCount - 1; |
| 829 } | 829 } |
| 830 } | 830 } |
| OLD | NEW |