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

Unified Diff: fpdfsdk/javascript/Document.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/fpdfxfa/fpdfxfa_page.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/Document.cpp
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index fa2f7ae4e40094a37f12106f6b069b26443d1884..12d8c2df31ac372b212d80a4260fae63234e128b 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -1348,9 +1348,8 @@ FX_BOOL Document::getPageNthWord(IJS_Context* cc,
if (!pPageDict)
return FALSE;
- CPDF_Page page;
- page.Load(pDocument, pPageDict);
- page.ParseContent(nullptr);
+ CPDF_Page page(pDocument, pPageDict, true);
+ page.ParseContent();
int nWords = 0;
CFX_WideString swRet;
@@ -1404,9 +1403,8 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
if (!pPageDict)
return FALSE;
- CPDF_Page page;
- page.Load(pDocument, pPageDict);
- page.ParseContent(nullptr);
+ CPDF_Page page(pDocument, pPageDict, true);
+ page.ParseContent();
int nWords = 0;
for (auto& pPageObj : *page.GetPageObjectList()) {
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_page.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698