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

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

Issue 2467203003: Remove FX_BOOL from xfa. (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
« no previous file with comments | « xfa/fxfa/parser/cxfa_data.h ('k') | xfa/fxfa/parser/cxfa_dataexporter.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 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/cxfa_data.h" 7 #include "xfa/fxfa/parser/cxfa_data.h"
8 8
9 #include "core/fxcrt/fx_ext.h" 9 #include "core/fxcrt/fx_ext.h"
10 #include "xfa/fxfa/parser/cxfa_measurement.h" 10 #include "xfa/fxfa/parser/cxfa_measurement.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 } 59 }
60 } 60 }
61 return (0xff << 24) | (r << 16) | (g << 8) | b; 61 return (0xff << 24) | (r << 16) | (g << 8) | b;
62 } 62 }
63 63
64 XFA_Element CXFA_Data::GetElementType() const { 64 XFA_Element CXFA_Data::GetElementType() const {
65 return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown; 65 return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown;
66 } 66 }
67 67
68 FX_BOOL CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr, 68 bool CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
69 FX_FLOAT& fValue, 69 FX_FLOAT& fValue,
70 FX_BOOL bUseDefault) const { 70 bool bUseDefault) const {
71 CXFA_Measurement ms; 71 CXFA_Measurement ms;
72 if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) { 72 if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) {
73 fValue = ms.ToUnit(XFA_UNIT_Pt); 73 fValue = ms.ToUnit(XFA_UNIT_Pt);
74 return TRUE; 74 return true;
75 } 75 }
76 return FALSE; 76 return false;
77 } 77 }
78 78
79 FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) { 79 bool CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) {
80 CXFA_Measurement ms(fValue, XFA_UNIT_Pt); 80 CXFA_Measurement ms(fValue, XFA_UNIT_Pt);
81 return m_pNode->SetMeasure(eAttr, ms); 81 return m_pNode->SetMeasure(eAttr, ms);
82 } 82 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_data.h ('k') | xfa/fxfa/parser/cxfa_dataexporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698