summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.cpp4
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.h7
2 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
index 170f17ea7a..4d7e3bc222 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
@@ -35,7 +35,7 @@ bool CPDFXFA_Page::LoadPDFPage() {
return false;
if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) {
- m_pPDFPage = pdfium::MakeUnique<CPDF_Page>(pPDFDoc, pDict, true);
+ m_pPDFPage = pdfium::MakeRetain<CPDF_Page>(pPDFDoc, pDict, true);
m_pPDFPage->ParseContent();
}
return true;
@@ -81,7 +81,7 @@ bool CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) {
return false;
m_pPDFPage =
- pdfium::MakeUnique<CPDF_Page>(m_pContext->GetPDFDoc(), pageDict, true);
+ pdfium::MakeRetain<CPDF_Page>(m_pContext->GetPDFDoc(), pageDict, true);
m_pPDFPage->ParseContent();
return true;
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.h b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
index 4f4d6b0a22..2573b9cebd 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
@@ -29,11 +29,10 @@ class CPDFXFA_Page : public CPDF_Page::Extension {
bool LoadPage();
bool LoadPDFPage(CPDF_Dictionary* pageDict);
- // CPDF_Page::Extension:
- CPDF_Document::Extension* GetDocumentExtension() const override;
+ CPDF_Document::Extension* GetDocumentExtension() const;
int GetPageIndex() const { return m_iPageIndex; }
- CPDF_Page* GetPDFPage() const { return m_pPDFPage.get(); }
+ CPDF_Page* GetPDFPage() const { return m_pPDFPage.Get(); }
CXFA_FFPageView* GetXFAPageView() const { return m_pXFAPageView; }
void SetXFAPageView(CXFA_FFPageView* pPageView) {
@@ -61,7 +60,7 @@ class CPDFXFA_Page : public CPDF_Page::Extension {
bool LoadXFAPageView();
private:
- std::unique_ptr<CPDF_Page> m_pPDFPage;
+ RetainPtr<CPDF_Page> m_pPDFPage;
CXFA_FFPageView* m_pXFAPageView;
UnownedPtr<CPDFXFA_Context> const m_pContext;
const int m_iPageIndex;