From c4ecd7b2e10e37a3b29eb380472fbee4936522ac Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 23 May 2017 10:21:54 -0400 Subject: Cleanup default values and methods in CXFA_Widgetdata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie591de17aba54d6d0f96b1133be7d899bab577cf Reviewed-on: https://pdfium-review.googlesource.com/5660 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- xfa/fxfa/cxfa_widgetacc.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/cxfa_widgetacc.cpp') 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 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 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; } -- cgit v1.2.3