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

Unified Diff: fpdfsdk/cpdfsdk_xfawidgethandler.cpp

Issue 2410893002: Merge CPDFSDK_Document into 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
Index: fpdfsdk/cpdfsdk_xfawidgethandler.cpp
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index 8551445ef17081f7930976934ae172e5bdef768a..1ca5ce002652e313befe566ad2bc6890d0e2eae4 100644
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -8,7 +8,6 @@
#include "core/fpdfdoc/cpdf_interform.h"
#include "fpdfsdk/cpdfsdk_annot.h"
-#include "fpdfsdk/cpdfsdk_document.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
@@ -39,7 +38,7 @@ CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot,
CPDFSDK_PageView* pPage) {
- CPDFSDK_InterForm* pInterForm = m_pEnv->GetSDKDocument()->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pEnv->GetInterForm();
CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm);
pInterForm->AddXFAMap(pAnnot, pWidget);
return pWidget;
@@ -60,7 +59,7 @@ void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView,
mt = *pUser2Device;
FX_BOOL bIsHighlight = FALSE;
- if (pPageView->GetFormFillEnv()->GetSDKDocument()->GetFocusAnnot() != pAnnot)
+ if (pPageView->GetFormFillEnv()->GetFocusAnnot() != pAnnot)
bIsHighlight = TRUE;
GetXFAWidgetHandler(pAnnot)->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt,
@@ -115,10 +114,10 @@ FX_BOOL CPDFSDK_XFAWidgetHandler::HitTest(CPDFSDK_PageView* pPageView,
return FALSE;
CPDFSDK_FormFillEnvironment* pFormFillEnv = pPageView->GetFormFillEnv();
- if (!pFormFillEnv->GetSDKDocument())
+ if (!pFormFillEnv)
return FALSE;
- CPDFXFA_Document* pDoc = pFormFillEnv->GetSDKDocument()->GetXFADocument();
+ CPDFXFA_Document* pDoc = pFormFillEnv->GetXFADocument();
if (!pDoc)
return FALSE;
@@ -344,10 +343,10 @@ CXFA_FFWidgetHandler* CPDFSDK_XFAWidgetHandler::GetXFAWidgetHandler(
return nullptr;
CPDFSDK_FormFillEnvironment* pFormFillEnv = pPageView->GetFormFillEnv();
- if (!pFormFillEnv->GetSDKDocument())
+ if (!pFormFillEnv)
return nullptr;
- CPDFXFA_Document* pDoc = pFormFillEnv->GetSDKDocument()->GetXFADocument();
+ CPDFXFA_Document* pDoc = pFormFillEnv->GetXFADocument();
if (!pDoc)
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698