diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-11 13:53:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-11 13:53:37 -0700 |
commit | 655fccab2f80af3a0e160116f30796e2da77f919 (patch) | |
tree | 3a3deca393d683d5a567b5e72bcdf2115c74080a /fpdfsdk/fpdfxfa/cpdfxfa_document.cpp | |
parent | ab36e73c8c5409fa262d4fa2faffe65c8804a792 (diff) | |
download | pdfium-655fccab2f80af3a0e160116f30796e2da77f919.tar.xz |
Convert CPDFXFA_Document to use CPDFSDK_FormFillEnvironment
This CL removes the use of CPDFSDK_Document from CPDFXFA_Document.
Review-Url: https://codereview.chromium.org/2396213002
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_document.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_document.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp index 90a762ddf3..472779a6d4 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp @@ -33,7 +33,7 @@ CPDFXFA_Document::CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, CPDFXFA_App* pProvider) : m_iDocType(DOCTYPE_PDF), m_pPDFDoc(std::move(pPDFDoc)), - m_pSDKDoc(nullptr), + m_pFormFillEnv(nullptr), m_pXFADocView(nullptr), m_pApp(pProvider), m_nLoadStatus(FXFA_LOADSTATUS_PRELOAD), @@ -43,12 +43,12 @@ CPDFXFA_Document::CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, CPDFXFA_Document::~CPDFXFA_Document() { m_nLoadStatus = FXFA_LOADSTATUS_CLOSING; - if (m_pSDKDoc) { - m_pSDKDoc->ClearAllFocusedAnnots(); + if (m_pFormFillEnv) { + m_pFormFillEnv->GetSDKDocument()->ClearAllFocusedAnnots(); // Once we're deleted the SDKDocument will point at a bad underlying // doc so we need to reset it ... - m_pSDKDoc->ResetXFADocument(); - m_pSDKDoc = nullptr; + m_pFormFillEnv->GetSDKDocument()->ResetXFADocument(); + m_pFormFillEnv = nullptr; } if (m_pXFADoc) { @@ -201,6 +201,6 @@ void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) { } void CPDFXFA_Document::ClearChangeMark() { - if (m_pSDKDoc) - m_pSDKDoc->ClearChangeMark(); + if (m_pFormFillEnv) + m_pFormFillEnv->GetSDKDocument()->ClearChangeMark(); } |