From f743552fbdb17f974c9b1675af81210fe0ffcc50 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 5 Feb 2018 22:27:22 +0000 Subject: 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 Reviewed-by: Tom Sepez --- fxjs/cjs_publicmethods.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'fxjs/cjs_publicmethods.cpp') 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 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 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); } -- cgit v1.2.3