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

Unified Diff: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp

Issue 1283493004: Cleanup: Mark methods with the override keyword. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 4 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
Index: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index ad573470bdd37701b1e255d2d832ee38407742cb..f8f8c6a943e27e870862f02cc41de4782a722c7a 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -459,7 +459,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;
}
@@ -470,28 +470,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;
@@ -898,13 +898,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);
}

Powered by Google App Engine
This is Rietveld 408576698