Remove CPWL window flags that are never set

Then remove code which is now seen to be dead.

Change-Id: I52d1b9e816056f0069e56a8cfe04b84e45f69922
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp
index d49849f..efe5374 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box.cpp
@@ -26,7 +26,6 @@
     const CreateParams& cp,
     std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {
-  GetCreationParams()->dwFlags &= ~PWS_HSCROLL;
   GetCreationParams()->dwFlags &= ~PWS_VSCROLL;
 }
 
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index 6fe176d..eefb21d 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -89,13 +89,13 @@
 }
 
 bool CPWL_Edit::CanCopy() const {
-  return !HasFlag(PES_PASSWORD) && !HasFlag(PES_NOREAD) &&
-         m_pEdit->IsSelected();
+  return !HasFlag(PES_PASSWORD) && m_pEdit->IsSelected();
 }
 
 bool CPWL_Edit::CanCut() const {
   return CanCopy() && !IsReadOnly();
 }
+
 void CPWL_Edit::CutText() {
   if (!CanCut())
     return;
@@ -126,9 +126,7 @@
     m_pEdit->SetAlignmentH(0, false);
   }
 
-  if (HasFlag(PES_BOTTOM)) {
-    m_pEdit->SetAlignmentV(2, false);
-  } else if (HasFlag(PES_CENTER)) {
+  if (HasFlag(PES_CENTER)) {
     m_pEdit->SetAlignmentV(1, false);
   } else {
     m_pEdit->SetAlignmentV(0, false);
@@ -523,54 +521,6 @@
   return true;
 }
 
-void CPWL_Edit::OnInsertReturn(const CPVT_WordPlace& place,
-                               const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
-void CPWL_Edit::OnBackSpace(const CPVT_WordPlace& place,
-                            const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
-void CPWL_Edit::OnDelete(const CPVT_WordPlace& place,
-                         const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
-void CPWL_Edit::OnClear(const CPVT_WordPlace& place,
-                        const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
-void CPWL_Edit::OnInsertWord(const CPVT_WordPlace& place,
-                             const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
-void CPWL_Edit::OnInsertText(const CPVT_WordPlace& place,
-                             const CPVT_WordPlace& oldplace) {
-  if (HasFlag(PES_SPELLCHECK)) {
-    m_pEdit->RefreshWordRange(CombineWordRange(GetLatinWordsRange(oldplace),
-                                               GetLatinWordsRange(place)));
-  }
-}
-
 CPVT_WordRange CPWL_Edit::CombineWordRange(const CPVT_WordRange& wr1,
                                            const CPVT_WordRange& wr2) {
   return CPVT_WordRange(std::min(wr1.BeginPos, wr2.BeginPos),
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index 2c39eff..2f21443 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -67,16 +67,6 @@
 
   void AttachFFLData(CFFL_FormFiller* pData) { m_pFormFiller = pData; }
 
-  void OnInsertWord(const CPVT_WordPlace& place,
-                    const CPVT_WordPlace& oldplace);
-  void OnInsertReturn(const CPVT_WordPlace& place,
-                      const CPVT_WordPlace& oldplace);
-  void OnBackSpace(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace);
-  void OnDelete(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace);
-  void OnClear(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace);
-  void OnInsertText(const CPVT_WordPlace& place,
-                    const CPVT_WordPlace& oldplace);
-
  private:
   // In case of implementation swallow the OnKeyDown event. If the event is
   // swallowed, implementation may do other unexpected things, which is not the
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index 1bc69f3..b8e1582 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -1519,9 +1519,6 @@
   if (bPaint)
     PaintInsertText(m_wpOldCaret, m_wpCaret);
 
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnInsertWord(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
@@ -1546,9 +1543,6 @@
     SetCaretOrigin();
     SetCaretInfo();
   }
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnInsertReturn(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
@@ -1579,9 +1573,6 @@
     SetCaretOrigin();
     SetCaretInfo();
   }
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnBackSpace(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
@@ -1615,9 +1606,6 @@
     SetCaretOrigin();
     SetCaretInfo();
   }
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnDelete(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
@@ -1652,9 +1640,6 @@
     SetCaretOrigin();
     SetCaretInfo();
   }
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnClear(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
@@ -1678,9 +1663,6 @@
   if (bPaint)
     PaintInsertText(m_wpOldCaret, m_wpCaret);
 
-  if (m_pOperationNotify)
-    m_pOperationNotify->OnInsertText(m_wpCaret, m_wpOldCaret);
-
   return true;
 }
 
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index 72f98db..f96ad99 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -27,7 +27,6 @@
 #define PWS_CHILD 0x80000000L
 #define PWS_BORDER 0x40000000L
 #define PWS_BACKGROUND 0x20000000L
-#define PWS_HSCROLL 0x10000000L
 #define PWS_VSCROLL 0x08000000L
 #define PWS_VISIBLE 0x04000000L
 #define PWS_READONLY 0x01000000L
@@ -42,16 +41,13 @@
 #define PES_RIGHT 0x0008L
 #define PES_MIDDLE 0x0010L
 #define PES_TOP 0x0020L
-#define PES_BOTTOM 0x0040L
 #define PES_CENTER 0x0080L
 #define PES_CHARARRAY 0x0100L
 #define PES_AUTOSCROLL 0x0200L
 #define PES_AUTORETURN 0x0400L
 #define PES_UNDO 0x0800L
 #define PES_RICH 0x1000L
-#define PES_SPELLCHECK 0x2000L
 #define PES_TEXTOVERFLOW 0x4000L
-#define PES_NOREAD 0x8000L
 
 // listbox styles
 #define PLBS_MULTIPLESEL 0x0001L