diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-28 11:51:24 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-28 20:39:56 +0000 |
commit | dd0e6e1eba14c76dedd4b4e55ab47406856c9a76 (patch) | |
tree | 36f27e3ec86b5c376d51bcd753cbdfbe3402e6c7 /xfa/fxfa | |
parent | 58418a24debb15019ec71eca193eff02c2a4846c (diff) | |
download | pdfium-dd0e6e1eba14c76dedd4b4e55ab47406856c9a76.tar.xz |
Cleanup font defines
This CL removes duplicate defines between XFA and core. Several OR'd
values have been coverted into individual booleans to make the code
clearer.
Change-Id: Ic32a71c711cffd9a0cf1136e5a22f0502e085c39
Reviewed-on: https://pdfium-review.googlesource.com/15071
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_textparser.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp index 35e9b01580..af9a274a94 100644 --- a/xfa/fxfa/cxfa_textparser.cpp +++ b/xfa/fxfa/cxfa_textparser.cpp @@ -324,9 +324,9 @@ RetainPtr<CFGAS_GEFont> CXFA_TextParser::GetFont( if (font) { font.GetTypeface(wsFamily); if (font.IsBold()) - dwStyle |= FX_FONTSTYLE_Bold; + dwStyle |= FXFONT_BOLD; if (font.IsItalic()) - dwStyle |= FX_FONTSTYLE_Italic; + dwStyle |= FXFONT_BOLD; } if (pStyle) { @@ -336,9 +336,9 @@ RetainPtr<CFGAS_GEFont> CXFA_TextParser::GetFont( dwStyle = 0; if (pStyle->GetFontWeight() > FXFONT_FW_NORMAL) - dwStyle |= FX_FONTSTYLE_Bold; + dwStyle |= FXFONT_BOLD; if (pStyle->GetFontStyle() == CFX_CSSFontStyle::Italic) - dwStyle |= FX_FONTSTYLE_Italic; + dwStyle |= FXFONT_ITALIC; } CXFA_FFDoc* pDoc = pTextProvider->GetDocNode(); diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 260581e73b..82eec9e16d 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -1497,9 +1497,9 @@ RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() { uint32_t dwFontStyle = 0; if (CXFA_Font font = GetFont(false)) { if (font.IsBold()) - dwFontStyle |= FX_FONTSTYLE_Bold; + dwFontStyle |= FXFONT_BOLD; if (font.IsItalic()) - dwFontStyle |= FX_FONTSTYLE_Italic; + dwFontStyle |= FXFONT_ITALIC; font.GetTypeface(wsFontName); } |