diff options
author | thestig <thestig@chromium.org> | 2016-06-21 14:38:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-21 14:38:28 -0700 |
commit | 907a5223ea5abd09878de20cc74c59ebd0d6c3c8 (patch) | |
tree | 7dba8b090eda4f65da57d1979bdb02cedd273055 /fpdfsdk/pdfwindow | |
parent | 56a8b1944d555ed65dda97164b702a9a657485ca (diff) | |
download | pdfium-907a5223ea5abd09878de20cc74c59ebd0d6c3c8.tar.xz |
Use FXFONT defines in place of integers.
Fix nits along the way.
Review-Url: https://codereview.chromium.org/2083943003
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Edit.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_FontMap.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 21d4b033ab..e7a4ac9dd3 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -464,7 +464,7 @@ void CPWL_Edit::OnKillFocus() { m_pEdit->SelectNone(); SetCaret(FALSE, CFX_FloatPoint(0.0f, 0.0f), CFX_FloatPoint(0.0f, 0.0f)); - SetCharSet(0); + SetCharSet(FXFONT_ANSI_CHARSET); if (!IsReadOnly()) { if (IPWL_FocusHandler* pFocusHandler = GetFocusHandler()) diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp index d4eab01cfd..e810ec6a8c 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp @@ -281,10 +281,10 @@ CFX_ByteString CPWL_FontMap::GetNativeFont(int32_t nCharset) { CFX_ByteString sFontName = GetDefaultFontByCharset(nCharset); if (m_pSystemHandler) { - if (m_pSystemHandler->FindNativeTrueTypeFont(nCharset, sFontName)) + if (m_pSystemHandler->FindNativeTrueTypeFont(sFontName)) return sFontName; - sFontName = ""; + sFontName.clear(); } return sFontName; } @@ -437,8 +437,6 @@ CFX_ByteString CPWL_FontMap::GetDefaultFontByCharset(int32_t nCharset) { } int32_t CPWL_FontMap::CharSetFromUnicode(uint16_t word, int32_t nOldCharset) { - if (m_pSystemHandler && (-1 != m_pSystemHandler->GetCharSet())) - return m_pSystemHandler->GetCharSet(); // to avoid CJK Font to show ASCII if (word < 0x7F) return ANSI_CHARSET; |