summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-10 11:47:08 -0700
committerLei Zhang <thestig@chromium.org>2015-06-10 11:47:08 -0700
commit35c3163d55bebea8095474181f807ddfb2f4f806 (patch)
tree1abf9c44f45ac844214b01dfd090c50c1027a4ec /fpdfsdk/src/fsdk_baseform.cpp
parent22f429fc4875027b10ab071102c9ac8a88abf825 (diff)
downloadpdfium-35c3163d55bebea8095474181f807ddfb2f4f806.tar.xz
Cleanup: Remove CFFL_IFormFiller::GetCommitKey() that always returns 0.
Remove callers and related code that all just pass zeros around. Also remove CFFL_IFormFiller::GetKeyDown(). R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1149623012.
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 936d881780..c94da1d5cd 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -387,15 +387,11 @@ void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChang
m_pAnnot->ClearCachedAP();
}
-CFX_WideString CPDFSDK_Widget::OnFormat(int nCommitKey, FX_BOOL& bFormated)
+CFX_WideString CPDFSDK_Widget::OnFormat(FX_BOOL& bFormated)
{
- CPDF_FormField* pFormField = GetFormField();
- ASSERT(pFormField != NULL);
-
- ASSERT(m_pInterForm != NULL);
-
- return m_pInterForm->OnFormat(pFormField, nCommitKey, bFormated);
-
+ CPDF_FormField* pFormField = GetFormField();
+ ASSERT(pFormField != NULL);
+ return m_pInterForm->OnFormat(pFormField, bFormated);
}
void CPDFSDK_Widget::ResetFieldAppearance(FX_BOOL bValueChanged)
@@ -1979,7 +1975,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
m_bBusy = FALSE;
}
-CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, int nCommitKey, FX_BOOL& bFormated)
+CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated)
{
ASSERT(m_pDocument != NULL);
ASSERT(pFormField != NULL);
@@ -2024,7 +2020,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, int nComm
IFXJS_Context* pContext = pRuntime->NewContext();
ASSERT(pContext != NULL);
- pContext->OnField_Format(nCommitKey, pFormField, Value, TRUE);
+ pContext->OnField_Format(pFormField, Value, TRUE);
CFX_WideString sInfo;
FX_BOOL bRet = pContext->RunScript(script, sInfo);
@@ -2515,7 +2511,7 @@ int CPDFSDK_InterForm::AfterValueChange(const CPDF_FormField* pField)
{
this->OnCalculate(pFormField);
FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = this->OnFormat(pFormField, 0, bFormated);
+ CFX_WideString sValue = this->OnFormat(pFormField, bFormated);
if (bFormated)
this->ResetFieldAppearance(pFormField, sValue.c_str(), TRUE);
else