diff options
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r-- | fpdfsdk/formfiller/cffl_combobox.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_combobox.h | 2 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.h | 2 |
4 files changed, 4 insertions, 12 deletions
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index 006828df75..6af65de643 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp @@ -257,11 +257,7 @@ bool CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) { } #endif // PDF_ENABLE_XFA -void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) { - if (pWnd->GetClassName() != PWL_CLASSNAME_EDIT) - return; - - CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; +void CFFL_ComboBox::OnSetFocus(CPWL_Edit* pEdit) { pEdit->SetCharSet(FX_CHARSET_ChineseSimplified); pEdit->SetReadyToInput(); diff --git a/fpdfsdk/formfiller/cffl_combobox.h b/fpdfsdk/formfiller/cffl_combobox.h index be14d8beec..96e8ffda84 100644 --- a/fpdfsdk/formfiller/cffl_combobox.h +++ b/fpdfsdk/formfiller/cffl_combobox.h @@ -47,7 +47,7 @@ class CFFL_ComboBox : public CFFL_FormFiller, public IPWL_FocusHandler { bool bRestoreValue) override; // IPWL_FocusHandler: - void OnSetFocus(CPWL_Wnd* pWnd) override; + void OnSetFocus(CPWL_Edit* pEdit) override; #ifdef PDF_ENABLE_XFA // CFFL_FormFiller: diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index da8c14d0ff..70bc202fbf 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -255,11 +255,7 @@ bool CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) { } #endif // PDF_ENABLE_XFA -void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) { - if (pWnd->GetClassName() != PWL_CLASSNAME_EDIT) - return; - - CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; +void CFFL_TextField::OnSetFocus(CPWL_Edit* pEdit) { pEdit->SetCharSet(FX_CHARSET_ChineseSimplified); pEdit->SetReadyToInput(); diff --git a/fpdfsdk/formfiller/cffl_textfield.h b/fpdfsdk/formfiller/cffl_textfield.h index 621c1184e1..91771a10c1 100644 --- a/fpdfsdk/formfiller/cffl_textfield.h +++ b/fpdfsdk/formfiller/cffl_textfield.h @@ -52,7 +52,7 @@ class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler { bool bRestoreValue) override; // IPWL_FocusHandler: - void OnSetFocus(CPWL_Wnd* pWnd) override; + void OnSetFocus(CPWL_Edit* pEdit) override; #ifdef PDF_ENABLE_XFA // CFFL_FormFiller: |