summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparser.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/cxfa_textparser.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/cxfa_textparser.cpp')
-rw-r--r--xfa/fxfa/cxfa_textparser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp
index a95350da98..db03ec4367 100644
--- a/xfa/fxfa/cxfa_textparser.cpp
+++ b/xfa/fxfa/cxfa_textparser.cpp
@@ -298,7 +298,7 @@ int32_t CXFA_TextParser::GetVAlign(CXFA_TextProvider* pTextProvider) const {
float CXFA_TextParser::GetTabInterval(CFX_CSSComputedStyle* pStyle) const {
WideString wsValue;
if (pStyle && pStyle->GetCustomStyle(L"tab-interval", wsValue))
- return CXFA_Measurement(wsValue.AsStringView()).ToUnit(XFA_UNIT_Pt);
+ return CXFA_Measurement(wsValue.AsStringView()).ToUnit(XFA_Unit::Pt);
return 36;
}
@@ -598,7 +598,7 @@ bool CXFA_TextParser::GetTabstops(CFX_CSSComputedStyle* pStyle,
if (ch == ' ') {
uint32_t dwHashCode = FX_HashCode_GetW(wsAlign.AsStringView(), true);
CXFA_Measurement ms(WideStringView(pTabStops + iLast, iCur - iLast));
- float fPos = ms.ToUnit(XFA_UNIT_Pt);
+ float fPos = ms.ToUnit(XFA_Unit::Pt);
pTabstopContext->Append(dwHashCode, fPos);
wsAlign.clear();
eStatus = TabStopStatus::None;
@@ -613,7 +613,7 @@ bool CXFA_TextParser::GetTabstops(CFX_CSSComputedStyle* pStyle,
if (!wsAlign.IsEmpty()) {
uint32_t dwHashCode = FX_HashCode_GetW(wsAlign.AsStringView(), true);
CXFA_Measurement ms(WideStringView(pTabStops + iLast, iCur - iLast));
- float fPos = ms.ToUnit(XFA_UNIT_Pt);
+ float fPos = ms.ToUnit(XFA_Unit::Pt);
pTabstopContext->Append(dwHashCode, fPos);
}
return true;