summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_Edit.cpp
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-09-19 07:24:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-19 07:24:33 -0700
commitea3c3be83dae12ef682c68fc7cf906d790fd9f84 (patch)
treecdaca6bc4a4b9de627e45b90c64d4bd197fd8940 /fpdfsdk/pdfwindow/PWL_Edit.cpp
parent2f8568ef91156d2deb8411c427fbb52f880ccc34 (diff)
downloadpdfium-ea3c3be83dae12ef682c68fc7cf906d790fd9f84.tar.xz
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
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Edit.cpp')
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 4b115d345b..bd9d3aac61 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -15,6 +15,7 @@
#include "core/fxge/include/cfx_graphstatedata.h"
#include "core/fxge/include/cfx_pathdata.h"
#include "core/fxge/include/cfx_renderdevice.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_EditCtrl.h"
@@ -564,7 +565,7 @@ void CPWL_Edit::SetLimitChar(int32_t nLimitChar) {
void CPWL_Edit::ReplaceSel(const CFX_WideString& wsText) {
m_pEdit->Clear();
- m_pEdit->InsertText(wsText, DEFAULT_CHARSET);
+ m_pEdit->InsertText(wsText, FXFONT_DEFAULT_CHARSET);
}
CFX_FloatRect CPWL_Edit::GetFocusRect() const {
@@ -708,7 +709,8 @@ FX_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, DEFAULT_CHARSET);
+ int32_t nNewCharSet =
+ pFontMap->CharSetFromUnicode(nChar, FXFONT_DEFAULT_CHARSET);
if (nOldCharSet != nNewCharSet) {
SetCharSet(nNewCharSet);
}