From 948879d23226aea31aa9ae5f6eb1fb8572f0fc05 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 19:43:56 +0000 Subject: Rename GetFont to GetFontIfExists This CL makes it explicit that GetFont may return nullptr. Change-Id: Icb7ec5ad4ed6c5f7a728230d1237898b8f2fd778 Reviewed-on: https://pdfium-review.googlesource.com/22673 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_widgetacc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_widgetacc.cpp') diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 222de47e89..034f59113d 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -513,7 +513,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CXFA_FFDoc* doc, CFX_SizeF& szCap) { if (font) { fFontSize = font->GetFontSize(); } else { - CXFA_Font* widgetfont = m_pNode->GetFont(); + CXFA_Font* widgetfont = m_pNode->GetFontIfExists(); if (widgetfont) fFontSize = widgetfont->GetFontSize(); } @@ -1292,7 +1292,7 @@ void CXFA_WidgetAcc::SetImageEditImage( RetainPtr CXFA_WidgetAcc::GetFDEFont(CXFA_FFDoc* doc) { WideString wsFontName = L"Courier"; uint32_t dwFontStyle = 0; - CXFA_Font* font = m_pNode->GetFont(); + CXFA_Font* font = m_pNode->GetFontIfExists(); if (font) { if (font->IsBold()) dwFontStyle |= FXFONT_BOLD; -- cgit v1.2.3