| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "fpdfsdk/javascript/app.h" | 7 #include "fpdfsdk/javascript/app.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 CFX_WideString swMsg; | 290 CFX_WideString swMsg; |
| 291 if (newParams[0].GetType() == CJS_Value::VT_object) { | 291 if (newParams[0].GetType() == CJS_Value::VT_object) { |
| 292 CJS_Array carray(pRuntime); | 292 CJS_Array carray(pRuntime); |
| 293 if (newParams[0].ConvertToArray(carray)) { | 293 if (newParams[0].ConvertToArray(carray)) { |
| 294 swMsg = L"["; | 294 swMsg = L"["; |
| 295 CJS_Value element(pRuntime); | 295 CJS_Value element(pRuntime); |
| 296 for (int i = 0; i < carray.GetLength(); ++i) { | 296 for (int i = 0; i < carray.GetLength(); ++i) { |
| 297 if (i) | 297 if (i) |
| 298 swMsg += L", "; | 298 swMsg += L", "; |
| 299 carray.GetElement(i, element); | 299 carray.GetObjectBy(i, element); |
| 300 swMsg += element.ToCFXWideString(); | 300 swMsg += element.ToCFXWideString(); |
| 301 } | 301 } |
| 302 swMsg += L"]"; | 302 swMsg += L"]"; |
| 303 } else { | 303 } else { |
| 304 swMsg = newParams[0].ToCFXWideString(); | 304 swMsg = newParams[0].ToCFXWideString(); |
| 305 } | 305 } |
| 306 } else { | 306 } else { |
| 307 swMsg = newParams[0].ToCFXWideString(); | 307 swMsg = newParams[0].ToCFXWideString(); |
| 308 } | 308 } |
| 309 | 309 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { | 718 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { |
| 719 return FALSE; | 719 return FALSE; |
| 720 } | 720 } |
| 721 | 721 |
| 722 FX_BOOL app::execDialog(IJS_Context* cc, | 722 FX_BOOL app::execDialog(IJS_Context* cc, |
| 723 const std::vector<CJS_Value>& params, | 723 const std::vector<CJS_Value>& params, |
| 724 CJS_Value& vRet, | 724 CJS_Value& vRet, |
| 725 CFX_WideString& sError) { | 725 CFX_WideString& sError) { |
| 726 return TRUE; | 726 return TRUE; |
| 727 } | 727 } |
| OLD | NEW |