Remove spellchecking code from XFA

The existing code for spellchecking is non-functional and we are not
planning on fixing/finishing it, so removing it, since it currently is
marking everything as misspelt.

BUG=pdfium:1054

Change-Id: I23aaa13c09aed483376d7d06f47fdf31d890786b
Reviewed-on: https://pdfium-review.googlesource.com/29790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index b4e83a4..6dc1de3 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1904,8 +1904,6 @@
       "xfa/fwl/cfwl_edit.h",
       "xfa/fwl/cfwl_event.cpp",
       "xfa/fwl/cfwl_event.h",
-      "xfa/fwl/cfwl_eventcheckword.cpp",
-      "xfa/fwl/cfwl_eventcheckword.h",
       "xfa/fwl/cfwl_eventmouse.cpp",
       "xfa/fwl/cfwl_eventmouse.h",
       "xfa/fwl/cfwl_eventscroll.cpp",
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index ddd460d..7185044 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -120,16 +120,6 @@
   return pFormFillEnv ? pFormFillEnv->GetPageView(pPage, true) : nullptr;
 }
 
-#ifdef PDF_ENABLE_XFA
-std::vector<ByteString>* FromFPDFStringHandle(FPDF_STRINGHANDLE handle) {
-  return static_cast<std::vector<ByteString>*>(handle);
-}
-
-FPDF_STRINGHANDLE ToFPDFStringHandle(std::vector<ByteString>* strings) {
-  return static_cast<FPDF_STRINGHANDLE>(strings);
-}
-#endif  // PDF_ENABLE_XFA
-
 void FFLCommon(FPDF_FORMHANDLE hHandle,
                FPDF_BITMAP bitmap,
                FPDF_RECORDER recorder,
@@ -619,98 +609,6 @@
   WideString wstr = WideString::FromUTF16LE(wsText, size);
   static_cast<CXFA_FFWidget*>(hWidget)->Paste(wstr);
 }
-
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
-                                  FPDF_WIDGET hWidget,
-                                  float x,
-                                  float y,
-                                  FPDF_BYTESTRING bsText) {
-  if (!hWidget || !document)
-    return;
-
-  CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document);
-  if (!pContext->ContainsXFAForm())
-    return;
-
-  CFX_PointF ptPopup;
-  ptPopup.x = x;
-  ptPopup.y = y;
-  ByteStringView bs(bsText);
-  static_cast<CXFA_FFWidget*>(hWidget)->ReplaceSpellCheckWord(ptPopup, bs);
-}
-
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document,
-                               FPDF_WIDGET hWidget,
-                               float x,
-                               float y,
-                               FPDF_STRINGHANDLE* stringHandle) {
-  if (!hWidget || !document)
-    return;
-
-  auto* pContext = static_cast<CPDFXFA_Context*>(document);
-  if (!pContext->ContainsXFAForm())
-    return;
-
-  CFX_PointF ptPopup;
-  ptPopup.x = x;
-  ptPopup.y = y;
-  auto sSuggestWords = pdfium::MakeUnique<std::vector<ByteString>>();
-  static_cast<CXFA_FFWidget*>(hWidget)->GetSuggestWords(ptPopup,
-                                                        sSuggestWords.get());
-
-  // Caller takes ownership.
-  *stringHandle = ToFPDFStringHandle(sSuggestWords.release());
-}
-
-FPDF_EXPORT int FPDF_CALLCONV
-FPDF_StringHandleCounts(FPDF_STRINGHANDLE sHandle) {
-  std::vector<ByteString>* sSuggestWords = FromFPDFStringHandle(sHandle);
-  return sSuggestWords ? pdfium::CollectionSize<int>(*sSuggestWords) : -1;
-}
-
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE sHandle,
-                                  int index,
-                                  FPDF_BYTESTRING bsText,
-                                  FPDF_DWORD* size) {
-  if (!sHandle || !size)
-    return false;
-
-  int count = FPDF_StringHandleCounts(sHandle);
-  if (index < 0 || index >= count)
-    return false;
-
-  std::vector<ByteString>* sSuggestWords = FromFPDFStringHandle(sHandle);
-  uint32_t len = (*sSuggestWords)[index].GetLength();
-  if (!bsText) {
-    *size = len;
-    return true;
-  }
-
-  uint32_t real_size = len < *size ? len : *size;
-  if (real_size > 0)
-    memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size);
-  *size = real_size;
-  return true;
-}
-
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle) {
-  delete FromFPDFStringHandle(stringHandle);
-}
-
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle,
-                           FPDF_BYTESTRING bsText,
-                           FPDF_DWORD size) {
-  if (!stringHandle || !bsText || size == 0)
-    return false;
-
-  FromFPDFStringHandle(stringHandle)->push_back(ByteString(bsText, size));
-  return true;
-}
 #endif  // PDF_ENABLE_XFA
 
 FPDF_EXPORT void FPDF_CALLCONV
diff --git a/fpdfsdk/fpdf_view_c_api_test.c b/fpdfsdk/fpdf_view_c_api_test.c
index d00f353..c352e69 100644
--- a/fpdfsdk/fpdf_view_c_api_test.c
+++ b/fpdfsdk/fpdf_view_c_api_test.c
@@ -233,12 +233,6 @@
     CHK(FPDF_Widget_Copy);
     CHK(FPDF_Widget_Cut);
     CHK(FPDF_Widget_Paste);
-    CHK(FPDF_Widget_ReplaceSpellCheckWord);
-    CHK(FPDF_Widget_GetSpellCheckWords);
-    CHK(FPDF_StringHandleCounts);
-    CHK(FPDF_StringHandleGetStringByIndex);
-    CHK(FPDF_StringHandleRelease);
-    CHK(FPDF_StringHandleAddString);
 #endif
 
     // fpdf_ppo.h
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index 81c0ea2..33701ef 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -1756,101 +1756,6 @@
                                                  FPDF_WIDGET hWidget,
                                                  FPDF_WIDESTRING wsText,
                                                  FPDF_DWORD size);
-/**
- * Function: FPDF_Widget_ReplaceSpellCheckWord
- *          This method will implement the spell check feature for the specified
- *xfa field.
- * Parameters:
- *          document        -   Handle to document. Returned by
- *FPDF_LoadDocument function.
- *          hWidget         -   Handle to the xfa field.
- *          x               -   The x value of the specified point.
- *          y               -   The y value of the specified point.
- *          bsText          -   The text buffer needed to be speck check, in
- *UTF-16LE format.
- * Return Value:
- *          None.
- **/
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
-                                  FPDF_WIDGET hWidget,
-                                  float x,
-                                  float y,
-                                  FPDF_BYTESTRING bsText);
-/**
- * Function: FPDF_Widget_GetSpellCheckWords
- *          This method will implement the spell check feature for the specified
- *          xfa field.
- * Parameters:
- *          document        -   Handle to document as returned by
- *                              FPDF_LoadDocument function.
- *          hWidget         -   Handle to the xfa field.
- *          x               -   The x value of the specified point.
- *          y               -   The y value of the specified point.
- *          stringHandle    -   Pointer to FPDF_STRINGHANDLE to receive the
- *                              speck check text buffer, in UTF-16LE format.
- *                              Caller must free using FPDF_StringHandleRelease.
- * Return Value:
- *          None.
- **/
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document,
-                               FPDF_WIDGET hWidget,
-                               float x,
-                               float y,
-                               FPDF_STRINGHANDLE* stringHandle);
-/**
- * Function: FPDF_StringHandleCounts
- *          This method will get the count of the text buffer.
- * Parameters:
- *          stringHandle    -   Pointer to FPDF_STRINGHANDLE.
- * Return Value:
- *          None.
- **/
-FPDF_EXPORT int FPDF_CALLCONV
-FPDF_StringHandleCounts(FPDF_STRINGHANDLE stringHandle);
-/**
- * Function: FPDF_StringHandleGetStringByIndex
- *          This method will get the specified index of the text buffer.
- * Parameters:
- *          stringHandle    -   Pointer to FPDF_STRINGHANDLE.
- *          index           -   The specified index of text buffer.
- *          bsText          -   Pointer to data buffer to receive the text
- *buffer, in UTF-16LE format.
- *          size            -   The byte size of data buffer.
- * Return Value:
- *          TRUE indicates success, otherwise FALSE.
- **/
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE stringHandle,
-                                  int index,
-                                  FPDF_BYTESTRING bsText,
-                                  FPDF_DWORD* size);
-/**
- * Function: FPDF_StringHandleRelease
- *          This method will release the FPDF_STRINGHANDLE.
- * Parameters:
- *          stringHandle    -   Pointer to FPDF_STRINGHANDLE.
- * Return Value:
- *          None.
- **/
-FPDF_EXPORT void FPDF_CALLCONV
-FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle);
-/**
- * Function: FPDF_StringHandleAddString
- *          This method will add the specified text buffer.
- * Parameters:
- *          stringHandle    -   Pointer to FPDF_STRINGHANDLE.
- *          bsText          -   Pointer to data buffer of the text buffer, in
- *UTF-16LE format.
- *          size            -   The byte size of data buffer.
- * Return Value:
- *          TRUE indicates success, otherwise FALSE.
- **/
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle,
-                           FPDF_BYTESTRING bsText,
-                           FPDF_DWORD size);
 #endif  // PDF_ENABLE_XFA
 
 #ifdef __cplusplus
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 0660eb1..62b7b88 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -56,7 +56,6 @@
 typedef void const* FPDF_PATHSEGMENT;
 
 #ifdef PDF_ENABLE_XFA
-typedef void* FPDF_STRINGHANDLE;
 typedef void* FPDF_WIDGET;
 #endif  // PDF_ENABLE_XFA
 
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 0067cab..733961e 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -19,7 +19,6 @@
 #include "xfa/fwl/cfwl_app.h"
 #include "xfa/fwl/cfwl_caret.h"
 #include "xfa/fwl/cfwl_event.h"
-#include "xfa/fwl/cfwl_eventcheckword.h"
 #include "xfa/fwl/cfwl_eventtextchanged.h"
 #include "xfa/fwl/cfwl_eventvalidate.h"
 #include "xfa/fwl/cfwl_messagekey.h"
@@ -43,23 +42,6 @@
 constexpr int kEditingModifier = FWL_KEYFLAG_Ctrl;
 #endif
 
-bool FxEditIsLatinWord(wchar_t c) {
-  return c == 0x2D || (c <= 0x005A && c >= 0x0041) ||
-         (c <= 0x007A && c >= 0x0061) || (c <= 0x02AF && c >= 0x00C0) ||
-         c == 0x0027;
-}
-
-void AddSquigglyPath(CXFA_GEPath* pPathData,
-                     float fStartX,
-                     float fEndX,
-                     float fY,
-                     float fStep) {
-  pPathData->MoveTo(CFX_PointF(fStartX, fY));
-  int i = 1;
-  for (float fx = fStartX + fStep; fx < fEndX; fx += fStep, ++i)
-    pPathData->LineTo(CFX_PointF(fx, fY + (i & 1) * fStep));
-}
-
 }  // namespace
 
 CFWL_Edit::CFWL_Edit(const CFWL_App* app,
@@ -162,80 +144,6 @@
   return FWL_WidgetHit::Unknown;
 }
 
-void CFWL_Edit::AddSpellCheckObj(CXFA_GEPath& PathData,
-                                 int32_t nStart,
-                                 int32_t nCount,
-                                 float fOffSetX,
-                                 float fOffSetY) {
-  float fStep = m_EdtEngine.GetFontSize() / 16.0f;
-  float font_ascent = m_EdtEngine.GetFontAscent();
-
-  std::vector<CFX_RectF> rects =
-      m_EdtEngine.GetCharacterRectsInRange(nStart, nCount);
-  for (const auto& rect : rects) {
-    float fY = rect.top + font_ascent + fOffSetY;
-    float fStartX = rect.left + fOffSetX;
-    float fEndX = fStartX + rect.Width();
-
-    AddSquigglyPath(&PathData, fStartX, fEndX, fY, fStep);
-  }
-}
-
-void CFWL_Edit::DrawSpellCheck(CXFA_Graphics* pGraphics,
-                               const CFX_Matrix* pMatrix) {
-  pGraphics->SaveGraphState();
-  if (pMatrix)
-    pGraphics->ConcatMatrix(pMatrix);
-
-  CFWL_EventCheckWord checkWordEvent(this);
-  ByteString sLatinWord;
-  CXFA_GEPath pathSpell;
-  int32_t nStart = 0;
-  float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
-  float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
-  WideString wsSpell = GetText();
-  int32_t nContentLen = wsSpell.GetLength();
-  for (int i = 0; i < nContentLen; i++) {
-    if (FxEditIsLatinWord(wsSpell[i])) {
-      if (sLatinWord.IsEmpty())
-        nStart = i;
-      sLatinWord += (char)wsSpell[i];
-      continue;
-    }
-    checkWordEvent.bsWord = sLatinWord;
-    checkWordEvent.bCheckWord = true;
-    DispatchEvent(&checkWordEvent);
-
-    if (!sLatinWord.IsEmpty() && !checkWordEvent.bCheckWord) {
-      AddSpellCheckObj(pathSpell, nStart, sLatinWord.GetLength(), fOffSetX,
-                       fOffSetY);
-    }
-    sLatinWord.clear();
-  }
-
-  checkWordEvent.bsWord = sLatinWord;
-  checkWordEvent.bCheckWord = true;
-  DispatchEvent(&checkWordEvent);
-
-  if (!sLatinWord.IsEmpty() && !checkWordEvent.bCheckWord) {
-    AddSpellCheckObj(pathSpell, nStart, sLatinWord.GetLength(), fOffSetX,
-                     fOffSetY);
-  }
-  if (!pathSpell.IsEmpty()) {
-    CFX_RectF rtClip = m_rtEngine;
-    CFX_Matrix mt(1, 0, 0, 1, fOffSetX, fOffSetY);
-    if (pMatrix) {
-      rtClip = pMatrix->TransformRect(rtClip);
-      mt.Concat(*pMatrix);
-    }
-    pGraphics->SetClipRect(rtClip);
-    pGraphics->SetStrokeColor(CXFA_GEColor(0xFFFF0000));
-    pGraphics->SetLineWidth(0);
-    pGraphics->StrokePath(&pathSpell, nullptr);
-  }
-  pGraphics->RestoreGraphState();
-}
-
 void CFWL_Edit::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) {
   if (!pGraphics)
     return;
@@ -249,10 +157,6 @@
     DrawTextBk(pGraphics, pTheme, &matrix);
   DrawContent(pGraphics, pTheme, &matrix);
 
-  if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) &&
-      !(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_ReadOnly)) {
-    DrawSpellCheck(pGraphics, &matrix);
-  }
   if (HasBorder())
     DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix);
 }
diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h
index 9c667f5..894315d 100644
--- a/xfa/fwl/cfwl_edit.h
+++ b/xfa/fwl/cfwl_edit.h
@@ -114,7 +114,6 @@
   void DrawContent(CXFA_Graphics* pGraphics,
                    IFWL_ThemeProvider* pTheme,
                    const CFX_Matrix* pMatrix);
-  void DrawSpellCheck(CXFA_Graphics* pGraphics, const CFX_Matrix* pMatrix);
 
   void UpdateEditEngine();
   void UpdateEditParams();
@@ -134,11 +133,6 @@
   bool ValidateNumberChar(wchar_t cNum);
   bool IsShowScrollBar(bool bVert);
   bool IsContentHeightOverflow();
-  void AddSpellCheckObj(CXFA_GEPath& PathData,
-                        int32_t nStart,
-                        int32_t nCount,
-                        float fOffSetX,
-                        float fOffSetY);
   void SetCursorPosition(size_t position);
   void UpdateCursorRect();
 
diff --git a/xfa/fwl/cfwl_event.h b/xfa/fwl/cfwl_event.h
index 01e3914..787f8c2 100644
--- a/xfa/fwl/cfwl_event.h
+++ b/xfa/fwl/cfwl_event.h
@@ -20,7 +20,6 @@
  public:
   enum class Type {
     CheckStateChanged,
-    CheckWord,
     Click,
     Close,
     EditChanged,
diff --git a/xfa/fwl/cfwl_eventcheckword.cpp b/xfa/fwl/cfwl_eventcheckword.cpp
deleted file mode 100644
index fb0ce6e..0000000
--- a/xfa/fwl/cfwl_eventcheckword.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fwl/cfwl_eventcheckword.h"
-
-CFWL_EventCheckWord::CFWL_EventCheckWord(CFWL_Widget* pSrcTarget)
-    : CFWL_Event(CFWL_Event::Type::CheckWord, pSrcTarget) {}
-
-CFWL_EventCheckWord::~CFWL_EventCheckWord() {}
diff --git a/xfa/fwl/cfwl_eventcheckword.h b/xfa/fwl/cfwl_eventcheckword.h
deleted file mode 100644
index fafe3d3..0000000
--- a/xfa/fwl/cfwl_eventcheckword.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FWL_CFWL_EVENTCHECKWORD_H_
-#define XFA_FWL_CFWL_EVENTCHECKWORD_H_
-
-#include "xfa/fwl/cfwl_event.h"
-
-class CFWL_EventCheckWord : public CFWL_Event {
- public:
-  explicit CFWL_EventCheckWord(CFWL_Widget* pSrcTarget);
-  ~CFWL_EventCheckWord() override;
-
-  ByteString bsWord;
-  bool bCheckWord;
-};
-
-#endif  // XFA_FWL_CFWL_EVENTCHECKWORD_H_
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index 51ee147..9861b52 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -10,7 +10,6 @@
 
 #include "xfa/fwl/cfwl_datetimepicker.h"
 #include "xfa/fwl/cfwl_edit.h"
-#include "xfa/fwl/cfwl_eventcheckword.h"
 #include "xfa/fwl/cfwl_eventtarget.h"
 #include "xfa/fwl/cfwl_eventtextchanged.h"
 #include "xfa/fwl/cfwl_messagekillfocus.h"
@@ -327,11 +326,6 @@
   m_pNode->ProcessEvent(GetDocView(), XFA_AttributeEnum::Full, &eParam);
 }
 
-bool CXFA_FFTextEdit::CheckWord(const ByteStringView& sWord) {
-  return sWord.IsEmpty() ||
-         m_pNode->GetFFWidgetType() != XFA_FFWidgetType::kTextEdit;
-}
-
 void CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) {
   m_pOldDelegate->OnProcessMessage(pMessage);
 }
@@ -350,12 +344,6 @@
       OnTextFull(m_pNormalWidget.get());
       break;
     }
-    case CFWL_Event::Type::CheckWord: {
-      WideString wstr(L"FWL_EVENT_DTP_SelectChanged");
-      CFWL_EventCheckWord* event = static_cast<CFWL_EventCheckWord*>(pEvent);
-      event->bCheckWord = CheckWord(event->bsWord.AsStringView());
-      break;
-    }
     default:
       break;
   }
diff --git a/xfa/fxfa/cxfa_fftextedit.h b/xfa/fxfa/cxfa_fftextedit.h
index e21bcb1d..1388db5 100644
--- a/xfa/fxfa/cxfa_fftextedit.h
+++ b/xfa/fxfa/cxfa_fftextedit.h
@@ -39,7 +39,6 @@
                      const WideString& wsChanged,
                      const WideString& wsPrevText);
   void OnTextFull(CFWL_Widget* pWidget);
-  bool CheckWord(const ByteStringView& sWord);
 
   // CXFA_FFWidget
   bool CanUndo() override;
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index f16e1ea..629f3bd 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -501,16 +501,6 @@
   return FormFieldType::kXFA;
 }
 
-void CXFA_FFWidget::GetSuggestWords(CFX_PointF pointf,
-                                    std::vector<ByteString>* pWords) {
-  pWords->clear();
-}
-
-bool CXFA_FFWidget::ReplaceSpellCheckWord(CFX_PointF pointf,
-                                          const ByteStringView& bsReplace) {
-  return false;
-}
-
 CFX_PointF CXFA_FFWidget::Rotate2Normal(const CFX_PointF& point) {
   CFX_Matrix mt = GetRotateMatrix();
   if (mt.IsIdentity())
diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h
index 2b72aa5..5098230 100644
--- a/xfa/fxfa/cxfa_ffwidget.h
+++ b/xfa/fxfa/cxfa_ffwidget.h
@@ -138,11 +138,6 @@
 
   virtual FormFieldType GetFormFieldType();
 
-  // TODO(tsepez): Implement or remove.
-  void GetSuggestWords(CFX_PointF pointf, std::vector<ByteString>* pWords);
-  bool ReplaceSpellCheckWord(CFX_PointF pointf,
-                             const ByteStringView& bsReplace);
-
   CXFA_FFPageView* GetPageView() const { return m_pPageView; }
   void SetPageView(CXFA_FFPageView* pPageView) { m_pPageView = pPageView; }
   const CFX_RectF& GetWidgetRect() const;