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

Unified Diff: fpdfsdk/cpdfsdk_widgethandler.cpp

Issue 2412523002: Cleanup env variable names (Closed)
Patch Set: Cleanup 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
Index: fpdfsdk/cpdfsdk_widgethandler.cpp
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index b6088475f6770dad92b1fdad4910996613eddc2e..d5d4b39b44dfa1e175f71f17c1f2399cb4c4a040 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -23,8 +23,9 @@
#include "fpdfsdk/fpdfxfa/cpdfxfa_document.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFSDK_FormFillEnvironment* pEnv)
- : m_pEnv(pEnv), m_pFormFiller(nullptr) {}
+CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(
+ CPDFSDK_FormFillEnvironment* pFormFillEnv)
+ : m_pFormFillEnv(pFormFillEnv), m_pFormFiller(nullptr) {}
CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {}
@@ -53,7 +54,7 @@ FX_BOOL CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
CPDFSDK_Annot* CPDFSDK_WidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPage) {
- CPDFSDK_InterForm* pInterForm = m_pEnv->GetSDKDocument()->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pFormFillEnv->GetInterForm();
CPDF_FormControl* pCtrl = CPDFSDK_Widget::GetFormControl(
pInterForm->GetInterForm(), pAnnot->GetAnnotDict());
if (!pCtrl)
@@ -249,8 +250,7 @@ void CPDFSDK_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {
#ifdef PDF_ENABLE_XFA
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
- CPDFXFA_Document* pDoc =
- pPageView->GetFormFillEnv()->GetSDKDocument()->GetXFADocument();
+ CPDFXFA_Document* pDoc = pPageView->GetFormFillEnv()->GetXFADocument();
if (pDoc->GetDocType() == DOCTYPE_STATIC_XFA) {
if (!pWidget->IsAppearanceValid() && !pWidget->GetValue().IsEmpty())
pWidget->ResetAppearance(FALSE);

Powered by Google App Engine
This is Rietveld 408576698