summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp17
2 files changed, 9 insertions, 14 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 86818b1c75..30609fdac4 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -8,7 +8,6 @@
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fxge/cfx_renderdevice.h"
-#include "fpdfsdk/cpdfsdk_document.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
@@ -245,8 +244,7 @@ FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot,
void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
- CPDFSDK_PageView* pPageView =
- m_pEnv->GetSDKDocument()->GetPageView(pPage, true);
+ CPDFSDK_PageView* pPageView = m_pEnv->GetPageView(pPage, true);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
pWnd->SetFocus();
@@ -452,7 +450,7 @@ CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const {
CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) {
UnderlyingPageType* pPage = m_pAnnot->GetUnderlyingPage();
- return m_pEnv ? m_pEnv->GetSDKDocument()->GetPageView(pPage, renew) : nullptr;
+ return m_pEnv ? m_pEnv->GetPageView(pPage, renew) : nullptr;
}
CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index e3a136eebe..b06dfdba4a 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -11,7 +11,6 @@
#include "core/fxge/cfx_graphstatedata.h"
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
-#include "fpdfsdk/cpdfsdk_document.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
@@ -67,7 +66,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device);
pAnnot->GetPDFPage();
- if (m_pEnv->GetSDKDocument()->GetFocusAnnot() == pAnnot) {
+ if (m_pEnv->GetFocusAnnot() == pAnnot) {
CFX_FloatRect rcFocus = pFormFiller->GetFocusBox(pPageView);
if (!rcFocus.IsEmpty()) {
CFX_PathData path;
@@ -229,10 +228,10 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp(
case FIELDTYPE_RADIOBUTTON:
if (GetViewBBox(pPageView, pAnnot->Get())
.Contains((int)point.x, (int)point.y))
- m_pEnv->GetSDKDocument()->SetFocusAnnot(pAnnot);
+ m_pEnv->SetFocusAnnot(pAnnot);
break;
default:
- m_pEnv->GetSDKDocument()->SetFocusAnnot(pAnnot);
+ m_pEnv->SetFocusAnnot(pAnnot);
break;
}
@@ -240,7 +239,7 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp(
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), FALSE))
bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot->Get(), nFlags, point);
- if (m_pEnv->GetSDKDocument()->GetFocusAnnot() == pAnnot->Get()) {
+ if (m_pEnv->GetFocusAnnot() == pAnnot->Get()) {
FX_BOOL bExit = FALSE;
FX_BOOL bReset = FALSE;
OnButtonUp(pAnnot, pPageView, bReset, bExit, nFlags);
@@ -672,8 +671,7 @@ void CFFL_InteractiveFormFiller::OnCalculate(CPDFSDK_Widget* pWidget,
uint32_t nFlag) {
if (!m_bNotifying) {
ASSERT(pWidget);
- CPDFSDK_InterForm* pInterForm =
- pPageView->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = pPageView->GetFormFillEnv()->GetInterForm();
pInterForm->OnCalculate(pWidget->GetFormField());
m_bNotifying = FALSE;
}
@@ -685,8 +683,7 @@ void CFFL_InteractiveFormFiller::OnFormat(CPDFSDK_Widget* pWidget,
uint32_t nFlag) {
if (!m_bNotifying) {
ASSERT(pWidget);
- CPDFSDK_InterForm* pInterForm =
- pPageView->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = pPageView->GetFormFillEnv()->GetInterForm();
FX_BOOL bFormatted = FALSE;
CFX_WideString sValue =
@@ -955,7 +952,7 @@ void CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
bRC = FALSE;
}
- if (pFormFillEnv->GetSDKDocument()->GetFocusAnnot() != pData->pWidget) {
+ if (pFormFillEnv->GetFocusAnnot() != pData->pWidget) {
pFormFiller->CommitData(pData->pPageView, nFlag);
bExit = TRUE;
}