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

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

Issue 2457673003: Fix some FX_BOOL / int noise in fxfa (Closed)
Patch Set: Created 4 years, 1 month 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 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
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
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 }
OLDNEW
« xfa/fxfa/app/xfa_textlayout.cpp ('K') | « xfa/fxfa/fm2js/xfa_fm2jscontext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698