Get rid of NULLs in fpdfsdk/

Review-Url: https://codereview.chromium.org/2031653003
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 4c74d5a..9102b7b 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -16,9 +16,9 @@
 CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot,
                          CFX_SystemHandler* pSystemHandler)
     : CPWL_FontMap(pSystemHandler),
-      m_pDocument(NULL),
-      m_pAnnotDict(NULL),
-      m_pDefaultFont(NULL),
+      m_pDocument(nullptr),
+      m_pAnnotDict(nullptr),
+      m_pDefaultFont(nullptr),
       m_sAPType("N") {
   CPDF_Page* pPage = pAnnot->GetPDFPage();
 
@@ -31,7 +31,7 @@
 
 void CBA_FontMap::Reset() {
   Empty();
-  m_pDefaultFont = NULL;
+  m_pDefaultFont = nullptr;
   m_sDefaultFontName = "";
 }
 
@@ -83,20 +83,20 @@
     CPDF_Document* pDocument = GetDocument();
     CPDF_Dictionary* pRootDict = pDocument->GetRoot();
     if (!pRootDict)
-      return NULL;
+      return nullptr;
 
     CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm");
     if (!pAcroFormDict)
-      return NULL;
+      return nullptr;
 
     CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR");
     if (!pDRDict)
-      return NULL;
+      return nullptr;
 
     return FindResFontSameCharset(pDRDict, sFontAlias, nCharset);
   }
 
-  return NULL;
+  return nullptr;
 }
 
 CPDF_Document* CBA_FontMap::GetDocument() {
@@ -107,14 +107,14 @@
                                                CFX_ByteString& sFontAlias,
                                                int32_t nCharset) {
   if (!pResDict)
-    return NULL;
+    return nullptr;
 
   CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font");
   if (!pFonts)
-    return NULL;
+    return nullptr;
 
   CPDF_Document* pDocument = GetDocument();
-  CPDF_Font* pFind = NULL;
+  CPDF_Font* pFind = nullptr;
   for (const auto& it : *pFonts) {
     const CFX_ByteString& csKey = it.first;
     CPDF_Object* pObj = it.second;
@@ -165,7 +165,7 @@
 
   CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType);
   if (!pStream) {
-    pStream = new CPDF_Stream(NULL, 0, NULL);
+    pStream = new CPDF_Stream(nullptr, 0, nullptr);
     int32_t objnum = m_pDocument->AddIndirectObject(pStream);
     pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum);
   }
@@ -174,7 +174,7 @@
 
   if (!pStreamDict) {
     pStreamDict = new CPDF_Dictionary;
-    pStream->InitStream(NULL, 0, pStreamDict);
+    pStream->InitStream(nullptr, 0, pStreamDict);
   }
 
   if (pStreamDict) {
@@ -199,7 +199,7 @@
 }
 
 CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
-  CPDF_Dictionary* pAcroFormDict = NULL;
+  CPDF_Dictionary* pAcroFormDict = nullptr;
   const bool bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget");
   if (bWidget) {
     if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot())
@@ -218,7 +218,7 @@
     }
   }
 
-  CPDF_Dictionary* pFontDict = NULL;
+  CPDF_Dictionary* pFontDict = nullptr;
 
   if (!sDA.IsEmpty()) {
     CPDF_SimpleParser syntax(sDA.AsStringC());
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 8b2da62..d489a24 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -14,7 +14,7 @@
 #include "fpdfsdk/pdfwindow/PWL_ComboBox.h"
 
 CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
-    : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) {
+    : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(nullptr) {
   m_State.nIndex = 0;
   m_State.nStart = 0;
   m_State.nEnd = 0;
@@ -227,7 +227,7 @@
 
   DestroyPDFWindow(pPageView);
 
-  CPWL_Wnd* pRet = NULL;
+  CPWL_Wnd* pRet = nullptr;
 
   if (bRestoreValue) {
     RestoreState(pPageView);
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 8ee6da3..d7bc958 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -88,7 +88,8 @@
   } else {
     CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
     if (CFFL_IFormFiller::IsVisible(pWidget))
-      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal,
+                              nullptr);
   }
 }
 
@@ -98,7 +99,7 @@
                                      CFX_Matrix* pUser2Device,
                                      uint32_t dwFlags) {
   CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
-  pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+  pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
 }
 
 void CFFL_FormFiller::OnCreate(CPDFSDK_Annot* pAnnot) {}
@@ -293,7 +294,7 @@
   ASSERT(m_pApp);
 
   PWL_CREATEPARAM cp;
-  cp.pParentWnd = NULL;
+  cp.pParentWnd = nullptr;
   cp.pProvider = this;
   cp.rcRectWnd = GetPDFWindowRect();
 
@@ -690,23 +691,25 @@
   CPDF_FormControl::HighlightingMode eHM = pCtrl->GetHighlightingMode();
 
   if (eHM != CPDF_FormControl::Push) {
-    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
     return;
   }
 
   if (m_bMouseDown) {
     if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down))
-      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, NULL);
+      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, nullptr);
     else
-      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal,
+                              nullptr);
   } else if (m_bMouseIn) {
     if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover))
       pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Rollover,
-                              NULL);
+                              nullptr);
     else
-      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal,
+                              nullptr);
   } else {
-    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
   }
 }
 
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp
index 9dcc734..107197f 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp
@@ -97,7 +97,7 @@
     pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, pUser2Device,
                                 dwFlags);
   } else {
-    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
+    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
   }
 
   if (!IsReadOnly(pWidget) && IsFillingAllowed(pWidget))
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index dc4f07d..cbac83c 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -16,7 +16,7 @@
 #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f
 
 CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget)
-    : CFFL_FormFiller(pApp, pWidget), m_pFontMap(NULL) {}
+    : CFFL_FormFiller(pApp, pWidget), m_pFontMap(nullptr) {}
 
 CFFL_ListBox::~CFFL_ListBox() {
   delete m_pFontMap;
@@ -193,7 +193,7 @@
 
   DestroyPDFWindow(pPageView);
 
-  CPWL_Wnd* pRet = NULL;
+  CPWL_Wnd* pRet = nullptr;
 
   if (bRestoreValue) {
     RestoreState(pPageView);
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 7399651..be1f36b 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -11,7 +11,7 @@
 #include "fpdfsdk/include/fsdk_mgr.h"
 
 CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
-    : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) {
+    : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(nullptr) {
   m_State.nStart = m_State.nEnd = 0;
 }
 
@@ -30,9 +30,6 @@
     cp.dwFlags |= PES_PASSWORD;
   }
 
-  if (!(nFlags & FIELDFLAG_DONOTSPELLCHECK)) {
-  }
-
   if (nFlags & FIELDFLAG_MULTILINE) {
     cp.dwFlags |= PES_MULTILINE | PES_AUTORETURN | PES_TOP;
 
@@ -244,7 +241,7 @@
 
   DestroyPDFWindow(pPageView);
 
-  CPWL_Wnd* pRet = NULL;
+  CPWL_Wnd* pRet = nullptr;
 
   if (bRestoreValue) {
     RestoreState(pPageView);