From d02c4d8b1199799340833ebfc79d7092f9b2d043 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 30 Nov 2017 22:06:40 +0000 Subject: Rename XFA_ATTRIBUTEENUM to XFA_AttributeEnum enum class This CL changes the enum XFA_ATTRIBUTEENUM to an enum class XFA_AttributeEnum. Methods expecting an int32 have been updated to take or return the XFA_AttrbuteEnum type. Change-Id: I268453949545fe2dd3eae707be4d9cc7edeff763 Reviewed-on: https://pdfium-review.googlesource.com/20070 Reviewed-by: Lei Zhang Commit-Queue: dsinclair --- xfa/fxfa/cxfa_textparser.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'xfa/fxfa/cxfa_textparser.cpp') diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp index 433531373c..9260ab0835 100644 --- a/xfa/fxfa/cxfa_textparser.cpp +++ b/xfa/fxfa/cxfa_textparser.cpp @@ -103,20 +103,20 @@ RetainPtr CXFA_TextParser::CreateRootStyle( pStyle->SetTextIndent(indent); CFX_CSSTextAlign hAlign = CFX_CSSTextAlign::Left; switch (paraData.GetHorizontalAlign()) { - case XFA_ATTRIBUTEENUM_Center: + case XFA_AttributeEnum::Center: hAlign = CFX_CSSTextAlign::Center; break; - case XFA_ATTRIBUTEENUM_Right: + case XFA_AttributeEnum::Right: hAlign = CFX_CSSTextAlign::Right; break; - case XFA_ATTRIBUTEENUM_Justify: + case XFA_AttributeEnum::Justify: hAlign = CFX_CSSTextAlign::Justify; break; - case XFA_ATTRIBUTEENUM_JustifyAll: + case XFA_AttributeEnum::JustifyAll: hAlign = CFX_CSSTextAlign::JustifyAll; break; - case XFA_ATTRIBUTEENUM_Left: - case XFA_ATTRIBUTEENUM_Radix: + case XFA_AttributeEnum::Left: + case XFA_AttributeEnum::Radix: break; default: NOTREACHED(); @@ -297,11 +297,11 @@ std::unique_ptr CXFA_TextParser::ParseTagInfo( return tagProvider; } -XFA_ATTRIBUTEENUM CXFA_TextParser::GetVAlign( +XFA_AttributeEnum CXFA_TextParser::GetVAlign( CXFA_TextProvider* pTextProvider) const { CXFA_ParaData paraData = pTextProvider->GetParaData(); return paraData.HasValidNode() ? paraData.GetVerticalAlign() - : XFA_ATTRIBUTEENUM_Top; + : XFA_AttributeEnum::Top; } float CXFA_TextParser::GetTabInterval(CFX_CSSComputedStyle* pStyle) const { @@ -412,9 +412,9 @@ int32_t CXFA_TextParser::GetVerScale(CXFA_TextProvider* pTextProvider, void CXFA_TextParser::GetUnderline(CXFA_TextProvider* pTextProvider, CFX_CSSComputedStyle* pStyle, int32_t& iUnderline, - int32_t& iPeriod) const { + XFA_AttributeEnum& iPeriod) const { iUnderline = 0; - iPeriod = XFA_ATTRIBUTEENUM_All; + iPeriod = XFA_AttributeEnum::All; CXFA_FontData fontData = pTextProvider->GetFontData(); if (!pStyle) { if (fontData.HasValidNode()) { @@ -433,7 +433,7 @@ void CXFA_TextParser::GetUnderline(CXFA_TextProvider* pTextProvider, WideString wsValue; if (pStyle->GetCustomStyle(L"underlinePeriod", wsValue)) { if (wsValue == L"word") - iPeriod = XFA_ATTRIBUTEENUM_Word; + iPeriod = XFA_AttributeEnum::Word; } else if (fontData.HasValidNode()) { iPeriod = fontData.GetUnderlinePeriod(); } -- cgit v1.2.3