summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-10 01:07:19 -0700
committerLei Zhang <thestig@chromium.org>2015-08-10 01:07:19 -0700
commit335e11825fcb8520f68ac668f8dacd9b48f05804 (patch)
tree5ee84a54b99ecbc2ebd3205ca5fe5b6e6ee09891 /fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
parent68869fd52909b3d5a66dd891b0637fb2718bed35 (diff)
downloadpdfium-335e11825fcb8520f68ac668f8dacd9b48f05804.tar.xz
Merge to XFA: Cleanup: Mark methods with the override keyword.
- Delete unneeded CFFL_ComboBox::CanCopy() and friends. - Delete unneeded CFFL_FormFiller::CanCopy() and friends. - Delete unneeded CFFL_TextField::CanCopy() and friends. - Delete unneeded FormFiller::DoCopy() and friends. - Rename CFFL_FormFiller::On{Set,Kill}Focus to avoid conflicts. BUG=pdfium:185 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1283493004 . (cherry picked from commit 3a3849176aa6e2db8baf2f9367b2d96c71815319) Review URL: https://codereview.chromium.org/1279123006 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index ca01787b44..aaed794db8 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -463,7 +463,7 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
}
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE))
- return pFormFiller->OnSetFocus(pAnnot, nFlag);
+ return pFormFiller->SetFocusForAnnot(pAnnot, nFlag);
return TRUE;
}
@@ -474,28 +474,28 @@ FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget");
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) {
- if (pFormFiller->OnKillFocus(pAnnot, nFlag)) {
- if (!m_bNotifying) {
- CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
- if (pWidget->GetAAction(CPDF_AAction::LoseFocus)) {
- m_bNotifying = TRUE;
- pWidget->ClearAppModified();
+ if (!pFormFiller->KillFocusForAnnot(pAnnot, nFlag))
+ return FALSE;
- CPDFSDK_PageView* pPageView = pWidget->GetPageView();
- ASSERT(pPageView != NULL);
+ if (!m_bNotifying) {
+ CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
+ if (pWidget->GetAAction(CPDF_AAction::LoseFocus)) {
+ m_bNotifying = TRUE;
+ pWidget->ClearAppModified();
- PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ CPDFSDK_PageView* pPageView = pWidget->GetPageView();
+ ASSERT(pPageView != NULL);
- pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
+ PDFSDK_FieldAction fa;
+ fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
- pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
- m_bNotifying = FALSE;
- }
+ pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
+
+ pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
+ m_bNotifying = FALSE;
}
- } else
- return FALSE;
+ }
}
return TRUE;
@@ -1084,13 +1084,11 @@ void CFFL_IFormFiller::OnAfterKeyStroke(FX_BOOL bEditOrList,
void* pPrivateData,
FX_BOOL& bExit,
FX_DWORD nFlag) {
- ASSERT(pPrivateData != NULL);
CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData;
- ASSERT(pData->pWidget != NULL);
+ ASSERT(pData->pWidget);
CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE);
- ASSERT(pFormFiller != NULL);
if (!bEditOrList)
- pFormFiller->OnKeyStroke(bExit);
+ pFormFiller->OnKeyStroke(bExit, nFlag);
}