[xfa] Remove some arguments that are always kDefANSI

Change-Id: I1d0a7b61d13b20469e174897aa64a9ba2c745b8d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93792
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fwl/theme/cfwl_fontmanager.cpp b/xfa/fwl/theme/cfwl_fontmanager.cpp
index be7106b..ebf48e0 100644
--- a/xfa/fwl/theme/cfwl_fontmanager.cpp
+++ b/xfa/fwl/theme/cfwl_fontmanager.cpp
@@ -8,6 +8,7 @@
 
 #include <utility>
 
+#include "core/fxcrt/fx_codepage.h"
 #include "xfa/fgas/font/cfgas_gefont.h"
 
 namespace {
@@ -34,14 +35,13 @@
 CFWL_FontManager::~CFWL_FontManager() = default;
 
 RetainPtr<CFGAS_GEFont> CFWL_FontManager::FindFont(WideStringView wsFontFamily,
-                                                   uint32_t dwFontStyles,
-                                                   FX_CodePage wCodePage) {
+                                                   uint32_t dwFontStyles) {
   for (const auto& pData : m_FontsArray) {
-    if (pData->Equal(wsFontFamily, dwFontStyles, wCodePage))
+    if (pData->Equal(wsFontFamily, dwFontStyles))
       return pData->GetFont();
   }
   auto pFontData = std::make_unique<FontData>();
-  if (!pFontData->LoadFont(wsFontFamily, dwFontStyles, wCodePage))
+  if (!pFontData->LoadFont(wsFontFamily, dwFontStyles))
     return nullptr;
 
   m_FontsArray.push_back(std::move(pFontData));
@@ -53,22 +53,18 @@
 CFWL_FontManager::FontData::~FontData() = default;
 
 bool CFWL_FontManager::FontData::Equal(WideStringView wsFontFamily,
-                                       uint32_t dwFontStyles,
-                                       FX_CodePage wCodePage) {
-  return m_wsFamily == wsFontFamily && m_dwStyles == dwFontStyles &&
-         m_dwCodePage == wCodePage;
+                                       uint32_t dwFontStyles) {
+  return m_wsFamily == wsFontFamily && m_dwStyles == dwFontStyles;
 }
 
 bool CFWL_FontManager::FontData::LoadFont(WideStringView wsFontFamily,
-                                          uint32_t dwFontStyles,
-                                          FX_CodePage dwCodePage) {
+                                          uint32_t dwFontStyles) {
   m_wsFamily = wsFontFamily;
   m_dwStyles = dwFontStyles;
-  m_dwCodePage = dwCodePage;
 
   // TODO(tsepez): check usage of c_str() below.
   m_pFont = CFGAS_GEFont::LoadFont(wsFontFamily.unterminated_c_str(),
-                                   dwFontStyles, dwCodePage);
+                                   dwFontStyles, FX_CodePage::kDefANSI);
   return !!m_pFont;
 }
 
diff --git a/xfa/fwl/theme/cfwl_fontmanager.h b/xfa/fwl/theme/cfwl_fontmanager.h
index bf60f49..36162ce 100644
--- a/xfa/fwl/theme/cfwl_fontmanager.h
+++ b/xfa/fwl/theme/cfwl_fontmanager.h
@@ -12,7 +12,6 @@
 #include <memory>
 #include <vector>
 
-#include "core/fxcrt/fx_codepage.h"
 #include "core/fxcrt/retain_ptr.h"
 #include "core/fxcrt/widestring.h"
 
@@ -24,8 +23,7 @@
   static void DestroyInstance();
 
   RetainPtr<CFGAS_GEFont> FindFont(WideStringView wsFontFamily,
-                                   uint32_t dwFontStyles,
-                                   FX_CodePage dwCodePage);
+                                   uint32_t dwFontStyles);
 
  private:
   class FontData final {
@@ -33,18 +31,14 @@
     FontData();
     ~FontData();
 
-    bool Equal(WideStringView wsFontFamily,
-               uint32_t dwFontStyles,
-               FX_CodePage wCodePage);
-    bool LoadFont(WideStringView wsFontFamily,
-                  uint32_t dwFontStyles,
-                  FX_CodePage wCodePage);
+    bool Equal(WideStringView wsFontFamily, uint32_t dwFontStyles);
+    bool LoadFont(WideStringView wsFontFamily, uint32_t dwFontStyles);
+
     RetainPtr<CFGAS_GEFont> GetFont() const;
 
    private:
     WideString m_wsFamily;
     uint32_t m_dwStyles = 0;
-    FX_CodePage m_dwCodePage = FX_CodePage::kDefANSI;
     RetainPtr<CFGAS_GEFont> m_pFont;
   };
 
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index b49fda6..7220296 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -78,8 +78,7 @@
   if (m_pTextOut)
     return;
 
-  m_pFGASFont = CFWL_FontManager::GetInstance()->FindFont(
-      L"Helvetica", 0, FX_CodePage::kDefANSI);
+  m_pFGASFont = CFWL_FontManager::GetInstance()->FindFont(L"Helvetica", 0);
   m_pTextOut = std::make_unique<CFDE_TextOut>();
   m_pTextOut->SetFont(m_pFGASFont);
   m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize);