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

Unified Diff: fpdfsdk/javascript/color.cpp

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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/javascript/color.h ('k') | fpdfsdk/javascript/console.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/color.cpp
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp
index f77d5481dd3a76b94b4d15567c5bd1152c91b459..882a9035e8790858da238032e117ce23e57d5199 100644
--- a/fpdfsdk/javascript/color.cpp
+++ b/fpdfsdk/javascript/color.cpp
@@ -134,8 +134,8 @@ void color::ConvertArrayToPWLColor(CJS_Runtime* pRuntime,
}
#define JS_IMPLEMENT_COLORPROP(prop, var) \
- FX_BOOL color::prop(IJS_Context* cc, CJS_PropValue& vp, \
- CFX_WideString& sError) { \
+ bool color::prop(IJS_Context* cc, CJS_PropValue& vp, \
+ CFX_WideString& sError) { \
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc); \
CJS_Array array; \
if (vp.IsGetting()) { \
@@ -143,10 +143,10 @@ void color::ConvertArrayToPWLColor(CJS_Runtime* pRuntime,
vp << array; \
} else { \
if (!vp.GetJSValue()->ConvertToArray(pRuntime, array)) \
- return FALSE; \
+ return false; \
ConvertArrayToPWLColor(pRuntime, array, &var); \
} \
- return TRUE; \
+ return true; \
}
JS_IMPLEMENT_COLORPROP(transparent, m_crTransparent)
@@ -162,18 +162,18 @@ JS_IMPLEMENT_COLORPROP(dkGray, m_crDKGray)
JS_IMPLEMENT_COLORPROP(gray, m_crGray)
JS_IMPLEMENT_COLORPROP(ltGray, m_crLTGray)
-FX_BOOL color::convert(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+bool color::convert(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
int iSize = params.size();
if (iSize < 2)
- return FALSE;
+ return false;
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
CJS_Array aSource;
if (!params[0].ConvertToArray(pRuntime, aSource))
- return FALSE;
+ return false;
CPWL_Color crSource;
ConvertArrayToPWLColor(pRuntime, aSource, &crSource);
@@ -197,23 +197,23 @@ FX_BOOL color::convert(IJS_Context* cc,
ConvertPWLColorToArray(pRuntime, crDest, &aDest);
vRet = CJS_Value(pRuntime, aDest);
- return TRUE;
+ return true;
}
-FX_BOOL color::equal(IJS_Context* cc,
- const std::vector<CJS_Value>& params,
- CJS_Value& vRet,
- CFX_WideString& sError) {
+bool color::equal(IJS_Context* cc,
+ const std::vector<CJS_Value>& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError) {
if (params.size() < 2)
- return FALSE;
+ return false;
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
CJS_Array array1;
CJS_Array array2;
if (!params[0].ConvertToArray(pRuntime, array1))
- return FALSE;
+ return false;
if (!params[1].ConvertToArray(pRuntime, array2))
- return FALSE;
+ return false;
CPWL_Color color1;
CPWL_Color color2;
@@ -221,5 +221,5 @@ FX_BOOL color::equal(IJS_Context* cc,
ConvertArrayToPWLColor(pRuntime, array2, &color2);
color1.ConvertColorType(color2.nColorType);
vRet = CJS_Value(pRuntime, color1 == color2);
- return TRUE;
+ return true;
}
« no previous file with comments | « fpdfsdk/javascript/color.h ('k') | fpdfsdk/javascript/console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698