Change "Sel" abbreviation to "Selection".

This CL changes SetSel() and GetSel() to SetSelection() and GetSelection()
in CFX_Edit and CPWL_EditCtrl, and SetEditSel() and GetEditSel() to
SetEditSelection() and GetEditSelection() in CPWL_ComboBox.

Change-Id: Idd984932bda139a04e99193e519756980b7d4397
Reviewed-on: https://pdfium-review.googlesource.com/8610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 175ccb7..cbd00bc 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -132,7 +132,7 @@
           fa.bFieldFull = pEdit->IsTextFull();
           int nSelStart = 0;
           int nSelEnd = 0;
-          pEdit->GetSel(nSelStart, nSelEnd);
+          pEdit->GetSelection(nSelStart, nSelEnd);
           fa.nSelEnd = nSelEnd;
           fa.nSelStart = nSelStart;
           fa.sValue = pEdit->GetText();
@@ -170,7 +170,7 @@
       if (CPWL_ComboBox* pComboBox =
               static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, false))) {
         if (CPWL_Edit* pEdit = pComboBox->GetEdit()) {
-          pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
+          pEdit->SetSelection(fa.nSelStart, fa.nSelEnd);
           pEdit->ReplaceSel(fa.sChange);
         }
       }
@@ -203,7 +203,7 @@
     m_State.nIndex = pComboBox->GetSelect();
 
     if (CPWL_Edit* pEdit = pComboBox->GetEdit()) {
-      pEdit->GetSel(m_State.nStart, m_State.nEnd);
+      pEdit->GetSelection(m_State.nStart, m_State.nEnd);
       m_State.sValue = pEdit->GetText();
     }
   }
@@ -219,7 +219,7 @@
     } else {
       if (CPWL_Edit* pEdit = pComboBox->GetEdit()) {
         pEdit->SetText(m_State.sValue);
-        pEdit->SetSel(m_State.nStart, m_State.nEnd);
+        pEdit->SetSelection(m_State.nStart, m_State.nEnd);
       }
     }
   }
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index d598419..0f330b5 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -186,7 +186,7 @@
     case CPDF_AAction::KeyStroke:
       if (CPWL_Edit* pEdit = GetEdit(pPageView, false)) {
         pEdit->SetFocus();
-        pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
+        pEdit->SetSelection(fa.nSelStart, fa.nSelEnd);
         pEdit->ReplaceSel(fa.sChange);
       }
       break;
@@ -217,7 +217,7 @@
   if (!pWnd)
     return;
 
-  pWnd->GetSel(m_State.nStart, m_State.nEnd);
+  pWnd->GetSelection(m_State.nStart, m_State.nEnd);
   m_State.sValue = pWnd->GetText();
 }
 
@@ -229,7 +229,7 @@
     return;
 
   pWnd->SetText(m_State.sValue);
-  pWnd->SetSel(m_State.nStart, m_State.nEnd);
+  pWnd->SetSelection(m_State.nStart, m_State.nEnd);
 }
 
 CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView,
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 41019b3..a1ddc14 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -449,7 +449,7 @@
 void CFXEU_Clear::Redo() {
   if (m_pEdit) {
     m_pEdit->SelectNone();
-    m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
+    m_pEdit->SetSelection(m_wrSel.BeginPos, m_wrSel.EndPos);
     m_pEdit->Clear(false, true);
   }
 }
@@ -459,7 +459,7 @@
     m_pEdit->SelectNone();
     m_pEdit->SetCaret(m_wrSel.BeginPos);
     m_pEdit->InsertText(m_swText, FX_CHARSET_Default, false, true);
-    m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
+    m_pEdit->SetSelection(m_wrSel.BeginPos, m_wrSel.EndPos);
   }
 }
 
@@ -487,7 +487,7 @@
 void CFXEU_InsertText::Undo() {
   if (m_pEdit) {
     m_pEdit->SelectNone();
-    m_pEdit->SetSel(m_wpOld, m_wpNew);
+    m_pEdit->SetSelection(m_wpOld, m_wpNew);
     m_pEdit->Clear(false, true);
   }
 }
@@ -733,7 +733,7 @@
     Paint();
 }
 
-void CFX_Edit::SetSel(int32_t nStartChar, int32_t nEndChar) {
+void CFX_Edit::SetSelection(int32_t nStartChar, int32_t nEndChar) {
   if (m_pVT->IsValid()) {
     if (nStartChar == 0 && nEndChar < 0) {
       SelectAll();
@@ -741,17 +741,18 @@
       SelectNone();
     } else {
       if (nStartChar < nEndChar) {
-        SetSel(m_pVT->WordIndexToWordPlace(nStartChar),
-               m_pVT->WordIndexToWordPlace(nEndChar));
+        SetSelection(m_pVT->WordIndexToWordPlace(nStartChar),
+                     m_pVT->WordIndexToWordPlace(nEndChar));
       } else {
-        SetSel(m_pVT->WordIndexToWordPlace(nEndChar),
-               m_pVT->WordIndexToWordPlace(nStartChar));
+        SetSelection(m_pVT->WordIndexToWordPlace(nEndChar),
+                     m_pVT->WordIndexToWordPlace(nStartChar));
       }
     }
   }
 }
 
-void CFX_Edit::SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end) {
+void CFX_Edit::SetSelection(const CPVT_WordPlace& begin,
+                            const CPVT_WordPlace& end) {
   if (!m_pVT->IsValid())
     return;
 
@@ -764,7 +765,7 @@
   SetCaretInfo();
 }
 
-void CFX_Edit::GetSel(int32_t& nStartChar, int32_t& nEndChar) const {
+void CFX_Edit::GetSelection(int32_t& nStartChar, int32_t& nEndChar) const {
   nStartChar = -1;
   nEndChar = -1;
   if (!m_pVT->IsValid())
diff --git a/fpdfsdk/fxedit/fxet_edit.h b/fpdfsdk/fxedit/fxet_edit.h
index c0c8442..4ae03e2 100644
--- a/fpdfsdk/fxedit/fxet_edit.h
+++ b/fpdfsdk/fxedit/fxet_edit.h
@@ -361,8 +361,8 @@
   CFX_WideString GetRangeText(const CPVT_WordRange& range) const;
   int32_t GetHorzScale() const;
   float GetCharSpace() const;
-  void SetSel(int32_t nStartChar, int32_t nEndChar);
-  void GetSel(int32_t& nStartChar, int32_t& nEndChar) const;
+  void SetSelection(int32_t nStartChar, int32_t nEndChar);
+  void GetSelection(int32_t& nStartChar, int32_t& nEndChar) const;
   void SelectAll();
   void SelectNone();
   bool IsSelected() const;
@@ -397,7 +397,7 @@
   friend class CFXEU_Clear;
   friend class CFXEU_InsertText;
 
-  void SetSel(const CPVT_WordPlace& begin, const CPVT_WordPlace& end);
+  void SetSelection(const CPVT_WordPlace& begin, const CPVT_WordPlace& end);
 
   void RearrangeAll();
   void RearrangePart(const CPVT_WordRange& range);
diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
index d86c9db..e507633 100644
--- a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
@@ -213,17 +213,18 @@
   m_nSelectItem = nItemIndex;
 }
 
-void CPWL_ComboBox::SetEditSel(int32_t nStartChar, int32_t nEndChar) {
+void CPWL_ComboBox::SetEditSelection(int32_t nStartChar, int32_t nEndChar) {
   if (m_pEdit)
-    m_pEdit->SetSel(nStartChar, nEndChar);
+    m_pEdit->SetSelection(nStartChar, nEndChar);
 }
 
-void CPWL_ComboBox::GetEditSel(int32_t& nStartChar, int32_t& nEndChar) const {
+void CPWL_ComboBox::GetEditSelection(int32_t& nStartChar,
+                                     int32_t& nEndChar) const {
   nStartChar = -1;
   nEndChar = -1;
 
   if (m_pEdit)
-    m_pEdit->GetSel(nStartChar, nEndChar);
+    m_pEdit->GetSelection(nStartChar, nEndChar);
 }
 
 void CPWL_ComboBox::Clear() {
diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box.h b/fpdfsdk/pdfwindow/cpwl_combo_box.h
index 7dc348a..a38ffa7 100644
--- a/fpdfsdk/pdfwindow/cpwl_combo_box.h
+++ b/fpdfsdk/pdfwindow/cpwl_combo_box.h
@@ -72,8 +72,8 @@
   int32_t GetSelect() const;
   void SetSelect(int32_t nItemIndex);
 
-  void SetEditSel(int32_t nStartChar, int32_t nEndChar);
-  void GetEditSel(int32_t& nStartChar, int32_t& nEndChar) const;
+  void SetEditSelection(int32_t nStartChar, int32_t nEndChar);
+  void GetEditSelection(int32_t& nStartChar, int32_t& nEndChar) const;
   void Clear();
   void SelectAll();
   bool IsPopup() const;
diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pdfwindow/cpwl_combo_box_embeddertest.cpp
index 35c7b22..9ca994f 100644
--- a/fpdfsdk/pdfwindow/cpwl_combo_box_embeddertest.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_combo_box_embeddertest.cpp
@@ -114,25 +114,25 @@
   FormFillerAndWindowSetup(GetCPDFSDKAnnotNormal());
   EXPECT_STREQ(L"Banana", GetCPWLComboBox()->GetText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(0, 0);
+  GetCPWLComboBox()->SetEditSelection(0, 0);
   EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
 
-  GetCPWLComboBox()->SetEditSel(0, 1);
+  GetCPWLComboBox()->SetEditSelection(0, 1);
   EXPECT_STREQ(L"B", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(0, -1);
+  GetCPWLComboBox()->SetEditSelection(0, -1);
   EXPECT_STREQ(L"Banana", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(-8, -1);
+  GetCPWLComboBox()->SetEditSelection(-8, -1);
   EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
 
-  GetCPWLComboBox()->SetEditSel(4, 1);
+  GetCPWLComboBox()->SetEditSelection(4, 1);
   EXPECT_STREQ(L"ana", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(1, 4);
+  GetCPWLComboBox()->SetEditSelection(1, 4);
   EXPECT_STREQ(L"ana", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(5, 6);
+  GetCPWLComboBox()->SetEditSelection(5, 6);
   EXPECT_STREQ(L"a", GetCPWLComboBox()->GetSelectedText().c_str());
 }
 
@@ -149,7 +149,7 @@
   // Select another option and then select last char of that option.
   GetCPWLComboBox()->SetSelect(1);
   EXPECT_STREQ(L"Bar", GetCPWLComboBox()->GetSelectedText().c_str());
-  GetCPWLComboBox()->SetEditSel(2, 3);
+  GetCPWLComboBox()->SetEditSelection(2, 3);
   EXPECT_STREQ(L"r", GetCPWLComboBox()->GetSelectedText().c_str());
 
   // Type into editable combobox text field and select new text.
@@ -161,7 +161,7 @@
       GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(), 'c', 0));
 
   EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
-  GetCPWLComboBox()->SetEditSel(0, 5);
+  GetCPWLComboBox()->SetEditSelection(0, 5);
   EXPECT_STREQ(L"Baabc", GetCPWLComboBox()->GetSelectedText().c_str());
 }
 
@@ -172,25 +172,25 @@
         GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(), i + 'A', 0));
   }
 
-  GetCPWLComboBox()->SetEditSel(0, 0);
+  GetCPWLComboBox()->SetEditSelection(0, 0);
   EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
 
-  GetCPWLComboBox()->SetEditSel(0, 1);
+  GetCPWLComboBox()->SetEditSelection(0, 1);
   EXPECT_STREQ(L"A", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(0, -1);
+  GetCPWLComboBox()->SetEditSelection(0, -1);
   EXPECT_STREQ(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr",
                GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(-8, -1);
+  GetCPWLComboBox()->SetEditSelection(-8, -1);
   EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
 
-  GetCPWLComboBox()->SetEditSel(23, 12);
+  GetCPWLComboBox()->SetEditSelection(23, 12);
   EXPECT_STREQ(L"MNOPQRSTUVW", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(12, 23);
+  GetCPWLComboBox()->SetEditSelection(12, 23);
   EXPECT_STREQ(L"MNOPQRSTUVW", GetCPWLComboBox()->GetSelectedText().c_str());
 
-  GetCPWLComboBox()->SetEditSel(49, 50);
+  GetCPWLComboBox()->SetEditSelection(49, 50);
   EXPECT_STREQ(L"r", GetCPWLComboBox()->GetSelectedText().c_str());
 }
diff --git a/fpdfsdk/pdfwindow/cpwl_edit.cpp b/fpdfsdk/pdfwindow/cpwl_edit.cpp
index 046fb57..ac1cfa9 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit.cpp
@@ -361,7 +361,7 @@
     int32_t nStart = -1;
     int32_t nEnd = -1;
 
-    m_pEdit->GetSel(nStart, nEnd);
+    m_pEdit->GetSelection(nStart, nEnd);
 
     CPVT_WordPlace wpStart = m_pEdit->WordIndexToWordPlace(nStart);
     CPVT_WordPlace wpEnd = m_pEdit->WordIndexToWordPlace(nEnd);
@@ -455,7 +455,7 @@
 
       int nSelStart = 0;
       int nSelEnd = 0;
-      GetSel(nSelStart, nSelEnd);
+      GetSelection(nSelStart, nSelEnd);
 
       if (nSelStart == nSelEnd)
         nSelEnd = nSelStart + 1;
@@ -527,7 +527,7 @@
 
       int nSelStart = 0;
       int nSelEnd = 0;
-      GetSel(nSelStart, nSelEnd);
+      GetSelection(nSelStart, nSelEnd);
 
       switch (nChar) {
         case FWL_VKEY_Back:
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
index 63d0392..357b552 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
@@ -334,12 +334,12 @@
   return m_pEdit->GetText();
 }
 
-void CPWL_EditCtrl::SetSel(int32_t nStartChar, int32_t nEndChar) {
-  m_pEdit->SetSel(nStartChar, nEndChar);
+void CPWL_EditCtrl::SetSelection(int32_t nStartChar, int32_t nEndChar) {
+  m_pEdit->SetSelection(nStartChar, nEndChar);
 }
 
-void CPWL_EditCtrl::GetSel(int32_t& nStartChar, int32_t& nEndChar) const {
-  m_pEdit->GetSel(nStartChar, nEndChar);
+void CPWL_EditCtrl::GetSelection(int32_t& nStartChar, int32_t& nEndChar) const {
+  m_pEdit->GetSelection(nStartChar, nEndChar);
 }
 
 void CPWL_EditCtrl::Clear() {
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
index 454e579..04ec6e8 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.h
@@ -26,8 +26,8 @@
   ~CPWL_EditCtrl() override;
 
   CFX_WideString GetText() const;
-  void SetSel(int32_t nStartChar, int32_t nEndChar);
-  void GetSel(int32_t& nStartChar, int32_t& nEndChar) const;
+  void SetSelection(int32_t nStartChar, int32_t nEndChar);
+  void GetSelection(int32_t& nStartChar, int32_t& nEndChar) const;
   void Clear();
   void SelectAll();
 
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_embeddertest.cpp b/fpdfsdk/pdfwindow/cpwl_edit_embeddertest.cpp
index e206cd1..9b15ad8 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_embeddertest.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit_embeddertest.cpp
@@ -85,13 +85,13 @@
   // selection is identified as empty.
   //
   // Select from character index [0, 3) within form text field.
-  GetCPWLEdit()->SetSel(0, 3);
+  GetCPWLEdit()->SetSelection(0, 3);
   EXPECT_TRUE(GetCPWLEdit()->GetSelectedText().IsEmpty());
 
   EXPECT_TRUE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnot(), 'a', 0));
   EXPECT_TRUE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnot(), 'b', 0));
   EXPECT_TRUE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnot(), 'c', 0));
-  GetCPWLEdit()->SetSel(0, 2);
+  GetCPWLEdit()->SetSelection(0, 2);
 
   EXPECT_STREQ(L"ab", GetCPWLEdit()->GetSelectedText().c_str());
 }
@@ -101,25 +101,25 @@
     EXPECT_TRUE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnot(), i + 'A', 0));
   }
 
-  GetCPWLEdit()->SetSel(0, 0);
+  GetCPWLEdit()->SetSelection(0, 0);
   EXPECT_TRUE(GetCPWLEdit()->GetSelectedText().IsEmpty());
 
-  GetCPWLEdit()->SetSel(0, 1);
+  GetCPWLEdit()->SetSelection(0, 1);
   EXPECT_STREQ(L"A", GetCPWLEdit()->GetSelectedText().c_str());
 
-  GetCPWLEdit()->SetSel(0, -1);
+  GetCPWLEdit()->SetSelection(0, -1);
   EXPECT_STREQ(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr",
                GetCPWLEdit()->GetSelectedText().c_str());
 
-  GetCPWLEdit()->SetSel(-8, -1);
+  GetCPWLEdit()->SetSelection(-8, -1);
   EXPECT_TRUE(GetCPWLEdit()->GetSelectedText().IsEmpty());
 
-  GetCPWLEdit()->SetSel(23, 12);
+  GetCPWLEdit()->SetSelection(23, 12);
   EXPECT_STREQ(L"MNOPQRSTUVW", GetCPWLEdit()->GetSelectedText().c_str());
 
-  GetCPWLEdit()->SetSel(12, 23);
+  GetCPWLEdit()->SetSelection(12, 23);
   EXPECT_STREQ(L"MNOPQRSTUVW", GetCPWLEdit()->GetSelectedText().c_str());
 
-  GetCPWLEdit()->SetSel(49, 50);
+  GetCPWLEdit()->SetSelection(49, 50);
   EXPECT_STREQ(L"r", GetCPWLEdit()->GetSelectedText().c_str());
 }