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; |