summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_fontdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-08 18:03:31 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-08 18:03:31 +0000
commit517807e01712c1d4400ec8dde0ab3d9b467bbf04 (patch)
tree002e1d0ecb9cf9bb138fda369509cd8fc46afdd3 /xfa/fxfa/parser/cxfa_fontdata.cpp
parent6bccc1228ddfccae296f8f4236512caad7cbc1c9 (diff)
downloadpdfium-517807e01712c1d4400ec8dde0ab3d9b467bbf04.tar.xz
Convert XFA_UNIT to an enum class
This CL converts the XFA_UNIT enum to the XFA_Unit enum class. Change-Id: I6e0588f265e45b863ff1ecc170279f558fb6bd67 Reviewed-on: https://pdfium-review.googlesource.com/18090 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_fontdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_fontdata.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_fontdata.cpp b/xfa/fxfa/parser/cxfa_fontdata.cpp
index 0a50a0e5e8..f207fdeda5 100644
--- a/xfa/fxfa/parser/cxfa_fontdata.cpp
+++ b/xfa/fxfa/parser/cxfa_fontdata.cpp
@@ -16,7 +16,7 @@ CXFA_FontData::CXFA_FontData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
float CXFA_FontData::GetBaselineShift() {
return m_pNode->JSNode()
->GetMeasure(XFA_Attribute::BaselineShift)
- .ToUnit(XFA_UNIT_Pt);
+ .ToUnit(XFA_Unit::Pt);
}
float CXFA_FontData::GetHorizontalScale() {
@@ -40,9 +40,9 @@ float CXFA_FontData::GetLetterSpacing() {
return 0;
CXFA_Measurement ms(wsValue);
- if (ms.GetUnit() == XFA_UNIT_Em)
+ if (ms.GetUnit() == XFA_Unit::Em)
return ms.GetValue() * GetFontSize();
- return ms.ToUnit(XFA_UNIT_Pt);
+ return ms.ToUnit(XFA_Unit::Pt);
}
int32_t CXFA_FontData::GetLineThrough() {
@@ -66,7 +66,7 @@ int32_t CXFA_FontData::GetUnderlinePeriod() {
float CXFA_FontData::GetFontSize() {
CXFA_Measurement ms;
m_pNode->JSNode()->TryMeasure(XFA_Attribute::Size, ms, true);
- return ms.ToUnit(XFA_UNIT_Pt);
+ return ms.ToUnit(XFA_Unit::Pt);
}
void CXFA_FontData::GetTypeface(WideStringView& wsTypeFace) {