summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
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/fxedit
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/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp4
-rw-r--r--fpdfsdk/fxedit/include/fx_edit.h4
2 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 4967961cfa..528a0ba061 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -633,7 +633,7 @@ void CFXEU_Clear::Undo() {
if (m_pEdit) {
m_pEdit->SelectNone();
m_pEdit->SetCaret(m_wrSel.BeginPos);
- m_pEdit->InsertText(m_swText, DEFAULT_CHARSET, FALSE, TRUE);
+ m_pEdit->InsertText(m_swText, FXFONT_DEFAULT_CHARSET, FALSE, TRUE);
m_pEdit->SetSel(m_wrSel.BeginPos, m_wrSel.EndPos);
}
}
@@ -1271,7 +1271,7 @@ CPVT_WordRange CFX_Edit::GetSelectWordRange() const {
void CFX_Edit::SetText(const CFX_WideString& sText) {
Empty();
- DoInsertText(CPVT_WordPlace(0, 0, -1), sText, DEFAULT_CHARSET);
+ DoInsertText(CPVT_WordPlace(0, 0, -1), sText, FXFONT_DEFAULT_CHARSET);
Paint();
}
diff --git a/fpdfsdk/fxedit/include/fx_edit.h b/fpdfsdk/fxedit/include/fx_edit.h
index 4ae6ec2a6c..e460416e18 100644
--- a/fpdfsdk/fxedit/include/fx_edit.h
+++ b/fpdfsdk/fxedit/include/fx_edit.h
@@ -15,10 +15,6 @@ class IPVT_FontMap;
(u == 0x2D || (u <= 0x005A && u >= 0x0041) || \
(u <= 0x007A && u >= 0x0061) || (u <= 0x02AF && u >= 0x00C0))
-#ifndef DEFAULT_CHARSET
-#define DEFAULT_CHARSET 1
-#endif
-
CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap,
int32_t nFontIndex,
uint16_t Word,