diff options
author | Lei Zhang <thestig@chromium.org> | 2016-02-22 20:32:21 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-02-22 20:32:21 -0800 |
commit | 5eca305b1586b2107566a5c124baa5f2e00096c0 (patch) | |
tree | d2b6b17b62995b2249a28956a17ae87122f83124 /fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | |
parent | d2019df0a77c5d01a336f16be054d2f373e38c54 (diff) | |
download | pdfium-5eca305b1586b2107566a5c124baa5f2e00096c0.tar.xz |
Remove foo != NULL outside of xfa/
Most of these are from the XFA branch.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1720043003 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index 96f727eee6..bba44ab639 100644 --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp @@ -59,7 +59,7 @@ void CBA_FontMap::Initialize() { void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, const CFX_ByteString& sFontName) { - ASSERT(pFont != NULL); + ASSERT(pFont); if (m_pDefaultFont) return; @@ -75,12 +75,8 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset) { - ASSERT(m_pAnnotDict != NULL); - if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") { CPDF_Document* pDocument = GetDocument(); - ASSERT(pDocument != NULL); - CPDF_Dictionary* pRootDict = pDocument->GetRoot(); if (!pRootDict) return NULL; @@ -109,15 +105,12 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, if (!pResDict) return NULL; - CPDF_Document* pDocument = GetDocument(); - ASSERT(pDocument != NULL); - CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font"); if (!pFonts) return NULL; + CPDF_Document* pDocument = GetDocument(); CPDF_Font* pFind = NULL; - for (const auto& it : *pFonts) { const CFX_ByteString& csKey = it.first; CPDF_Object* pObj = it.second; @@ -154,9 +147,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, if (!pFont) return; - ASSERT(m_pAnnotDict != NULL); - ASSERT(m_pDocument != NULL); - CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"); if (!pAPDict) { @@ -205,9 +195,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, } CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { - ASSERT(m_pAnnotDict != NULL); - ASSERT(m_pDocument != NULL); - CPDF_Dictionary* pAcroFormDict = NULL; FX_BOOL bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget"); |