summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp4
-rw-r--r--fpdfsdk/src/javascript/JS_Context.cpp13
-rw-r--r--fpdfsdk/src/javascript/JS_EventHandler.cpp11
3 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index c4936e3799..a45e96682b 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -256,7 +256,7 @@ void Field::UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormFi
ASSERT(pWidget != NULL);
FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = pWidget->OnFormat(0, bFormated);
+ CFX_WideString sValue = pWidget->OnFormat(bFormated);
if (bFormated)
pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
@@ -313,7 +313,7 @@ void Field::UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFo
if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_TEXTFIELD)
{
FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = pWidget->OnFormat(0, bFormated);
+ CFX_WideString sValue = pWidget->OnFormat(bFormated);
if (bFormated)
pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp
index 277abc08e5..362844509f 100644
--- a/fpdfsdk/src/javascript/JS_Context.cpp
+++ b/fpdfsdk/src/javascript/JS_Context.cpp
@@ -232,21 +232,20 @@ void CJS_Context::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTa
m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc);
}
-void CJS_Context::OnField_Format(int nCommitKey, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit)
+void CJS_Context::OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit)
{
- ASSERT(m_pEventHandler != NULL);
- m_pEventHandler->OnField_Format(nCommitKey, pTarget, Value, bWillCommit);
+ m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit);
}
-void CJS_Context::OnField_Keystroke(int nCommitKey, CFX_WideString& strChange, const CFX_WideString& strChangeEx,
+void CJS_Context::OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx,
FX_BOOL bKeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart,
FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value,
FX_BOOL bWillCommit, FX_BOOL bFieldFull, FX_BOOL& bRc)
{
- ASSERT(m_pEventHandler != NULL);
- m_pEventHandler->OnField_Keystroke(nCommitKey, strChange, strChangeEx, bKeyDown,
- bModifier, nSelEnd, nSelStart, bShift, pTarget, Value, bWillCommit, bFieldFull, bRc);
+ m_pEventHandler->OnField_Keystroke(
+ strChange, strChangeEx, bKeyDown, bModifier, nSelEnd, nSelStart,
+ bShift, pTarget, Value, bWillCommit, bFieldFull, bRc);
}
void CJS_Context::OnField_Validate(CFX_WideString& strChange,const CFX_WideString& strChangeEx,
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp
index fe4f6b2d4c..1fab82f74e 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp
@@ -188,7 +188,7 @@ void CJS_EventHandler::OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_Form
m_pValue = (CFX_WideString*)&Value;
}
-void CJS_EventHandler::OnField_Keystroke(int nCommitKey, CFX_WideString &strChange,
+void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
const CFX_WideString& strChangeEx, FX_BOOL KeyDown,
FX_BOOL bModifier, int& nSelEnd, int& nSelStart,
FX_BOOL bShift, CPDF_FormField* pTarget,
@@ -197,7 +197,7 @@ void CJS_EventHandler::OnField_Keystroke(int nCommitKey, CFX_WideString &strChan
{
Initial(JET_FIELD_KEYSTROKE);
- m_nCommitKey = nCommitKey;
+ m_nCommitKey = 0;
m_pWideStrChange = &strChange;
m_WideStrChangeEx = strChangeEx;
m_bKeyDown = KeyDown;
@@ -243,12 +243,13 @@ void CJS_EventHandler::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField
m_pbRc = &bRc;
}
-void CJS_EventHandler::OnField_Format(int nCommitKey, CPDF_FormField* pTarget,
- CFX_WideString& Value, FX_BOOL bWillCommit)
+void CJS_EventHandler::OnField_Format(CPDF_FormField* pTarget,
+ CFX_WideString& Value,
+ FX_BOOL bWillCommit)
{
Initial(JET_FIELD_FORMAT);
- m_nCommitKey = nCommitKey;
+ m_nCommitKey = 0;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
m_pValue = &Value;