summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_measurement.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:43:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:43:19 -0700
commitd19e912dd469e4bdad9f3020e1f6eb98f10f3470 (patch)
tree239cb568a80445f14a1ab9b63dcaaddcce67e1cc /xfa/fxfa/parser/cxfa_measurement.cpp
parent12f3e4a58f05850b93af35619cb04f0231d86acc (diff)
downloadpdfium-d19e912dd469e4bdad9f3020e1f6eb98f10f3470.tar.xz
Remove FX_BOOL from xfa.
Review-Url: https://codereview.chromium.org/2467203003
Diffstat (limited to 'xfa/fxfa/parser/cxfa_measurement.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_measurement.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/xfa/fxfa/parser/cxfa_measurement.cpp b/xfa/fxfa/parser/cxfa_measurement.cpp
index cd34f8af25..b1843a8b49 100644
--- a/xfa/fxfa/parser/cxfa_measurement.cpp
+++ b/xfa/fxfa/parser/cxfa_measurement.cpp
@@ -34,43 +34,43 @@ void CXFA_Measurement::Set(const CFX_WideStringC& wsMeasure) {
Set(fValue, eUnit);
}
-FX_BOOL CXFA_Measurement::ToString(CFX_WideString& wsMeasure) const {
+bool CXFA_Measurement::ToString(CFX_WideString& wsMeasure) const {
switch (GetUnit()) {
case XFA_UNIT_Mm:
wsMeasure.Format(L"%.8gmm", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Pt:
wsMeasure.Format(L"%.8gpt", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_In:
wsMeasure.Format(L"%.8gin", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Cm:
wsMeasure.Format(L"%.8gcm", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Mp:
wsMeasure.Format(L"%.8gmp", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Pc:
wsMeasure.Format(L"%.8gpc", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Em:
wsMeasure.Format(L"%.8gem", GetValue());
- return TRUE;
+ return true;
case XFA_UNIT_Percent:
wsMeasure.Format(L"%.8g%%", GetValue());
- return TRUE;
+ return true;
default:
wsMeasure.Format(L"%.8g", GetValue());
- return FALSE;
+ return false;
}
}
-FX_BOOL CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
+bool CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
fValue = GetValue();
XFA_UNIT eFrom = GetUnit();
if (eFrom == eUnit)
- return TRUE;
+ return true;
switch (eFrom) {
case XFA_UNIT_Pt:
@@ -92,29 +92,29 @@ FX_BOOL CXFA_Measurement::ToUnit(XFA_UNIT eUnit, FX_FLOAT& fValue) const {
break;
default:
fValue = 0;
- return FALSE;
+ return false;
}
switch (eUnit) {
case XFA_UNIT_Pt:
- return TRUE;
+ return true;
case XFA_UNIT_Mm:
fValue /= 72 / 2.54f / 10;
- return TRUE;
+ return true;
case XFA_UNIT_In:
fValue /= 72;
- return TRUE;
+ return true;
case XFA_UNIT_Cm:
fValue /= 72 / 2.54f;
- return TRUE;
+ return true;
case XFA_UNIT_Mp:
fValue /= 0.001f;
- return TRUE;
+ return true;
case XFA_UNIT_Pc:
fValue /= 12.0f;
- return TRUE;
+ return true;
default:
fValue = 0;
- return FALSE;
+ return false;
}
}