From f51a02a29e10fcc490ba28f44d43f50104f940ed Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 19 Apr 2017 12:46:53 -0400 Subject: Cleanup codepage and charset definitions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Nicolás Peña Reviewed-by: Nicolás Peña --- fpdfsdk/pdfwindow/PWL_Edit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_Edit.cpp') diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 1212d7f853..b1285a8428 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -460,7 +460,7 @@ void CPWL_Edit::OnKillFocus() { ShowVScrollBar(false); m_pEdit->SelectNone(); SetCaret(false, CFX_PointF(), CFX_PointF()); - SetCharSet(FXFONT_ANSI_CHARSET); + SetCharSet(FX_CHARSET_ANSI); m_bFocus = false; } @@ -569,7 +569,7 @@ void CPWL_Edit::SetLimitChar(int32_t nLimitChar) { void CPWL_Edit::ReplaceSel(const CFX_WideString& wsText) { m_pEdit->Clear(); - m_pEdit->InsertText(wsText, FXFONT_DEFAULT_CHARSET); + m_pEdit->InsertText(wsText, FX_CHARSET_Default); } CFX_FloatRect CPWL_Edit::GetFocusRect() const { @@ -714,7 +714,7 @@ bool CPWL_Edit::OnChar(uint16_t nChar, uint32_t nFlag) { if (IPVT_FontMap* pFontMap = GetFontMap()) { int32_t nOldCharSet = GetCharSet(); int32_t nNewCharSet = - pFontMap->CharSetFromUnicode(nChar, FXFONT_DEFAULT_CHARSET); + pFontMap->CharSetFromUnicode(nChar, FX_CHARSET_Default); if (nOldCharSet != nNewCharSet) { SetCharSet(nNewCharSet); } -- cgit v1.2.3