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

Unified Diff: fpdfsdk/formfiller/cffl_interactiveformfiller.cpp

Issue 2400673002: Convert CPDFSDK_PageView to have a 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
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidgethandler.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 12c55d37b30aeb7e6b32e830e6ccbb02da96fe4f..c62de9bfb5cb6e0fb7980751f14c3d1e19023dc9 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;
}
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidgethandler.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698