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

Unified Diff: fpdfsdk/fpdfformfill.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 | « no previous file | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfformfill.cpp
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index 184f7ca3416246b132976d8ef709202603b265d8..8146e1df42bb8ee50e2fd04ca0259fea30b7639e 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -253,15 +253,15 @@ FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document,
// If the CPDFXFA_Document has a SDKDocument already then we've done this
// and can just return the old Env. Otherwise, we'll end up setting a new
// SDKDocument into the XFADocument and, that could get weird.
- if (pDocument->GetSDKDoc())
- return pDocument->GetSDKDoc()->GetEnv();
+ if (pDocument->GetFormFillEnv())
+ return pDocument->GetFormFillEnv();
#endif
CPDFSDK_FormFillEnvironment* pFormFillEnv =
new CPDFSDK_FormFillEnvironment(pDocument, formInfo);
#ifdef PDF_ENABLE_XFA
- pDocument->SetSDKDoc(pFormFillEnv->GetSDKDocument());
+ pDocument->SetFormFillEnv(pFormFillEnv);
CPDFXFA_App::GetInstance()->AddFormFillEnv(pFormFillEnv);
#endif // PDF_ENABLE_XFA
@@ -285,7 +285,7 @@ FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle) {
// If the document was closed first, it's possible the XFA document
// is now a nullptr.
if (pFormFillEnv->GetSDKDocument()->GetXFADocument())
- pFormFillEnv->GetSDKDocument()->GetXFADocument()->SetSDKDoc(nullptr);
+ pFormFillEnv->GetSDKDocument()->GetXFADocument()->SetFormFillEnv(nullptr);
#endif // PDF_ENABLE_XFA
delete pFormFillEnv;
« no previous file with comments | « no previous file | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698