| 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_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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |