Chromium Code Reviews| Index: fpdfsdk/fpdfview.cpp |
| diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp |
| index dec1059e1ab3aa04bce4e424b62c08079d28305b..160523b0c8469d755e59eaa81a5c9587d3bc07c9 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 |
| } |
| @@ -957,9 +957,8 @@ DLLEXPORT int STDCALL FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document, |
| #else // PDF_ENABLE_XFA |
| CPDF_Dictionary* pDict = pDoc->GetPage(page_index); |
| if (!pDict) |
| - return FALSE; |
| - CPDF_Page page; |
| - page.Load(pDoc, pDict); |
| + return false; |
|
dsinclair
2016/04/26 02:42:26
Should this be FALSE for consistency?
nit: blank
Lei Zhang
2016/04/26 04:24:45
Whoops, reverted.
|
| + CPDF_Page page(pDoc, pDict, true); |
|
Lei Zhang
2016/04/26 01:22:21
This is the only instance that does not call Parse
|
| *width = page.GetPageWidth(); |
| *height = page.GetPageHeight(); |
| #endif // PDF_ENABLE_XFA |