summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-13 01:01:06 -0700
committerLei Zhang <thestig@chromium.org>2015-06-13 01:01:06 -0700
commit366e1c47335717b73d14b804020291758c8afc38 (patch)
tree74c8503b4614fb949db17a9010e38365d33eb427 /fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
parent95e854f3d8a6e1971b4538cc57c6e7c533b4aaed (diff)
downloadpdfium-366e1c47335717b73d14b804020291758c8afc38.tar.xz
Merge to XFA: Remove unneeded checks in CPDF_DocPageData::GetFontFileStreamAcc().
The input cannot be null. Same for CPDF_Document::LoadFontFile(). Also set the contract for CPDF_Document::LoadFont() and adjust callers accordingly. Also remove unused CPDF_Document::FindFont(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1184673002. (cherry picked from commit 1972b16849fedfda675eacd5c8594b54dbd1264d) Review URL: https://codereview.chromium.org/1181393002.
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index f4eb74bd72..53efe9fe3a 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -286,10 +286,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
}
}
- if (pFontDict)
- return m_pDocument->LoadFont(pFontDict);
- else
- return NULL;
+ return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr;
}
void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType)