diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-12 11:56:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-12 11:56:23 -0700 |
commit | 7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77 (patch) | |
tree | cc439488801d7a3e72a56ecd88df600e12b8a948 /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | |
parent | 7cc6a32693a07210e036a8d7131232231ec0fdb3 (diff) | |
download | pdfium-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/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r-- | fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
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; } |