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/fxedit/fxet_edit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/fxedit') diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp index 7e2cf04b3f..5b84c9b95e 100644 --- a/fpdfsdk/fxedit/fxet_edit.cpp +++ b/fpdfsdk/fxedit/fxet_edit.cpp @@ -21,6 +21,7 @@ #include "core/fpdfdoc/cpvt_section.h" #include "core/fpdfdoc/cpvt_word.h" #include "core/fpdfdoc/ipvt_fontmap.h" +#include "core/fxcrt/fx_codepage.h" #include "core/fxge/cfx_graphstatedata.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" @@ -476,7 +477,7 @@ void CFXEU_Clear::Undo() { if (m_pEdit) { m_pEdit->SelectNone(); m_pEdit->SetCaret(m_wrSel.BeginPos); - m_pEdit->InsertText(m_swText, FXFONT_DEFAULT_CHARSET, false, true); + m_pEdit->InsertText(m_swText, FX_CHARSET_Default, false, true); m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos); } } @@ -1027,7 +1028,7 @@ CPVT_WordRange CFX_Edit::GetSelectWordRange() const { void CFX_Edit::SetText(const CFX_WideString& sText) { Empty(); - DoInsertText(CPVT_WordPlace(0, 0, -1), sText, FXFONT_DEFAULT_CHARSET); + DoInsertText(CPVT_WordPlace(0, 0, -1), sText, FX_CHARSET_Default); Paint(); } -- cgit v1.2.3