Remove CPWL_Edit::ReplaceSel(). CPWL_Edit inherits from CPWL_EditCtrl, and CPWL_Edit::ReplaceSel() is identical to CPWL_EditCtrl::ReplaceSelection(). Change-Id: I77f11efd80ef3e3dabea9301b17174261b082f70 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index 6f47983..7cce34d 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -174,7 +174,7 @@ static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, false))) { if (CPWL_Edit* pEdit = pComboBox->GetEdit()) { pEdit->SetSelection(fa.nSelStart, fa.nSelEnd); - pEdit->ReplaceSel(fa.sChange); + pEdit->ReplaceSelection(fa.sChange); } } break;
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 46a4fc1..a0c60b8 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -196,7 +196,7 @@ if (CPWL_Edit* pEdit = GetEdit(pPageView, false)) { pEdit->SetFocus(); pEdit->SetSelection(fa.nSelStart, fa.nSelEnd); - pEdit->ReplaceSel(fa.sChange); + pEdit->ReplaceSelection(fa.sChange); } break; default:
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp index aa434a7..055f63f 100644 --- a/fpdfsdk/pwl/cpwl_combo_box.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box.cpp
@@ -588,7 +588,7 @@ void CPWL_ComboBox::SetSelectText() { m_pEdit->SelectAll(); - m_pEdit->ReplaceSel(m_pList->GetText()); + m_pEdit->ReplaceSelection(m_pList->GetText()); m_pEdit->SelectAll(); m_nSelectItem = m_pList->GetCurSel(); }
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp index cce0b1c..6f52971 100644 --- a/fpdfsdk/pwl/cpwl_edit.cpp +++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -405,10 +405,6 @@ m_pEdit->SetLimitChar(nLimitChar); } -void CPWL_Edit::ReplaceSel(const WideString& wsText) { - m_pEdit->ReplaceSelection(wsText); -} - CFX_FloatRect CPWL_Edit::GetFocusRect() const { return CFX_FloatRect(); }
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h index 3df92b8..0e16a7f 100644 --- a/fpdfsdk/pwl/cpwl_edit.h +++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -76,7 +76,6 @@ void CutText(); void SetText(const WideString& csText); - void ReplaceSel(const WideString& wsText); bool IsTextFull() const;