Index: fpdfsdk/cpdfsdk_xfawidgethandler.cpp |
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp |
index 17d80cc544c48961ab35ddd30ba7a1dfed830b36..5d8feaafeaae9c510bfe9f65ee8ad99e254c0ce2 100644 |
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp |
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp |
@@ -54,9 +54,6 @@ void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, |
ASSERT(pPageView); |
ASSERT(pAnnot); |
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); |
- CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); |
- |
CFX_Graphics gs; |
gs.Create(pDevice); |
@@ -64,10 +61,11 @@ void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, |
mt = *pUser2Device; |
FX_BOOL bIsHighlight = FALSE; |
- if (pSDKDoc->GetFocusAnnot() != pAnnot) |
+ if (pPageView->GetFormFillEnv()->GetSDKDocument()->GetFocusAnnot() != pAnnot) |
bIsHighlight = TRUE; |
- pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight); |
+ GetXFAWidgetHandler(pAnnot)->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, |
+ bIsHighlight); |
// to do highlight and shadow |
} |
@@ -116,12 +114,11 @@ FX_BOOL CPDFSDK_XFAWidgetHandler::HitTest(CPDFSDK_PageView* pPageView, |
const CFX_FloatPoint& point) { |
if (!pPageView || !pAnnot) |
return FALSE; |
- |
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); |
- if (!pSDKDoc) |
+ if (!pPageView->GetFormFillEnv()->GetSDKDocument()) |
Tom Sepez
2016/10/06 18:46:28
really want local here.
dsinclair
2016/10/06 19:32:55
Added one for the FormFillEnv.
|
return FALSE; |
- CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); |
+ CPDFXFA_Document* pDoc = |
+ pPageView->GetFormFillEnv()->GetSDKDocument()->GetXFADocument(); |
if (!pDoc) |
return FALSE; |
@@ -345,12 +342,11 @@ CXFA_FFWidgetHandler* CPDFSDK_XFAWidgetHandler::GetXFAWidgetHandler( |
CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); |
if (!pPageView) |
return nullptr; |
- |
- CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); |
- if (!pSDKDoc) |
+ if (!pPageView->GetFormFillEnv()->GetSDKDocument()) |
Tom Sepez
2016/10/06 18:46:28
ditto
dsinclair
2016/10/06 19:32:55
Done.
|
return nullptr; |
- CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); |
+ CPDFXFA_Document* pDoc = |
+ pPageView->GetFormFillEnv()->GetSDKDocument()->GetXFADocument(); |
if (!pDoc) |
return nullptr; |