| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 3793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3804 RemoveMapModuleKey(pKey); | 3804 RemoveMapModuleKey(pKey); |
| 3805 return TRUE; | 3805 return TRUE; |
| 3806 } | 3806 } |
| 3807 | 3807 |
| 3808 FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr, | 3808 FX_BOOL CXFA_Node::TryBoolean(XFA_ATTRIBUTE eAttr, |
| 3809 FX_BOOL& bValue, | 3809 FX_BOOL& bValue, |
| 3810 FX_BOOL bUseDefault) { | 3810 FX_BOOL bUseDefault) { |
| 3811 void* pValue = nullptr; | 3811 void* pValue = nullptr; |
| 3812 if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue)) | 3812 if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Boolean, bUseDefault, pValue)) |
| 3813 return FALSE; | 3813 return FALSE; |
| 3814 bValue = (FX_BOOL)(uintptr_t)pValue; | 3814 bValue = !!pValue; |
| 3815 return TRUE; | 3815 return TRUE; |
| 3816 } | 3816 } |
| 3817 | 3817 |
| 3818 FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, | 3818 FX_BOOL CXFA_Node::TryInteger(XFA_ATTRIBUTE eAttr, |
| 3819 int32_t& iValue, | 3819 int32_t& iValue, |
| 3820 FX_BOOL bUseDefault) { | 3820 FX_BOOL bUseDefault) { |
| 3821 void* pValue = nullptr; | 3821 void* pValue = nullptr; |
| 3822 if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, bUseDefault, pValue)) | 3822 if (!GetValue(eAttr, XFA_ATTRIBUTETYPE_Integer, bUseDefault, pValue)) |
| 3823 return FALSE; | 3823 return FALSE; |
| 3824 iValue = (int32_t)(uintptr_t)pValue; | 3824 iValue = (int32_t)(uintptr_t)pValue; |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5185 CXFA_Node* pSrcChild = pSrcModule->GetNodeItem(XFA_NODEITEM_FirstChild); | 5185 CXFA_Node* pSrcChild = pSrcModule->GetNodeItem(XFA_NODEITEM_FirstChild); |
| 5186 CXFA_Node* pDstChild = pDstModule->GetNodeItem(XFA_NODEITEM_FirstChild); | 5186 CXFA_Node* pDstChild = pDstModule->GetNodeItem(XFA_NODEITEM_FirstChild); |
| 5187 for (; pSrcChild && pDstChild; | 5187 for (; pSrcChild && pDstChild; |
| 5188 pSrcChild = pSrcChild->GetNodeItem(XFA_NODEITEM_NextSibling), | 5188 pSrcChild = pSrcChild->GetNodeItem(XFA_NODEITEM_NextSibling), |
| 5189 pDstChild = pDstChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { | 5189 pDstChild = pDstChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { |
| 5190 MoveBufferMapData(pSrcChild, pDstChild, pKey, TRUE); | 5190 MoveBufferMapData(pSrcChild, pDstChild, pKey, TRUE); |
| 5191 } | 5191 } |
| 5192 } | 5192 } |
| 5193 pSrcModule->MoveBufferMapData(pDstModule, pKey); | 5193 pSrcModule->MoveBufferMapData(pDstModule, pKey); |
| 5194 } | 5194 } |
| OLD | NEW |