Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: fpdfsdk/fpdfview.cpp

Issue 1918113002: Clean up CPDF_Page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: more Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfview.cpp
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index dec1059e1ab3aa04bce4e424b62c08079d28305b..2283e941a92e96ae3f2b136553a47867dfa80cda 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
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698