summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-26 11:46:02 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-26 11:46:02 -0700
commit5cc24654fb345189140acb4711ff981e1c720951 (patch)
tree1e9e11a9136363e2b330ffbbce6fdf9e3827b5b1 /fpdfsdk/fpdfview.cpp
parent76c53794b6202ec37f6dcace5f2ae86870e953b6 (diff)
downloadpdfium-5cc24654fb345189140acb4711ff981e1c720951.tar.xz
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
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index dec1059e1a..2283e941a9 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -502,10 +502,10 @@ DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document,
#else // PDF_ENABLE_XFA
CPDF_Dictionary* pDict = pDoc->GetPage(page_index);
if (!pDict)
- return NULL;
- CPDF_Page* pPage = new CPDF_Page;
- pPage->Load(pDoc, pDict);
- pPage->ParseContent(nullptr);
+ return nullptr;
+
+ CPDF_Page* pPage = new CPDF_Page(pDoc, pDict, true);
+ pPage->ParseContent();
return pPage;
#endif // PDF_ENABLE_XFA
}
@@ -958,8 +958,8 @@ DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document,
CPDF_Dictionary* pDict = pDoc->GetPage(page_index);
if (!pDict)
return FALSE;
- CPDF_Page page;
- page.Load(pDoc, pDict);
+
+ CPDF_Page page(pDoc, pDict, true);
*width = page.GetPageWidth();
*height = page.GetPageHeight();
#endif // PDF_ENABLE_XFA