From ea3c3be83dae12ef682c68fc7cf906d790fd9f84 Mon Sep 17 00:00:00 2001 From: npm Date: Mon, 19 Sep 2016 07:24:33 -0700 Subject: Remove duplicated charset definitions, and move them to fx_font.h PWL_FontMap does not need its own charset definitions. fx_edit.h does not need to define DEFAULT_CHARSET. XFA have their own definitions. They look different in that most are MAC or MSWin charset definitions. So they are left untouched. public/fpdf_sysfontinfo.h duplicate ones were left untouched due to being in public folder. Review-Url: https://codereview.chromium.org/2347313002 --- fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_EditCtrl.cpp') diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp index 9d8b16a53c..2ec88cb15e 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp @@ -8,6 +8,7 @@ #include "core/fpdfdoc/include/cpvt_section.h" #include "core/fpdfdoc/include/cpvt_word.h" +#include "core/fxge/include/fx_font.h" #include "fpdfsdk/fxedit/include/fxet_edit.h" #include "fpdfsdk/pdfwindow/PWL_Caret.h" #include "fpdfsdk/pdfwindow/PWL_FontMap.h" @@ -20,7 +21,7 @@ CPWL_EditCtrl::CPWL_EditCtrl() : m_pEdit(new CFX_Edit), m_pEditCaret(nullptr), m_bMouseDown(FALSE), - m_nCharSet(DEFAULT_CHARSET), + m_nCharSet(FXFONT_DEFAULT_CHARSET), m_nCodePage(0) {} CPWL_EditCtrl::~CPWL_EditCtrl() {} @@ -476,7 +477,7 @@ void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow) {} void CPWL_EditCtrl::InsertText(const CFX_WideString& wsText) { if (!IsReadOnly()) - m_pEdit->InsertText(wsText, DEFAULT_CHARSET); + m_pEdit->InsertText(wsText, FXFONT_DEFAULT_CHARSET); } void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) { @@ -567,7 +568,7 @@ void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) { } int32_t CPWL_EditCtrl::GetCharSet() const { - return m_nCharSet < 0 ? DEFAULT_CHARSET : m_nCharSet; + return m_nCharSet < 0 ? FXFONT_DEFAULT_CHARSET : m_nCharSet; } void CPWL_EditCtrl::GetTextRange(const CFX_FloatRect& rect, -- cgit v1.2.3