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

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

Issue 1981003002: Replace Release() { delete this; } in fde_xml_imp.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Revert accident with editor. Created 4 years, 7 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
« no previous file with comments | « xfa/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_document_serialize.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "core/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fxfa/app/xfa_ffnotify.h" 8 #include "xfa/fxfa/app/xfa_ffnotify.h"
9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
10 #include "xfa/fxfa/parser/xfa_basic_imp.h" 10 #include "xfa/fxfa/parser/xfa_basic_imp.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 m_pScriptSignature = nullptr; 70 m_pScriptSignature = nullptr;
71 } 71 }
72 72
73 void CXFA_Document::SetRoot(CXFA_Node* pNewRoot) { 73 void CXFA_Document::SetRoot(CXFA_Node* pNewRoot) {
74 if (m_pRootNode) { 74 if (m_pRootNode) {
75 AddPurgeNode(m_pRootNode); 75 AddPurgeNode(m_pRootNode);
76 } 76 }
77 m_pRootNode = pNewRoot; 77 m_pRootNode = pNewRoot;
78 RemovePurgeNode(pNewRoot); 78 RemovePurgeNode(pNewRoot);
79 } 79 }
80
81 void CXFA_Document::DestroyParser() {
82 delete m_pParser;
83 m_pParser = nullptr;
84 }
85
80 CXFA_FFNotify* CXFA_Document::GetNotify() const { 86 CXFA_FFNotify* CXFA_Document::GetNotify() const {
81 return m_pParser->GetNotify(); 87 return m_pParser->GetNotify();
82 } 88 }
83 CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) { 89 CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) {
84 return GetXFAObject(FX_HashCode_GetW(wsNodeName, false)); 90 return GetXFAObject(FX_HashCode_GetW(wsNodeName, false));
85 } 91 }
86 CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) { 92 CXFA_Object* CXFA_Document::GetXFAObject(uint32_t dwNodeNameHash) {
87 switch (dwNodeNameHash) { 93 switch (dwNodeNameHash) {
88 case XFA_HASHCODE_Data: { 94 case XFA_HASHCODE_Data: {
89 CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets)); 95 CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets));
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { 418 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) {
413 continue; 419 continue;
414 } 420 }
415 } 421 }
416 if (!pProtoNode) { 422 if (!pProtoNode) {
417 continue; 423 continue;
418 } 424 }
419 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); 425 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode);
420 } 426 }
421 } 427 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_document.h ('k') | xfa/fxfa/parser/xfa_document_serialize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698