summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-12 11:56:23 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-12 11:56:23 -0700
commit7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77 (patch)
treecc439488801d7a3e72a56ecd88df600e12b8a948 /fpdfsdk/cpdfsdk_xfawidgethandler.cpp
parent7cc6a32693a07210e036a8d7131232231ec0fdb3 (diff)
downloadpdfium-7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77.tar.xz
Merge CPDFSDK_Document into CPDFSDK_FormFillEnvironment
This CL merges the CPDFSDK_Document and CPDFSDK_FormFillEnvironment classes as they always existed and always pointed at each other. Review-Url: https://codereview.chromium.org/2410893002
Diffstat (limited to 'fpdfsdk/cpdfsdk_xfawidgethandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_xfawidgethandler.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index 48fda86476..a7310a7638 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,
@@ -107,10 +106,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;
@@ -332,10 +331,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;