diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-05-23 10:21:54 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-23 15:38:39 +0000 |
commit | c4ecd7b2e10e37a3b29eb380472fbee4936522ac (patch) | |
tree | 2823d3558eeae73e91731fd6e9f3d7b346a33393 /xfa/fxfa/cxfa_widgetacc.cpp | |
parent | 1b02d01804039a9f0584c081294ceb07e52b9bdc (diff) | |
download | pdfium-c4ecd7b2e10e37a3b29eb380472fbee4936522ac.tar.xz |
Cleanup default values and methods in CXFA_Widgetdata
Change-Id: Ie591de17aba54d6d0f96b1133be7d899bab577cf
Reviewed-on: https://pdfium-review.googlesource.com/5660
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 3e369d60e3..9b52f95b63 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -554,7 +554,7 @@ int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) { if (GetElementType() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; - CXFA_Validate validate = GetValidate(); + CXFA_Validate validate = GetValidate(false); if (!validate) return XFA_EVENTERROR_NotExist; @@ -724,7 +724,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { float fFontSize = 10.0f; if (CXFA_Font font = caption.GetFont()) fFontSize = font.GetFontSize(); - else if (CXFA_Font widgetfont = GetFont()) + else if (CXFA_Font widgetfont = GetFont(false)) fFontSize = widgetfont.GetFontSize(); if (bVert) { @@ -1495,7 +1495,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() { CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() { CFX_WideStringC wsFontName = L"Courier"; uint32_t dwFontStyle = 0; - if (CXFA_Font font = GetFont()) { + if (CXFA_Font font = GetFont(false)) { if (font.IsBold()) dwFontStyle |= FX_FONTSTYLE_Bold; if (font.IsItalic()) @@ -1510,7 +1510,7 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() { float CXFA_WidgetAcc::GetFontSize() { float fFontSize = 10.0f; - if (CXFA_Font font = GetFont()) + if (CXFA_Font font = GetFont(false)) fFontSize = font.GetFontSize(); return fFontSize < 0.1f ? 10.0f : fFontSize; } @@ -1525,8 +1525,7 @@ float CXFA_WidgetAcc::GetLineHeight() { } FX_ARGB CXFA_WidgetAcc::GetTextColor() { - if (CXFA_Font font = GetFont()) { + if (CXFA_Font font = GetFont(false)) return font.GetColor(); - } return 0xFF000000; } |