Remove parameter from CFFL_FormFiller::GetCurPageView().

Every caller passes in true for the boolean parameter expect one. Remove
the parameter and write out the short GetCurPageView() implementation in
the one place that passes in false.

Change-Id: Id36e56f63449cec15fe247f203735a2626e501ef
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 642471a..903a9a5 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -215,7 +215,7 @@
   if (index < 0 || index >= m_pWidget->CountOptions())
     return false;
 
-  CPWL_ComboBox* pWnd = GetComboBox(GetCurPageView(true), false);
+  CPWL_ComboBox* pWnd = GetComboBox(GetCurPageView(), false);
   if (!pWnd)
     return false;
 
@@ -230,7 +230,7 @@
   if (index < 0 || index >= m_pWidget->CountOptions())
     return false;
 
-  CPWL_ComboBox* pWnd = GetComboBox(GetCurPageView(true), false);
+  CPWL_ComboBox* pWnd = GetComboBox(GetCurPageView(), false);
   return pWnd && index == pWnd->GetSelect();
 }
 
@@ -259,7 +259,7 @@
 WideString CFFL_ComboBox::GetSelectExportText() {
   WideString swRet;
 
-  CPWL_ComboBox* pComboBox = GetComboBox(GetCurPageView(true), false);
+  CPWL_ComboBox* pComboBox = GetComboBox(GetCurPageView(), false);
   int nExport = pComboBox ? pComboBox->GetSelect() : -1;
 
   if (nExport >= 0) {
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 2e14dad..2d9ffda 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -164,7 +164,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->OnKeyDown(nKeyCode, nFlags);
 }
 
@@ -174,7 +174,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->OnChar(nChar, nFlags);
 }
 
@@ -190,7 +190,7 @@
   if (!IsValid())
     return WideString();
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd ? pWnd->GetText() : WideString();
 }
 
@@ -198,7 +198,7 @@
   if (!IsValid())
     return WideString();
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd ? pWnd->GetSelectedText() : WideString();
 }
 
@@ -206,7 +206,7 @@
   if (!IsValid())
     return;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   if (!pWnd)
     return;
 
@@ -217,7 +217,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->CanUndo();
 }
 
@@ -225,7 +225,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->CanRedo();
 }
 
@@ -233,7 +233,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->Undo();
 }
 
@@ -241,7 +241,7 @@
   if (!IsValid())
     return false;
 
-  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(true), false);
+  CPWL_Wnd* pWnd = GetPWLWindow(GetCurPageView(), false);
   return pWnd && pWnd->Redo();
 }
 
@@ -260,7 +260,8 @@
   if (!IsValid())
     return;
 
-  CPDFSDK_PageView* pPageView = GetCurPageView(false);
+  CPDFSDK_PageView* pPageView =
+      m_pFormFillEnv->GetPageView(m_pWidget->GetPage(), false);
   if (!pPageView || !CommitData(pPageView, nFlag))
     return;
   if (CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false))
@@ -416,9 +417,9 @@
   return CFX_FloatRect(0, 0, fWidth, fHeight);
 }
 
-CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) {
+CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() {
   IPDF_Page* pPage = m_pWidget->GetPage();
-  return m_pFormFillEnv->GetPageView(pPage, renew);
+  return m_pFormFillEnv->GetPageView(pPage, true);
 }
 
 CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index d079f8e..ce43bbd 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -129,7 +129,7 @@
   bool IsValid() const;
   CFX_FloatRect GetPDFAnnotRect() const;
 
-  CPDFSDK_PageView* GetCurPageView(bool renew);
+  CPDFSDK_PageView* GetCurPageView();
   void SetChangeMark();
 
   CPDFSDK_Annot* GetSDKAnnot() const { return m_pWidget.Get(); }
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 3d80255..b8339a2 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -197,7 +197,7 @@
   if (index < 0 || index >= m_pWidget->CountOptions())
     return false;
 
-  CPWL_ListBox* pListBox = GetListBox(GetCurPageView(true));
+  CPWL_ListBox* pListBox = GetListBox(GetCurPageView());
   if (!pListBox)
     return false;
 
@@ -219,7 +219,7 @@
   if (index < 0 || index >= m_pWidget->CountOptions())
     return false;
 
-  CPWL_ListBox* pListBox = GetListBox(GetCurPageView(true));
+  CPWL_ListBox* pListBox = GetListBox(GetCurPageView());
   return pListBox && pListBox->IsItemSelected(index);
 }
 
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index c3cd365..9756575 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -111,7 +111,7 @@
       if (m_pWidget->GetFieldFlags() & pdfium::form_flags::kTextMultiline)
         break;
 
-      CPDFSDK_PageView* pPageView = GetCurPageView(true);
+      CPDFSDK_PageView* pPageView = GetCurPageView();
       ASSERT(pPageView);
       m_bValid = !m_bValid;
       m_pFormFillEnv->Invalidate(pAnnot->GetPage(),
@@ -130,7 +130,7 @@
       return true;
     }
     case FWL_VKEY_Escape: {
-      CPDFSDK_PageView* pPageView = GetCurPageView(true);
+      CPDFSDK_PageView* pPageView = GetCurPageView();
       ASSERT(pPageView);
       EscapeFiller(pPageView, true);
       return true;