Rename CPDF_PageObjectHolder::GetFormDict() to GetDict().

Renamed the underlying member m_pFormDict as well.

These names are misleading, as a page also uses the same field as
the page dict.

Change-Id: I52e0f1864a917a1e1b863725cb0d4f22faecacb3
Reviewed-on: https://pdfium-review.googlesource.com/34450
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_annotiterator.cpp b/fpdfsdk/cpdfsdk_annotiterator.cpp
index fbba3d5..0dcb5bd 100644
--- a/fpdfsdk/cpdfsdk_annotiterator.cpp
+++ b/fpdfsdk/cpdfsdk_annotiterator.cpp
@@ -34,7 +34,7 @@
       m_pPageView(pPageView),
       m_nAnnotSubtype(nAnnotSubtype) {
   CPDF_Page* pPDFPage = m_pPageView->GetPDFPage();
-  ByteString sTabs = pPDFPage->GetFormDict()->GetStringFor("Tabs");
+  ByteString sTabs = pPDFPage->GetDict()->GetStringFor("Tabs");
   if (sTabs == "R")
     m_eTabOrder = ROW;
   else if (sTabs == "C")
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index 43f8ee0..74802a8 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -558,7 +558,7 @@
 }
 
 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const {
-  const CPDF_Dictionary* pDict = GetPDFPage()->GetFormDict();
+  const CPDF_Dictionary* pDict = GetPDFPage()->GetDict();
   CPDF_Document* pDoc = m_pFormFillEnv->GetPDFDocument();
   return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1;
 }
diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp
index 1fa71f2..070a7fd 100644
--- a/fpdfsdk/fpdf_annot.cpp
+++ b/fpdfsdk/fpdf_annot.cpp
@@ -229,9 +229,9 @@
   auto pNewAnnot =
       pdfium::MakeUnique<CPDF_AnnotContext>(pDict.get(), pPage, nullptr);
 
-  CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnotList)
-    pAnnotList = pPage->GetFormDict()->SetNewFor<CPDF_Array>("Annots");
+    pAnnotList = pPage->GetDict()->SetNewFor<CPDF_Array>("Annots");
   pAnnotList->Add(std::move(pDict));
 
   // Caller takes ownership.
@@ -240,20 +240,20 @@
 
 FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page) {
   CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
-  if (!pPage || !pPage->GetFormDict())
+  if (!pPage || !pPage->GetDict())
     return 0;
 
-  CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots");
   return pAnnots ? pAnnots->GetCount() : 0;
 }
 
 FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page,
                                                             int index) {
   CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
-  if (!pPage || !pPage->GetFormDict() || index < 0)
+  if (!pPage || !pPage->GetDict() || index < 0)
     return nullptr;
 
-  CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnots || static_cast<size_t>(index) >= pAnnots->GetCount())
     return nullptr;
 
@@ -268,10 +268,10 @@
                                                      FPDF_ANNOTATION annot) {
   CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
   CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot);
-  if (!pPage || !pPage->GetFormDict() || !pAnnot || !pAnnot->GetAnnotDict())
+  if (!pPage || !pPage->GetDict() || !pAnnot || !pAnnot->GetAnnotDict())
     return -1;
 
-  CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnots)
     return -1;
 
@@ -295,10 +295,10 @@
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_RemoveAnnot(FPDF_PAGE page,
                                                          int index) {
   CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
-  if (!pPage || !pPage->GetFormDict() || index < 0)
+  if (!pPage || !pPage->GetDict() || index < 0)
     return false;
 
-  CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnots || static_cast<size_t>(index) >= pAnnots->GetCount())
     return false;
 
diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp
index 6b62227..465b113 100644
--- a/fpdfsdk/fpdf_doc.cpp
+++ b/fpdfsdk/fpdf_doc.cpp
@@ -339,9 +339,9 @@
   if (!start_pos || !link_annot)
     return false;
   CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
-  if (!pPage || !pPage->GetFormDict())
+  if (!pPage || !pPage->GetDict())
     return false;
-  CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots");
+  CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnots)
     return false;
   for (size_t i = *start_pos; i < pAnnots->GetCount(); i++) {
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 094349f..0a8a745 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -58,7 +58,7 @@
   if (!pPage)
     return false;
 
-  const CPDF_Dictionary* pFormDict = pPage->GetFormDict();
+  const CPDF_Dictionary* pFormDict = pPage->GetDict();
   if (!pFormDict || !pFormDict->KeyExist("Type"))
     return false;
 
@@ -492,7 +492,7 @@
     return;
 
   rotate %= 4;
-  pPage->GetFormDict()->SetNewFor<CPDF_Number>("Rotate", rotate * 90);
+  pPage->GetDict()->SetNewFor<CPDF_Number>("Rotate", rotate * 90);
 }
 
 FPDF_BOOL FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object,
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 720fa9f..d32c1f1 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -240,7 +240,7 @@
     return FLATTEN_FAIL;
 
   CPDF_Document* pDocument = pPage->GetDocument();
-  CPDF_Dictionary* pPageDict = pPage->GetFormDict();
+  CPDF_Dictionary* pPageDict = pPage->GetDict();
   if (!pDocument || !pPageDict)
     return FLATTEN_FAIL;
 
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index de2bf4d..ec26ef0 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -665,7 +665,7 @@
     return;
 
   CPDFSDK_ActionHandler* pActionHandler = pFormFillEnv->GetActionHandler();
-  CPDF_Dictionary* pPageDict = pPDFPage->GetFormDict();
+  CPDF_Dictionary* pPageDict = pPDFPage->GetDict();
   CPDF_AAction aa(pPageDict->GetDictFor("AA"));
   CPDF_AAction::AActionType type = aaType == FPDFPAGE_AACTION_OPEN
                                        ? CPDF_AAction::OpenPage
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 206a08e..fd8f1af 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -37,7 +37,7 @@
 
   // Caller takes onwership.
   return FPDFStructTreeFromCPDFStructTree(
-      CPDF_StructTree::LoadPage(pPage->GetDocument(), pPage->GetFormDict())
+      CPDF_StructTree::LoadPage(pPage->GetDocument(), pPage->GetDict())
           .release());
 }
 
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 9d541da..a3ba7ca 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -27,7 +27,7 @@
 void SetBoundingBox(CPDF_Page* page,
                     const ByteString& key,
                     const CFX_FloatRect& rect) {
-  page->GetFormDict()->SetRectFor(key, rect);
+  page->GetDict()->SetRectFor(key, rect);
 }
 
 bool GetBoundingBox(CPDF_Page* page,
@@ -36,7 +36,7 @@
                     float* bottom,
                     float* right,
                     float* top) {
-  CPDF_Array* pArray = page->GetFormDict()->GetArrayFor(key);
+  CPDF_Array* pArray = page->GetDict()->GetArrayFor(key);
   if (!pArray)
     return false;
 
@@ -121,7 +121,7 @@
                                   matrix->c, matrix->d, matrix->e, matrix->f);
   }
 
-  CPDF_Dictionary* pPageDict = pPage->GetFormDict();
+  CPDF_Dictionary* pPageDict = pPage->GetDict();
   CPDF_Object* pContentObj = GetPageContent(pPageDict);
   if (!pContentObj)
     return false;
@@ -264,7 +264,7 @@
   if (!pPage)
     return;
 
-  CPDF_Dictionary* pPageDict = pPage->GetFormDict();
+  CPDF_Dictionary* pPageDict = pPage->GetDict();
   CPDF_Object* pContentObj = GetPageContent(pPageDict);
   if (!pContentObj)
     return;
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
index 4d7e3bc..7e2deda 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
@@ -34,7 +34,7 @@
   if (!pDict)
     return false;
 
-  if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) {
+  if (!m_pPDFPage || m_pPDFPage->GetDict() != pDict) {
     m_pPDFPage = pdfium::MakeRetain<CPDF_Page>(pPDFDoc, pDict, true);
     m_pPDFPage->ParseContent();
   }