Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: fpdfsdk/fpdfxfa/cpdfxfa_document.cpp

Issue 2396213002: Convert CPDFXFA_Document to use CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Review fixes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/cpdfxfa_document.cpp
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp
index 90a762ddf3f0b4759c60e4449badcec683f2ceae..472779a6d4aebeb6482b4d7c57449068630179c8 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();
}
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698