summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textprovider.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_textprovider.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_textprovider.cpp')
-rw-r--r--xfa/fxfa/cxfa_textprovider.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_textprovider.cpp b/xfa/fxfa/cxfa_textprovider.cpp
index e3222a9c8b..6b4198ec1e 100644
--- a/xfa/fxfa/cxfa_textprovider.cpp
+++ b/xfa/fxfa/cxfa_textprovider.cpp
@@ -124,14 +124,14 @@ CXFA_Para* CXFA_TextProvider::GetPara() {
return pNode->GetChild<CXFA_Para>(0, XFA_Element::Para, false);
}
-CXFA_Font* CXFA_TextProvider::GetFont() {
+CXFA_Font* CXFA_TextProvider::GetFontIfExists() {
if (m_eType == XFA_TEXTPROVIDERTYPE_Text)
- return m_pWidgetAcc->GetNode()->GetFont();
+ return m_pWidgetAcc->GetNode()->GetFontIfExists();
CXFA_Caption* pNode = m_pWidgetAcc->GetNode()->GetChild<CXFA_Caption>(
0, XFA_Element::Caption, false);
CXFA_Font* font = pNode->GetChild<CXFA_Font>(0, XFA_Element::Font, false);
- return font ? font : m_pWidgetAcc->GetNode()->GetFont();
+ return font ? font : m_pWidgetAcc->GetNode()->GetFontIfExists();
}
bool CXFA_TextProvider::IsCheckButtonAndAutoWidth() {