summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 12:46:53 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 17:08:38 +0000
commitf51a02a29e10fcc490ba28f44d43f50104f940ed (patch)
tree354215ff5deeea419ce5a88b369535b5e4468a62 /fpdfsdk/formfiller
parent2a473dbecab2b47c513de9127a2cddf4c2800306 (diff)
downloadpdfium-f51a02a29e10fcc490ba28f44d43f50104f940ed.tar.xz
Cleanup codepage and charset definitions.
This Cl cleans up the unused defines in fx_codepage.h. The FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this moves fx_codepage into core instead of xfa only. Static asserts are added to verify the public/ charsets match the fx_codepage charsets. Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96 Reviewed-on: https://pdfium-review.googlesource.com/4316 Commit-Queue: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp10
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.cpp2
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 1c380e59c1..30f25d49cc 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -42,7 +42,7 @@ void CBA_FontMap::Reset() {
}
void CBA_FontMap::Initialize() {
- int32_t nCharset = FXFONT_DEFAULT_CHARSET;
+ int32_t nCharset = FX_CHARSET_Default;
if (!m_pDefaultFont) {
m_pDefaultFont = GetAnnotDefaultFont(&m_sDefaultFontName);
@@ -54,16 +54,16 @@ void CBA_FontMap::Initialize() {
m_sDefaultFontName == "Wingdings2" ||
m_sDefaultFontName == "Wingdings3" ||
m_sDefaultFontName == "Webdings")
- nCharset = FXFONT_SYMBOL_CHARSET;
+ nCharset = FX_CHARSET_Symbol;
else
- nCharset = FXFONT_ANSI_CHARSET;
+ nCharset = FX_CHARSET_ANSI;
}
AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset);
AddFontToAnnotDict(m_pDefaultFont, m_sDefaultFontName);
}
}
- if (nCharset != FXFONT_ANSI_CHARSET)
+ if (nCharset != FX_CHARSET_ANSI)
CPWL_FontMap::Initialize();
}
@@ -77,7 +77,7 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont,
m_pDefaultFont = pFont;
m_sDefaultFontName = sFontName;
- int32_t nCharset = FXFONT_DEFAULT_CHARSET;
+ int32_t nCharset = FX_CHARSET_Default;
if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->GetSubstFont())
nCharset = pSubstFont->m_Charset;
AddFontData(m_pDefaultFont, m_sDefaultFontName, nCharset);
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 7a6d497ad2..ef05a883c9 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -267,7 +267,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
return;
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
- pEdit->SetCharSet(FXFONT_GB2312_CHARSET);
+ pEdit->SetCharSet(FX_CHARSET_ChineseSimplified);
pEdit->SetReadyToInput();
CFX_WideString wsText = pEdit->GetText();
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 19a87d04ae..71fc9291dc 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -275,7 +275,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) {
return;
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
- pEdit->SetCharSet(FXFONT_GB2312_CHARSET);
+ pEdit->SetCharSet(FX_CHARSET_ChineseSimplified);
pEdit->SetReadyToInput();
CFX_WideString wsText = pEdit->GetText();