summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-11 09:26:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-11 09:26:32 -0700
commitb402b1738d665561dd1bb7ffba0c3f3d49425086 (patch)
treeb7542f810c1d9199179dc60e5cdd43a5c794b880 /fpdfsdk/formfiller
parent690c033e86b34f7a9c3d4be15759c63ef9360217 (diff)
downloadpdfium-b402b1738d665561dd1bb7ffba0c3f3d49425086.tar.xz
Convert CPDFSDK_PageView to have a CPDFSDK_FormFillEnvironment
This CL changes CPDFSDK_PageView to have a CPDFSDK_FormFillEnvironment instead of a CPDFSDK_Document. Review-Url: https://codereview.chromium.org/2400673002
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 12c55d37b3..c62de9bfb5 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -691,8 +691,8 @@ void CFFL_InteractiveFormFiller::OnCalculate(CPDFSDK_Widget* pWidget,
uint32_t nFlag) {
if (!m_bNotifying) {
ASSERT(pWidget);
- CPDFSDK_Document* pDocument = pPageView->GetSDKDocument();
- CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm =
+ pPageView->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
pInterForm->OnCalculate(pWidget->GetFormField());
m_bNotifying = FALSE;
}
@@ -704,8 +704,8 @@ void CFFL_InteractiveFormFiller::OnFormat(CPDFSDK_Widget* pWidget,
uint32_t nFlag) {
if (!m_bNotifying) {
ASSERT(pWidget);
- CPDFSDK_Document* pDocument = pPageView->GetSDKDocument();
- CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm =
+ pPageView->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
FX_BOOL bFormatted = FALSE;
CFX_WideString sValue =
@@ -932,7 +932,8 @@ void CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
int nAge = pData->pWidget->GetAppearanceAge();
int nValueAge = pData->pWidget->GetValueAge();
- CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument();
+ CPDFSDK_FormFillEnvironment* pFormFillEnv =
+ pData->pPageView->GetFormFillEnv();
PDFSDK_FieldAction fa;
fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
@@ -973,7 +974,7 @@ void CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
bRC = FALSE;
}
- if (pDocument->GetFocusAnnot() != pData->pWidget) {
+ if (pFormFillEnv->GetSDKDocument()->GetFocusAnnot() != pData->pWidget) {
pFormFiller->CommitData(pData->pPageView, nFlag);
bExit = TRUE;
}