Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: core/fpdfdoc/doc_form.cpp

Issue 2083943003: Use FXFONT defines in place of integers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpvt_wordinfo.h ('k') | core/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_form.cpp
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index b2c5d8cdf7d1c3ab0548602de1f921c02c02be8e..82fcd4ceebf2f019fd0bfddf059878fe07e4d811 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -416,12 +416,11 @@ CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont) {
CFX_ByteString csFontName;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
LOGFONTA lf = {};
- FX_BOOL bRet;
if (charSet == ANSI_CHARSET) {
csFontName = "Helvetica";
return csFontName;
}
- bRet = FALSE;
+ FX_BOOL bRet = FALSE;
if (charSet == SHIFTJIS_CHARSET) {
bRet = RetrieveSpecificFont(charSet, DEFAULT_PITCH | FF_DONTCARE,
"MS Mincho", lf);
@@ -454,14 +453,16 @@ CFX_ByteString CPDF_InterForm::GetNativeFont(uint8_t charSet, void* pLogFont) {
#endif
return csFontName;
}
+
CFX_ByteString CPDF_InterForm::GetNativeFont(void* pLogFont) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- uint8_t charSet = GetNativeCharSet();
- return GetNativeFont(charSet, pLogFont);
+ return GetNativeFont(GetNativeCharSet(), pLogFont);
#else
return CFX_ByteString();
#endif
}
+
+// static
uint8_t CPDF_InterForm::GetNativeCharSet() {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
uint8_t charSet = ANSI_CHARSET;
« no previous file with comments | « core/fpdfdoc/cpvt_wordinfo.h ('k') | core/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698