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

Side by Side Diff: xfa/fxfa/parser/xfa_script_imp.cpp

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 5 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 "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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 rndFind.m_Nodes.RemoveAll(); 637 rndFind.m_Nodes.RemoveAll();
638 if (bDataBind) { 638 if (bDataBind) {
639 break; 639 break;
640 } 640 }
641 } 641 }
642 findNodes.RemoveAll(); 642 findNodes.RemoveAll();
643 nNodes = retNodes.GetSize(); 643 nNodes = retNodes.GetSize();
644 if (nNodes < 1) { 644 if (nNodes < 1) {
645 if (dwStyles & XFA_RESOLVENODE_CreateNode) { 645 if (dwStyles & XFA_RESOLVENODE_CreateNode) {
646 bNextCreate = TRUE; 646 bNextCreate = TRUE;
647 if (m_ResolveProcessor->GetNodeHelper()->m_pCreateParent == nullptr) { 647 if (!m_ResolveProcessor->GetNodeHelper()->m_pCreateParent) {
648 m_ResolveProcessor->GetNodeHelper()->m_pCreateParent = 648 m_ResolveProcessor->GetNodeHelper()->m_pCreateParent =
649 ToNode(rndFind.m_CurNode); 649 ToNode(rndFind.m_CurNode);
650 m_ResolveProcessor->GetNodeHelper()->m_iCreateCount = 1; 650 m_ResolveProcessor->GetNodeHelper()->m_iCreateCount = 1;
651 } 651 }
652 FX_BOOL bCreate = 652 FX_BOOL bCreate =
653 m_ResolveProcessor->GetNodeHelper()->XFA_ResolveNodes_CreateNode( 653 m_ResolveProcessor->GetNodeHelper()->XFA_ResolveNodes_CreateNode(
654 rndFind.m_wsName, rndFind.m_wsCondition, 654 rndFind.m_wsName, rndFind.m_wsCondition,
655 nStart == wsExpression.GetLength(), this); 655 nStart == wsExpression.GetLength(), this);
656 if (bCreate) { 656 if (bCreate) {
657 continue; 657 continue;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 return; 737 return;
738 if (nodes.GetSize() > 0) 738 if (nodes.GetSize() > 0)
739 m_pScriptNodeArray->Copy(nodes); 739 m_pScriptNodeArray->Copy(nodes);
740 } 740 }
741 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) { 741 void CXFA_ScriptContext::AddNodesOfRunScript(CXFA_Node* pNode) {
742 if (!m_pScriptNodeArray) 742 if (!m_pScriptNodeArray)
743 return; 743 return;
744 if (m_pScriptNodeArray->Find(pNode) == -1) 744 if (m_pScriptNodeArray->Find(pNode) == -1)
745 m_pScriptNodeArray->Add(pNode); 745 m_pScriptNodeArray->Add(pNode);
746 } 746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698