summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-30 22:06:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-30 22:06:40 +0000
commitd02c4d8b1199799340833ebfc79d7092f9b2d043 (patch)
tree46c5ad3489153bf600529314fdbcf8c772622a24 /xfa/fxfa/cxfa_textparser.cpp
parentf65f1d398804ec4702a3de691398902a0347461c (diff)
downloadpdfium-d02c4d8b1199799340833ebfc79d7092f9b2d043.tar.xz
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 <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textparser.cpp')
-rw-r--r--xfa/fxfa/cxfa_textparser.cpp22
1 files changed, 11 insertions, 11 deletions
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<CFX_CSSComputedStyle> 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::TagProvider> 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();
}