diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-10 15:23:23 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-10 15:23:23 -0700 |
commit | 0aa0e7331b3512066df3e33d6642456a0de63de7 (patch) | |
tree | beb51a4f1d45c4acdf4133fd3fef81fad4e35594 /fpdfsdk/src/fsdk_baseform.cpp | |
parent | 71b0378c7ce0bf8bfa54eddb2c2734729bae27f1 (diff) | |
download | pdfium-0aa0e7331b3512066df3e33d6642456a0de63de7.tar.xz |
Merge to XFA: 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.
(cherry picked from commit 35c3163d55bebea8095474181f807ddfb2f4f806)
Review URL: https://codereview.chromium.org/1175083003.
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_baseform.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 037339f4ff..1744fb942c 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -973,7 +973,7 @@ void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) case FIELDTYPE_COMBOBOX: { FX_BOOL bFormated = FALSE; - CFX_WideString sValue = this->OnFormat(0, bFormated); + CFX_WideString sValue = this->OnFormat(bFormated); if (bFormated) this->ResetAppearance(sValue, TRUE); else @@ -1024,15 +1024,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) @@ -2747,7 +2743,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); @@ -2792,7 +2788,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); @@ -3307,7 +3303,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 |