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_imp.h" | 7 #include "xfa/fxfa/parser/xfa_script_imp.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "fxjse/include/cfxjse_arguments.h" | 10 #include "fxjse/include/cfxjse_arguments.h" |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 rndFind.m_Nodes.RemoveAll(); | 636 rndFind.m_Nodes.RemoveAll(); |
637 if (bDataBind) { | 637 if (bDataBind) { |
638 break; | 638 break; |
639 } | 639 } |
640 } | 640 } |
641 findNodes.RemoveAll(); | 641 findNodes.RemoveAll(); |
642 nNodes = retNodes.GetSize(); | 642 nNodes = retNodes.GetSize(); |
643 if (nNodes < 1) { | 643 if (nNodes < 1) { |
644 if (dwStyles & XFA_RESOLVENODE_CreateNode) { | 644 if (dwStyles & XFA_RESOLVENODE_CreateNode) { |
645 bNextCreate = TRUE; | 645 bNextCreate = TRUE; |
646 if (m_ResolveProcessor->GetNodeHelper()->m_pCreateParent == nullptr) { | 646 if (!m_ResolveProcessor->GetNodeHelper()->m_pCreateParent) { |
647 m_ResolveProcessor->GetNodeHelper()->m_pCreateParent = | 647 m_ResolveProcessor->GetNodeHelper()->m_pCreateParent = |
648 ToNode(rndFind.m_CurNode); | 648 ToNode(rndFind.m_CurNode); |
649 m_ResolveProcessor->GetNodeHelper()->m_iCreateCount = 1; | 649 m_ResolveProcessor->GetNodeHelper()->m_iCreateCount = 1; |
650 } | 650 } |
651 FX_BOOL bCreate = | 651 FX_BOOL bCreate = |
652 m_ResolveProcessor->GetNodeHelper()->XFA_ResolveNodes_CreateNode( | 652 m_ResolveProcessor->GetNodeHelper()->XFA_ResolveNodes_CreateNode( |
653 rndFind.m_wsName, rndFind.m_wsCondition, | 653 rndFind.m_wsName, rndFind.m_wsCondition, |
654 nStart == wsExpression.GetLength(), this); | 654 nStart == wsExpression.GetLength(), this); |
655 if (bCreate) { | 655 if (bCreate) { |
656 continue; | 656 continue; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 return; | 736 return; |
737 if (nodes.GetSize() > 0) | 737 if (nodes.GetSize() > 0) |
738 m_pScriptNodeArray->Copy(nodes); | 738 m_pScriptNodeArray->Copy(nodes); |
739 } | 739 } |
740 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { | 740 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { |
741 if (!m_pScriptNodeArray) | 741 if (!m_pScriptNodeArray) |
742 return; | 742 return; |
743 if (m_pScriptNodeArray->Find(pNode) == -1) | 743 if (m_pScriptNodeArray->Find(pNode) == -1) |
744 m_pScriptNodeArray->Add(pNode); | 744 m_pScriptNodeArray->Add(pNode); |
745 } | 745 } |
OLD | NEW |