diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-05-08 13:40:20 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-08 13:40:20 +0000 |
commit | 967aa0793c0b0cf2722ec8720e9d797266a9fde7 (patch) | |
tree | 46c32ab1adcadd770261093d6bb57e2e1886bf32 /fpdfsdk | |
parent | e5c0fa97c2da104426dbc1cecfc0ed488a22efe5 (diff) | |
download | pdfium-967aa0793c0b0cf2722ec8720e9d797266a9fde7.tar.xz |
Rename CPDF_Document::GetPage() to GetPageDictionary().
Avoids a conflict should we wish to have the document actually
track pages, with a GetPage() that returns CPDF_Page.
Do the same thing to CPDF_DataAvail along the way.
Add some missing consts as well.
Change-Id: I2cb2213cc4c0649662fceab80407ee4a3f4cf30e
Reviewed-on: https://pdfium-review.googlesource.com/32158
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdf_ppo.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index 5ebf683b36..4f11babbbe 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -176,7 +176,7 @@ int CPDFSDK_InterForm::GetPageIndexByAnnotDict( ASSERT(pAnnotDict); for (int i = 0, sz = pDocument->GetPageCount(); i < sz; i++) { - if (CPDF_Dictionary* pPageDict = pDocument->GetPage(i)) { + if (CPDF_Dictionary* pPageDict = pDocument->GetPageDictionary(i)) { if (CPDF_Array* pAnnots = pPageDict->GetArrayFor("Annots")) { for (int j = 0, jsz = pAnnots->GetCount(); j < jsz; j++) { CPDF_Object* pDict = pAnnots->GetDirectObjectAt(j); diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp index 0847113f86..c3b6402a97 100644 --- a/fpdfsdk/fpdf_ppo.cpp +++ b/fpdfsdk/fpdf_ppo.cpp @@ -466,7 +466,7 @@ bool CPDF_PageExporter::ExportPage(const std::vector<uint32_t>& pageNums, auto pObjNumberMap = pdfium::MakeUnique<ObjectNumberMap>(); for (size_t i = 0; i < pageNums.size(); ++i) { CPDF_Dictionary* pDestPageDict = dest()->CreateNewPage(curpage); - const CPDF_Dictionary* pSrcPageDict = src()->GetPage(pageNums[i] - 1); + auto* pSrcPageDict = src()->GetPageDictionary(pageNums[i] - 1); if (!pSrcPageDict || !pDestPageDict) return false; @@ -614,7 +614,7 @@ bool CPDF_NPageToOneExporter::ExportNPagesToOne( // Mapping of XObject name and XObject object number of one page. XObjectNameNumberMap xObjNameNumberMap; for (size_t innerPage = outerPage; innerPage < innerPageMax; ++innerPage) { - CPDF_Dictionary* pSrcPageDict = src()->GetPage(pageNums[innerPage] - 1); + auto* pSrcPageDict = src()->GetPageDictionary(pageNums[innerPage] - 1); if (!pSrcPageDict) return false; diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 919690f9eb..f5eea66125 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -351,7 +351,7 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document, // Eventually, fallthrough into non-xfa case once page type made consistent. return nullptr; #else // PDF_ENABLE_XFA - CPDF_Dictionary* pDict = pDoc->GetPage(page_index); + CPDF_Dictionary* pDict = pDoc->GetPageDictionary(page_index); if (!pDict) return nullptr; @@ -966,7 +966,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, } #endif // PDF_ENABLE_XFA - CPDF_Dictionary* pDict = pDoc->GetPage(page_index); + CPDF_Dictionary* pDict = pDoc->GetPageDictionary(page_index); if (!pDict) return false; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index f1d7aa9ad3..9fe63f435f 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -22,7 +22,7 @@ CPDFXFA_Page::CPDFXFA_Page(CPDFXFA_Context* pContext, int page_index) CPDF_Document* pPDFDoc = m_pContext->GetPDFDoc(); CPDF_Dictionary* pDict = nullptr; if (pPDFDoc && m_pContext->GetFormType() != FormType::kXFAFull) - pDict = pPDFDoc->GetPage(m_iPageIndex); + pDict = pPDFDoc->GetPageDictionary(m_iPageIndex); m_pPDFPage = pdfium::MakeUnique<CPDF_Page>(pPDFDoc, pDict, true); m_pPDFPage->SetPageExtension(this); } |