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

Unified Diff: fpdfsdk/src/pdfwindow/PWL_FontMap.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 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 | « fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Icon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 84b8c94363c13d6e9a7d78414321990b2e5fdf8c..76508e2fa7918681ad5e90307f3563923e6f44a2 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -72,7 +72,7 @@ CFX_ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex)
return "";
}
-FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
+bool CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
{
if (nFontIndex >=0 && nFontIndex < m_aData.GetSize())
{
@@ -82,7 +82,7 @@ FX_BOOL CPWL_FontMap::KnowWord(int32_t nFontIndex, FX_WORD word)
}
}
- return FALSE;
+ return false;
}
int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t nFontIndex)
@@ -110,14 +110,14 @@ int32_t CPWL_FontMap::GetWordFontIndex(FX_WORD word, int32_t nCharset, int32_t n
int32_t nNewFontIndex = -1;
- nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, TRUE);
+ nNewFontIndex = GetFontIndex(GetNativeFontName(nCharset), nCharset, true);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
return nNewFontIndex;
}
- nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, FALSE);
+ nNewFontIndex = GetFontIndex("Arial Unicode MS", DEFAULT_CHARSET, false);
if (nNewFontIndex >= 0)
{
if (KnowWord(nNewFontIndex, word))
@@ -199,7 +199,7 @@ void CPWL_FontMap::Initial(const FX_CHAR* fontname)
if (sFontName.IsEmpty())
sFontName = DEFAULT_FONT_NAME;
- GetFontIndex(sFontName, ANSI_CHARSET, FALSE);
+ GetFontIndex(sFontName, ANSI_CHARSET, false);
}
@@ -216,15 +216,15 @@ const char* g_sDEStandardFontName[] = {"Courier", "Courier-Bold", "Courier-BoldO
"Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic",
"Symbol", "ZapfDingbats"};
-FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
+bool CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName)
{
for (int32_t i=0; i<14; i++)
{
if (sFontName == g_sDEStandardFontName[i])
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset)
@@ -244,7 +244,7 @@ int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, int32_t nCharset
return -1;
}
-int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, FX_BOOL bFind)
+int32_t CPWL_FontMap::GetFontIndex(const CFX_ByteString& sFontName, int32_t nCharset, bool bFind)
{
int32_t nFontIndex = FindFont(EncodeFontAlias(sFontName, nCharset), nCharset);
if (nFontIndex >= 0) return nFontIndex;
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_Icon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698