From 5cc24654fb345189140acb4711ff981e1c720951 Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 26 Apr 2016 11:46:02 -0700 Subject: Clean up CPDF_Page. - Merge CPDF_Page::Load() into ctor. - Remove always nullptr param for CPDF_Page::ParseContent(). - Remove unneeded indirection in IPDF_RenderModule. - Delete CPDF_ParseOptions. - Fix up CPDF_Pattern. Review URL: https://codereview.chromium.org/1918113002 --- fpdfsdk/fpdfxfa/fpdfxfa_page.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp index 8c0d6bbf98..22c8f995f2 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp @@ -46,9 +46,8 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage() { return FALSE; if (!m_pPDFPage || m_pPDFPage->m_pFormDict != pDict) { - m_pPDFPage.reset(new CPDF_Page); - m_pPDFPage->Load(pPDFDoc, pDict); - m_pPDFPage->ParseContent(nullptr); + m_pPDFPage.reset(new CPDF_Page(pPDFDoc, pDict, true)); + m_pPDFPage->ParseContent(); } return TRUE; } @@ -95,9 +94,8 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) { if (!m_pDocument || m_iPageIndex < 0 || !pageDict) return FALSE; - m_pPDFPage.reset(new CPDF_Page()); - m_pPDFPage->Load(m_pDocument->GetPDFDoc(), pageDict); - m_pPDFPage->ParseContent(nullptr); + m_pPDFPage.reset(new CPDF_Page(m_pDocument->GetPDFDoc(), pageDict, true)); + m_pPDFPage->ParseContent(); return TRUE; } -- cgit v1.2.3