summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/color.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fpdfsdk/javascript/color.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/color.cpp')
-rw-r--r--fpdfsdk/javascript/color.cpp40
1 files changed, 16 insertions, 24 deletions
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp
index 7bf3cc9c6f..574c81a3c0 100644
--- a/fpdfsdk/javascript/color.cpp
+++ b/fpdfsdk/javascript/color.cpp
@@ -91,7 +91,7 @@ void color::ConvertArrayToPWLColor(CJS_Runtime* pRuntime,
CJS_Value value(pRuntime);
array.GetElement(pRuntime, 0, value);
- CFX_ByteString sSpace = value.ToCFXByteString(pRuntime);
+ ByteString sSpace = value.ToCFXByteString(pRuntime);
double d1 = 0;
double d2 = 0;
@@ -132,73 +132,65 @@ void color::ConvertArrayToPWLColor(CJS_Runtime* pRuntime,
bool color::transparent(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crTransparent);
}
bool color::black(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crBlack);
}
bool color::white(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crWhite);
}
-bool color::red(CJS_Runtime* pRuntime,
- CJS_PropValue& vp,
- CFX_WideString& sError) {
+bool color::red(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crRed);
}
bool color::green(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crGreen);
}
-bool color::blue(CJS_Runtime* pRuntime,
- CJS_PropValue& vp,
- CFX_WideString& sError) {
+bool color::blue(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crBlue);
}
-bool color::cyan(CJS_Runtime* pRuntime,
- CJS_PropValue& vp,
- CFX_WideString& sError) {
+bool color::cyan(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crCyan);
}
bool color::magenta(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crMagenta);
}
bool color::yellow(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crYellow);
}
bool color::dkGray(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crDKGray);
}
-bool color::gray(CJS_Runtime* pRuntime,
- CJS_PropValue& vp,
- CFX_WideString& sError) {
+bool color::gray(CJS_Runtime* pRuntime, CJS_PropValue& vp, WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crGray);
}
bool color::ltGray(CJS_Runtime* pRuntime,
CJS_PropValue& vp,
- CFX_WideString& sError) {
+ WideString& sError) {
return PropertyHelper(pRuntime, vp, &m_crLTGray);
}
@@ -221,7 +213,7 @@ bool color::PropertyHelper(CJS_Runtime* pRuntime,
bool color::convert(CJS_Runtime* pRuntime,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
- CFX_WideString& sError) {
+ WideString& sError) {
int iSize = params.size();
if (iSize < 2)
return false;
@@ -233,7 +225,7 @@ bool color::convert(CJS_Runtime* pRuntime,
CFX_Color crSource;
ConvertArrayToPWLColor(pRuntime, aSource, &crSource);
- CFX_ByteString sDestSpace = params[1].ToCFXByteString(pRuntime);
+ ByteString sDestSpace = params[1].ToCFXByteString(pRuntime);
int nColorType = COLORTYPE_TRANSPARENT;
if (sDestSpace == "T") {
@@ -257,7 +249,7 @@ bool color::convert(CJS_Runtime* pRuntime,
bool color::equal(CJS_Runtime* pRuntime,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
- CFX_WideString& sError) {
+ WideString& sError) {
if (params.size() < 2)
return false;