Remove unused method CPWL_Edit::SetCharSpace()

In turn, CPWL_EditImpl::SetCharSpace() becomes unused.
In turn, CPVT_VariableText::SetCharSpace() becomes unused.
In turn, CPVT_VariableText::m_fCharSpace is always 0.0.
In turn, CPVT_VariableText::GetCharSpace() is 0.0 and removed.
In turn, CPWL_EditImpl::GetCharSpace() is 0.0 and removed.
In turn, the fCharSpace arg to GetWordWidth() is 0.0 and removed.
In turn, kSetCharacterSpacingOperator becomes unused.

Change-Id: I6e66e6c4a4d7a714005caa363908f4e9ba2f40b4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/85275
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpvt_section.cpp b/core/fpdfdoc/cpvt_section.cpp
index 3c73de2..4975316 100644
--- a/core/fpdfdoc/cpvt_section.cpp
+++ b/core/fpdfdoc/cpvt_section.cpp
@@ -572,9 +572,9 @@
             std::max(fLineAscent, m_pVT->GetWordAscent(*pWord, fFontSize));
         fLineDescent =
             std::min(fLineDescent, m_pVT->GetWordDescent(*pWord, fFontSize));
-        fWordWidth = m_pVT->GetWordWidth(
-            pWord->nFontIndex, pWord->Word, m_pVT->GetSubWord(),
-            m_pVT->GetCharSpace(), fFontSize, pWord->fWordTail);
+        fWordWidth = m_pVT->GetWordWidth(pWord->nFontIndex, pWord->Word,
+                                         m_pVT->GetSubWord(), fFontSize,
+                                         pWord->fWordTail);
       }
       if (!bOpened) {
         if (IsOpenStylePunctuation(pWord->Word)) {
diff --git a/core/fpdfdoc/cpvt_variabletext.cpp b/core/fpdfdoc/cpvt_variabletext.cpp
index 2bf1aac..f453543 100644
--- a/core/fpdfdoc/cpvt_variabletext.cpp
+++ b/core/fpdfdoc/cpvt_variabletext.cpp
@@ -578,16 +578,15 @@
 float CPVT_VariableText::GetWordWidth(int32_t nFontIndex,
                                       uint16_t Word,
                                       uint16_t SubWord,
-                                      float fCharSpace,
                                       float fFontSize,
                                       float fWordTail) const {
   return GetCharWidth(nFontIndex, Word, SubWord) * fFontSize * kFontScale +
-         fCharSpace + fWordTail;
+         fWordTail;
 }
 
 float CPVT_VariableText::GetWordWidth(const CPVT_WordInfo& WordInfo) const {
   return GetWordWidth(WordInfo.nFontIndex, WordInfo.Word, GetSubWord(),
-                      GetCharSpace(), GetWordFontSize(), WordInfo.fWordTail);
+                      GetWordFontSize(), WordInfo.fWordTail);
 }
 
 float CPVT_VariableText::GetLineAscent() {
diff --git a/core/fpdfdoc/cpvt_variabletext.h b/core/fpdfdoc/cpvt_variabletext.h
index 029bc19..271151c 100644
--- a/core/fpdfdoc/cpvt_variabletext.h
+++ b/core/fpdfdoc/cpvt_variabletext.h
@@ -79,7 +79,6 @@
   void SetAlignment(int32_t nFormat) { m_nAlignment = nFormat; }
   void SetPasswordChar(uint16_t wSubWord) { m_wSubWord = wSubWord; }
   void SetLimitChar(int32_t nLimitChar) { m_nLimitChar = nLimitChar; }
-  void SetCharSpace(float fCharSpace) { m_fCharSpace = fCharSpace; }
   void SetMultiLine(bool bMultiLine) { m_bMultiLine = bMultiLine; }
   void SetAutoReturn(bool bAuto) { m_bLimitWidth = bAuto; }
   void SetFontSize(float fFontSize) { m_fFontSize = fFontSize; }
@@ -107,7 +106,6 @@
   int32_t GetCharArray() const { return m_nCharArray; }
   int32_t GetLimitChar() const { return m_nLimitChar; }
   bool IsMultiLine() const { return m_bMultiLine; }
-  float GetCharSpace() const { return m_fCharSpace; }
   bool IsAutoReturn() const { return m_bLimitWidth; }
 
   CPVT_WordPlace GetBeginWordPlace() const;
@@ -149,7 +147,6 @@
   float GetWordWidth(int32_t nFontIndex,
                      uint16_t Word,
                      uint16_t SubWord,
-                     float fCharSpace,
                      float fFontSize,
                      float fWordTail) const;
   float GetWordAscent(const CPVT_WordInfo& WordInfo) const;
@@ -196,7 +193,6 @@
   int32_t m_nCharArray = 0;
   int32_t m_nAlignment = 0;
   float m_fLineLeading = 0.0f;
-  float m_fCharSpace = 0.0f;
   float m_fFontSize = 0.0f;
   std::vector<std::unique_ptr<CPVT_Section>> m_SectionArray;
   UnownedPtr<Provider> m_pVTProvider;
diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp
index b1edb0e..c3fd4fb 100644
--- a/fpdfsdk/cpdfsdk_appstream.cpp
+++ b/fpdfsdk/cpdfsdk_appstream.cpp
@@ -64,7 +64,6 @@
 const char kMarkedSequenceEndOperator[] = "EMC";
 const char kMoveTextPositionOperator[] = "Td";
 const char kMoveToOperator[] = "m";
-const char kSetCharacterSpacingOperator[] = "Tc";
 const char kSetCMYKOperator[] = "k";
 const char kSetCMKYStrokedOperator[] = "K";
 const char kSetDashOperator[] = "d";
@@ -676,13 +675,8 @@
 
   std::ostringstream sAppStream;
   if (sEditStream.tellp() > 0) {
-    float fCharSpace = pEdit->GetCharSpace();
-    if (!FXSYS_IsFloatZero(fCharSpace))
-      sAppStream << fCharSpace << " " << kSetCharacterSpacingOperator << "\n";
-
     sAppStream << sEditStream.str();
   }
-
   return ByteString(sAppStream);
 }
 
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index 22a1d94..1fe7e62 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -256,11 +256,6 @@
   m_bFocus = false;
 }
 
-void CPWL_Edit::SetCharSpace(float fCharSpace) {
-  m_pEditImpl->SetCharSpace(fCharSpace);
-  m_pEditImpl->Paint();
-}
-
 CPVT_WordRange CPWL_Edit::GetSelectWordRange() const {
   if (!m_pEditImpl->IsSelected())
     return CPVT_WordRange();
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index 41698c2..28dbc81 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -84,7 +84,6 @@
   void SetAlignFormatVerticalCenter();
   void SetCharArray(int32_t nCharArray);
   void SetLimitChar(int32_t nLimitChar);
-  void SetCharSpace(float fCharSpace);
   bool CanSelectAll() const;
   bool CanCopy() const;
   bool CanCut() const;
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index 2efa89b..a1a82ee 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -586,7 +586,7 @@
                              const CPVT_WordRange* pRange,
                              IPWL_SystemHandler* pSystemHandler,
                              IPWL_SystemHandler::PerWindowData* pSystemData) {
-  const bool bContinuous = GetCharArray() == 0 && GetCharSpace() <= 0.0f;
+  const bool bContinuous = GetCharArray() == 0;
   uint16_t SubWord = GetPasswordChar();
   float fFontSize = GetFontSize();
   CPVT_WordRange wrSelect = GetSelectWordRange();
@@ -741,10 +741,6 @@
   m_pVT->SetCharArray(nCharArray);
 }
 
-void CPWL_EditImpl::SetCharSpace(float fCharSpace) {
-  m_pVT->SetCharSpace(fCharSpace);
-}
-
 void CPWL_EditImpl::SetMultiLine(bool bMultiLine) {
   m_pVT->SetMultiLine(bMultiLine);
 }
@@ -939,10 +935,6 @@
   return VTToEdit(m_pVT->GetContentRect());
 }
 
-float CPWL_EditImpl::GetCharSpace() const {
-  return m_pVT->GetCharSpace();
-}
-
 CPVT_WordRange CPWL_EditImpl::GetWholeWordRange() const {
   if (m_pVT->IsValid())
     return CPVT_WordRange(m_pVT->GetBeginWordPlace(), m_pVT->GetEndWordPlace());
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.h b/fpdfsdk/pwl/cpwl_edit_impl.h
index 88405d5..afb9fae 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.h
+++ b/fpdfsdk/pwl/cpwl_edit_impl.h
@@ -77,7 +77,6 @@
   // Set the maximum number of words in the text.
   void SetLimitChar(int32_t nLimitChar);
   void SetCharArray(int32_t nCharArray);
-  void SetCharSpace(float fCharSpace);
   void SetMultiLine(bool bMultiLine);
   void SetAutoReturn(bool bAuto);
   void SetAutoFontSize(bool bAuto);
@@ -114,7 +113,6 @@
   int32_t GetCharArray() const;
   CFX_FloatRect GetContentRect() const;
   WideString GetRangeText(const CPVT_WordRange& range) const;
-  float GetCharSpace() const;
   void SetSelection(int32_t nStartChar, int32_t nEndChar);
   std::pair<int32_t, int32_t> GetSelection() const;
   void SelectAll();