Index: xfa/fxfa/app/xfa_fontmgr.cpp |
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp |
index ed93b16ad21ab639f0f85c0e08119f255a57c7b3..c44fbe5729ed70b2a2f3e87ab092b61fde6c749f 100644 |
--- a/xfa/fxfa/app/xfa_fontmgr.cpp |
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp |
@@ -1721,7 +1721,7 @@ const XFA_FONTINFO* XFA_GetFontINFOByFontName( |
int32_t iStart = 0; |
int32_t iEnd = sizeof(g_XFAFontsMap) / sizeof(XFA_FONTINFO) - 1; |
int32_t iMid = 0; |
- const XFA_FONTINFO* pFontInfo = NULL; |
+ const XFA_FONTINFO* pFontInfo = nullptr; |
do { |
iMid = (iStart + iEnd) / 2; |
uint32_t dwFontNameHash = g_XFAFontsMap[iMid].dwFontNameHash; |
@@ -1795,8 +1795,8 @@ IFGAS_Font* CXFA_DefFontMgr::GetDefaultFont(CXFA_FFDoc* hDoc, |
IFGAS_Font* pFont = |
pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage); |
if (!pFont) |
- pFont = |
- pFDEFontMgr->LoadFont((const FX_WCHAR*)NULL, dwFontStyles, wCodePage); |
+ pFont = pFDEFontMgr->LoadFont((const FX_WCHAR*)nullptr, dwFontStyles, |
+ wCodePage); |
ASSERT(pFont); |
if (pFont) { |
m_CacheFonts.Add(pFont); |
@@ -1830,17 +1830,17 @@ IFGAS_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, |
CPDF_Font** pDstPDFFont, |
FX_BOOL bStrictMatch) { |
CPDF_Document* pDoc = m_pDoc->GetPDFDoc(); |
- if (pDoc == NULL) { |
- return NULL; |
- } |
+ if (!pDoc) |
+ return nullptr; |
+ |
CPDF_Dictionary* pFontSetDict = |
pDoc->GetRoot()->GetDictBy("AcroForm")->GetDictBy("DR"); |
if (!pFontSetDict) { |
- return NULL; |
+ return nullptr; |
} |
pFontSetDict = (CPDF_Dictionary*)pFontSetDict->GetDictBy("Font"); |
if (!pFontSetDict) { |
- return NULL; |
+ return nullptr; |
} |
strPsName.Remove(' '); |
IFGAS_FontMgr* pFDEFontMgr = m_pDoc->GetApp()->GetFDEFontMgr(); |
@@ -1853,23 +1853,23 @@ IFGAS_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName, |
} |
CPDF_Object* pDirect = pObj->GetDirect(); |
if (!pDirect || !pDirect->IsDictionary()) { |
- return NULL; |
+ return nullptr; |
} |
CPDF_Dictionary* pFontDict = (CPDF_Dictionary*)pDirect; |
if (pFontDict->GetStringBy("Type") != "Font") { |
- return NULL; |
+ return nullptr; |
} |
CPDF_Font* pPDFFont = pDoc->LoadFont(pFontDict); |
if (!pPDFFont) { |
- return NULL; |
+ return nullptr; |
} |
if (!pPDFFont->IsEmbedded()) { |
*pDstPDFFont = pPDFFont; |
- return NULL; |
+ return nullptr; |
} |
return IFGAS_Font::LoadFont(&pPDFFont->m_Font, pFDEFontMgr); |
} |
- return NULL; |
+ return nullptr; |
} |
IFGAS_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily, |