Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: xfa/fxfa/parser/cxfa_font.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_fill.cpp ('k') | xfa/fxfa/parser/cxfa_line.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/parser/cxfa_font.h" 7 #include "xfa/fxfa/parser/cxfa_font.h"
8 8
9 #include "core/fxge/include/fx_dib.h" 9 #include "core/fxge/include/fx_dib.h"
10 #include "xfa/fxfa/parser/cxfa_fill.h" 10 #include "xfa/fxfa/parser/cxfa_fill.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return eAttr == XFA_ATTRIBUTEENUM_Bold; 75 return eAttr == XFA_ATTRIBUTEENUM_Bold;
76 } 76 }
77 77
78 FX_BOOL CXFA_Font::IsItalic() { 78 FX_BOOL CXFA_Font::IsItalic() {
79 XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Normal; 79 XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_Normal;
80 m_pNode->TryEnum(XFA_ATTRIBUTE_Posture, eAttr); 80 m_pNode->TryEnum(XFA_ATTRIBUTE_Posture, eAttr);
81 return eAttr == XFA_ATTRIBUTEENUM_Italic; 81 return eAttr == XFA_ATTRIBUTEENUM_Italic;
82 } 82 }
83 83
84 void CXFA_Font::SetColor(FX_ARGB color) { 84 void CXFA_Font::SetColor(FX_ARGB color) {
85 CXFA_Fill fill(m_pNode->GetProperty(0, XFA_ELEMENT_Fill)); 85 CXFA_Fill fill(m_pNode->GetProperty(0, XFA_Element::Fill));
86 fill.SetColor(color); 86 fill.SetColor(color);
87 } 87 }
88 88
89 FX_ARGB CXFA_Font::GetColor() { 89 FX_ARGB CXFA_Font::GetColor() {
90 CXFA_Fill fill(m_pNode->GetChild(0, XFA_ELEMENT_Fill)); 90 CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill));
91 return fill ? fill.GetColor(TRUE) : 0xFF000000; 91 return fill ? fill.GetColor(TRUE) : 0xFF000000;
92 } 92 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_fill.cpp ('k') | xfa/fxfa/parser/cxfa_line.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698