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

Unified Diff: fpdfsdk/cpdfsdk_xfawidgethandler.cpp

Issue 2400473002: Start proxying CPDFSDK_Document methods through CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Rebase to master 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/cpdfsdk_xfawidgethandler.h ('k') | fpdfsdk/formfiller/cffl_interactiveformfiller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_xfawidgethandler.cpp
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index 17d80cc544c48961ab35ddd30ba7a1dfed830b36..d4a559ab38f1f4a85deb02c59ec366e279e2a5b0 100644
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -23,8 +23,8 @@
#include "xfa/fxgraphics/cfx_graphics.h"
CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(
- CPDFSDK_FormFillEnvironment* pEnv)
- : m_pEnv(pEnv) {}
+ CPDFSDK_FormFillEnvironment* pFormFillEnv)
+ : m_pFormFillEnv(pFormFillEnv) {}
CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {}
@@ -39,8 +39,7 @@ CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot,
CPDFSDK_PageView* pPage) {
- CPDFSDK_Document* pSDKDoc = m_pEnv->GetSDKDocument();
- CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pFormFillEnv->GetInterForm();
CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm);
pInterForm->AddXFAMap(pAnnot, pWidget);
return pWidget;
@@ -54,7 +53,7 @@ void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
ASSERT(pAnnot);
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument();
+ CPDFSDK_Document* pSDKDoc = pPageView->GetFormFillEnv()->GetSDKDocument();
CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot);
CFX_Graphics gs;
@@ -117,11 +116,11 @@ FX_BOOL CPDFSDK_XFAWidgetHandler::HitTest(CPDFSDK_PageView* pPageView,
if (!pPageView || !pAnnot)
return FALSE;
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument();
- if (!pSDKDoc)
+ CPDFSDK_FormFillEnvironment* pFormFillEnv = pPageView->GetFormFillEnv();
+ if (!pFormFillEnv)
return FALSE;
- CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
+ CPDFXFA_Document* pDoc = pFormFillEnv->GetXFADocument();
if (!pDoc)
return FALSE;
@@ -346,11 +345,11 @@ CXFA_FFWidgetHandler* CPDFSDK_XFAWidgetHandler::GetXFAWidgetHandler(
if (!pPageView)
return nullptr;
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument();
- if (!pSDKDoc)
+ CPDFSDK_FormFillEnvironment* pFormFillEnv = pPageView->GetFormFillEnv();
+ if (!pFormFillEnv)
return nullptr;
- CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument();
+ CPDFXFA_Document* pDoc = pFormFillEnv->GetXFADocument();
if (!pDoc)
return nullptr;
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidgethandler.h ('k') | fpdfsdk/formfiller/cffl_interactiveformfiller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698