diff options
author | thestig <thestig@chromium.org> | 2016-04-26 11:46:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 11:46:02 -0700 |
commit | 5cc24654fb345189140acb4711ff981e1c720951 (patch) | |
tree | 1e9e11a9136363e2b330ffbbce6fdf9e3827b5b1 /fpdfsdk/javascript | |
parent | 76c53794b6202ec37f6dcace5f2ae86870e953b6 (diff) | |
download | pdfium-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/javascript')
-rw-r--r-- | fpdfsdk/javascript/Document.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index fa2f7ae4e4..12d8c2df31 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()) { |