summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_widgetacc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 19:43:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 19:43:56 +0000
commit948879d23226aea31aa9ae5f6eb1fb8572f0fc05 (patch)
treee40d527c3f8757d8038ef7f7cd26dca7a83e3574 /xfa/fxfa/cxfa_widgetacc.cpp
parente844cccc8419dae40720aad57c3bcd7ced14a925 (diff)
downloadpdfium-948879d23226aea31aa9ae5f6eb1fb8572f0fc05.tar.xz
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 <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp4
1 files changed, 2 insertions, 2 deletions
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<CFGAS_GEFont> 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;