summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp3
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp2
-rw-r--r--fpdfsdk/src/fpdfview.cpp2
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp4
-rw-r--r--fpdfsdk/src/javascript/Document.cpp12
5 files changed, 8 insertions, 15 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 50d5036724..c81955d6ca 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -40,10 +40,9 @@ FX_BOOL GetContentsRect(CPDF_Document* pDoc,
CPDF_RectArray* pRectArray) {
CPDF_Page* pPDFPage = new CPDF_Page;
pPDFPage->Load(pDoc, pDict, FALSE);
- pPDFPage->ParseContent();
+ pPDFPage->ParseContent(nullptr);
FX_POSITION pos = pPDFPage->GetFirstObjectPosition();
-
while (pos) {
CPDF_PageObject* pPageObject = pPDFPage->GetNextObject(pos);
if (!pPageObject)
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index 650b626ddf..9149261018 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -91,7 +91,7 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
#else // PDF_ENABLE_XFA
CPDF_Page* pPage = new CPDF_Page;
pPage->Load(pDoc, pPageDict);
- pPage->ParseContent();
+ pPage->ParseContent(nullptr);
#endif // PDF_ENABLE_XFA
return pPage;
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index a6c14206ce..a4f345ef02 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -493,7 +493,7 @@ DLLEXPORT FPDF_PAGE STDCALL FPDF_LoadPage(FPDF_DOCUMENT document,
return NULL;
CPDF_Page* pPage = new CPDF_Page;
pPage->Load(pDoc, pDict);
- pPage->ParseContent();
+ pPage->ParseContent(nullptr);
return pPage;
#endif // PDF_ENABLE_XFA
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
index dec9e959d0..edd25c7612 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
@@ -53,7 +53,7 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage() {
m_pPDFPage = new CPDF_Page;
m_pPDFPage->Load(pPDFDoc, pDict);
- m_pPDFPage->ParseContent();
+ m_pPDFPage->ParseContent(nullptr);
return TRUE;
}
@@ -112,7 +112,7 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) {
m_pPDFPage = new CPDF_Page();
m_pPDFPage->Load(m_pDocument->GetPDFDoc(), pageDict);
- m_pPDFPage->ParseContent();
+ m_pPDFPage->ParseContent(nullptr);
return TRUE;
}
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 1040c34770..ab733375ee 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -1378,8 +1378,7 @@ FX_BOOL Document::getPageNthWord(IJS_Context* cc,
CPDF_Page page;
page.Load(pDocument, pPageDict);
- page.StartParse();
- page.ParseContent();
+ page.ParseContent(nullptr);
FX_POSITION pos = page.GetFirstObjectPosition();
@@ -1429,7 +1428,6 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
return FALSE;
int nPageNo = params.size() > 0 ? params[0].ToInt() : 0;
-
CPDF_Document* pDocument = m_pDocument->GetPDFDocument();
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
if (nPageNo < 0 || nPageNo >= pDocument->GetPageCount()) {
@@ -1443,13 +1441,10 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
CPDF_Page page;
page.Load(pDocument, pPageDict);
- page.StartParse();
- page.ParseContent();
-
- FX_POSITION pos = page.GetFirstObjectPosition();
+ page.ParseContent(nullptr);
int nWords = 0;
-
+ FX_POSITION pos = page.GetFirstObjectPosition();
while (pos) {
if (CPDF_PageObject* pPageObj = page.GetNextObject(pos)) {
if (pPageObj->m_Type == PDFPAGE_TEXT) {
@@ -1460,7 +1455,6 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
}
vRet = nWords;
-
return TRUE;
}