summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
index f4120896a8..4d7e3bc222 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
@@ -34,9 +34,10 @@ bool CPDFXFA_Page::LoadPDFPage() {
if (!pDict)
return false;
- if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict)
- m_pPDFPage = pPDFDoc->GetOrCreatePDFPage(pDict);
-
+ if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) {
+ m_pPDFPage = pdfium::MakeRetain<CPDF_Page>(pPDFDoc, pDict, true);
+ m_pPDFPage->ParseContent();
+ }
return true;
}
@@ -79,7 +80,9 @@ bool CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) {
if (!m_pContext || m_iPageIndex < 0 || !pageDict)
return false;
- m_pPDFPage = m_pContext->GetPDFDoc()->GetOrCreatePDFPage(pageDict);
+ m_pPDFPage =
+ pdfium::MakeRetain<CPDF_Page>(m_pContext->GetPDFDoc(), pageDict, true);
+ m_pPDFPage->ParseContent();
return true;
}