summaryrefslogtreecommitdiff
path: root/fxjs/cjs_publicmethods.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-05 22:27:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-05 22:27:22 +0000
commitf743552fbdb17f974c9b1675af81210fe0ffcc50 (patch)
treed0eccefff3c758151428e18eb803e93d8864046a /fxjs/cjs_publicmethods.cpp
parent998fee395fc8a543968c7db3db9e3cf81dee57fc (diff)
downloadpdfium-f743552fbdb17f974c9b1675af81210fe0ffcc50.tar.xz
Fold CJS_EmbedObj classes into CJS_Object classes
This CL removes the CJS_EmbedObj class and various subclasses and folds the subclasses into their CJS_Object counterparts. Change-Id: If6b882a4995c0b1bf83ac783f5c27ba9216c2d5c Reviewed-on: https://pdfium-review.googlesource.com/25410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_publicmethods.cpp')
-rw-r--r--fxjs/cjs_publicmethods.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp
index 9fcfc5f291..30927beac2 100644
--- a/fxjs/cjs_publicmethods.cpp
+++ b/fxjs/cjs_publicmethods.cpp
@@ -936,7 +936,7 @@ CJS_Return CJS_PublicMethods::AFNumber_Format(
Value += L')';
}
if (iNegStyle == 1 || iNegStyle == 3) {
- if (Field* fTarget = pEvent->Target_Field()) {
+ if (CJS_Field* fTarget = pEvent->Target_Field()) {
v8::Local<v8::Array> arColor = pRuntime->NewArray();
pRuntime->PutArrayElement(arColor, 0, pRuntime->NewString(L"RGB"));
pRuntime->PutArrayElement(arColor, 1, pRuntime->NewNumber(1));
@@ -947,7 +947,7 @@ CJS_Return CJS_PublicMethods::AFNumber_Format(
}
} else {
if (iNegStyle == 1 || iNegStyle == 3) {
- if (Field* fTarget = pEvent->Target_Field()) {
+ if (CJS_Field* fTarget = pEvent->Target_Field()) {
v8::Local<v8::Array> arColor = pRuntime->NewArray();
pRuntime->PutArrayElement(arColor, 0, pRuntime->NewString(L"RGB"));
pRuntime->PutArrayElement(arColor, 1, pRuntime->NewNumber(0));
@@ -955,9 +955,10 @@ CJS_Return CJS_PublicMethods::AFNumber_Format(
pRuntime->PutArrayElement(arColor, 3, pRuntime->NewNumber(0));
CJS_Return result = fTarget->get_text_color(pRuntime);
- CFX_Color crProp = color::ConvertArrayToPWLColor(
+ CFX_Color crProp = CJS_Color::ConvertArrayToPWLColor(
pRuntime, pRuntime->ToArray(result.Return()));
- CFX_Color crColor = color::ConvertArrayToPWLColor(pRuntime, arColor);
+ CFX_Color crColor =
+ CJS_Color::ConvertArrayToPWLColor(pRuntime, arColor);
if (crColor != crProp)
fTarget->set_text_color(pRuntime, arColor);
}
@@ -1374,7 +1375,7 @@ CJS_Return CJS_PublicMethods::AFSpecial_Format(
wsFormat = L"99999-9999";
break;
case 2:
- if (util::printx(L"9999999999", wsSource).GetLength() >= 10)
+ if (CJS_Util::printx(L"9999999999", wsSource).GetLength() >= 10)
wsFormat = L"(999) 999-9999";
else
wsFormat = L"999-9999";
@@ -1384,7 +1385,7 @@ CJS_Return CJS_PublicMethods::AFSpecial_Format(
break;
}
- pEvent->Value() = util::printx(wsFormat, wsSource);
+ pEvent->Value() = CJS_Util::printx(wsFormat, wsSource);
return CJS_Return(true);
}