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