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

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

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 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_object.h ('k') | xfa/fxfa/parser/xfa_parser.h » ('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 "xfa/fxfa/parser/xfa_object.h" 7 #include "xfa/fxfa/parser/xfa_object.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 4027 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 } 4038 }
4039 FX_BOOL CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr, 4039 FX_BOOL CXFA_Node::SetObject(XFA_ATTRIBUTE eAttr,
4040 void* pData, 4040 void* pData,
4041 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) { 4041 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo) {
4042 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); 4042 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr);
4043 return SetUserData(pKey, pData, pCallbackInfo); 4043 return SetUserData(pKey, pData, pCallbackInfo);
4044 } 4044 }
4045 FX_BOOL CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, void*& pData) { 4045 FX_BOOL CXFA_Node::TryObject(XFA_ATTRIBUTE eAttr, void*& pData) {
4046 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); 4046 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr);
4047 pData = GetUserData(pKey); 4047 pData = GetUserData(pKey);
4048 return pData != nullptr; 4048 return !!pData;
4049 } 4049 }
4050 FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr, 4050 FX_BOOL CXFA_Node::SetValue(XFA_ATTRIBUTE eAttr,
4051 XFA_ATTRIBUTETYPE eType, 4051 XFA_ATTRIBUTETYPE eType,
4052 void* pValue, 4052 void* pValue,
4053 bool bNotify) { 4053 bool bNotify) {
4054 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); 4054 void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr);
4055 OnChanging(eAttr, bNotify); 4055 OnChanging(eAttr, bNotify);
4056 SetMapModuleValue(pKey, pValue); 4056 SetMapModuleValue(pKey, pValue);
4057 OnChanged(eAttr, bNotify, FALSE); 4057 OnChanged(eAttr, bNotify, FALSE);
4058 if (IsNeedSavingXMLNode()) { 4058 if (IsNeedSavingXMLNode()) {
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode); 5311 return m_pAttachNode->InsertChild(pNewNode, pBeforeNode);
5312 } 5312 }
5313 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { 5313 FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) {
5314 return m_pAttachNode->RemoveChild(pNode); 5314 return m_pAttachNode->RemoveChild(pNode);
5315 } 5315 }
5316 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { 5316 CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) {
5317 return m_pAttachNode->GetChild( 5317 return m_pAttachNode->GetChild(
5318 iIndex, XFA_ELEMENT_UNKNOWN, 5318 iIndex, XFA_ELEMENT_UNKNOWN,
5319 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); 5319 m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform);
5320 } 5320 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_object.h ('k') | xfa/fxfa/parser/xfa_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698