| 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 "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
| 8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
| 9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
| 10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 { | 51 { |
| 52 } | 52 } |
| 53 | 53 |
| 54 util::~util(void) | 54 util::~util(void) |
| 55 { | 55 { |
| 56 } | 56 } |
| 57 | 57 |
| 58 | 58 |
| 59 struct stru_TbConvert | 59 struct stru_TbConvert |
| 60 { | 60 { |
| 61 » FX_LPCWSTR lpszJSMark; | 61 » const FX_WCHAR* lpszJSMark; |
| 62 » FX_LPCWSTR lpszCppMark; | 62 » const FX_WCHAR* lpszCppMark; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 const stru_TbConvert fcTable[] = { | 65 const stru_TbConvert fcTable[] = { |
| 66 { L"mmmm", L"%B" }, | 66 { L"mmmm", L"%B" }, |
| 67 { L"mmm", L"%b" }, | 67 { L"mmm", L"%b" }, |
| 68 { L"mm", L"%m" }, | 68 { L"mm", L"%m" }, |
| 69 //"m" | 69 //"m" |
| 70 { L"dddd", L"%A" }, | 70 { L"dddd", L"%A" }, |
| 71 { L"ddd", L"%a" }, | 71 { L"ddd", L"%a" }, |
| 72 { L"dd", L"%d" }, | 72 { L"dd", L"%d" }, |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 time.tm_mon = iMonth; | 308 time.tm_mon = iMonth; |
| 309 time.tm_mday = iDay; | 309 time.tm_mday = iDay; |
| 310 time.tm_hour = iHour; | 310 time.tm_hour = iHour; |
| 311 time.tm_min = iMin; | 311 time.tm_min = iMin; |
| 312 time.tm_sec = iSec; | 312 time.tm_sec = iSec; |
| 313 //COleDateTime cppTm(iYear,iMonth+1,iDay,iHour,iMin,iSec); | 313 //COleDateTime cppTm(iYear,iMonth+1,iDay,iHour,iMin,iSec); |
| 314 //CString strFormat = cppTm.Format(cFormat.c_str()); | 314 //CString strFormat = cppTm.Format(cFormat.c_str()); |
| 315 | 315 |
| 316 struct stru_TbConvertAd | 316 struct stru_TbConvertAd |
| 317 { | 317 { |
| 318 » » » FX_LPCWSTR lpszJSMark; | 318 » » » const FX_WCHAR* lpszJSMark; |
| 319 int iValue; | 319 int iValue; |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 stru_TbConvertAd cTableAd[] ={ | 322 stru_TbConvertAd cTableAd[] ={ |
| 323 { L"m", iMonth+1 }, | 323 { L"m", iMonth+1 }, |
| 324 { L"d", iDay }, | 324 { L"d", iDay }, |
| 325 { L"H", iHour }, | 325 { L"H", iHour }, |
| 326 { L"h", iHour>12?iHour-12:iHour }, | 326 { L"h", iHour>12?iHour-12:iHour }, |
| 327 { L"M", iMin }, | 327 { L"M", iMin }, |
| 328 { L"s", iSec }, | 328 { L"s", iSec }, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 time.tm_mon = iMonth; | 404 time.tm_mon = iMonth; |
| 405 time.tm_mday = iDay; | 405 time.tm_mday = iDay; |
| 406 time.tm_hour = iHour; | 406 time.tm_hour = iHour; |
| 407 time.tm_min = iMin; | 407 time.tm_min = iMin; |
| 408 time.tm_sec = iSec; | 408 time.tm_sec = iSec; |
| 409 // COleDateTime cppTm(iYear,iMonth+1,iDay,iHour,iMin,iSec); | 409 // COleDateTime cppTm(iYear,iMonth+1,iDay,iHour,iMin,iSec); |
| 410 //CString strFormat = cppTm.Format(cFormat.c_str()); | 410 //CString strFormat = cppTm.Format(cFormat.c_str()); |
| 411 | 411 |
| 412 struct stru_TbConvertAd | 412 struct stru_TbConvertAd |
| 413 { | 413 { |
| 414 » » FX_LPCWSTR lpszJSMark; | 414 » » const FX_WCHAR* lpszJSMark; |
| 415 int iValue; | 415 int iValue; |
| 416 }; | 416 }; |
| 417 | 417 |
| 418 stru_TbConvertAd cTableAd[] ={ | 418 stru_TbConvertAd cTableAd[] ={ |
| 419 { L"m", iMonth+1 }, | 419 { L"m", iMonth+1 }, |
| 420 { L"d", iDay }, | 420 { L"d", iDay }, |
| 421 { L"H", iHour }, | 421 { L"H", iHour }, |
| 422 { L"h", iHour>12?iHour-12:iHour }, | 422 { L"h", iHour>12?iHour-12:iHour }, |
| 423 { L"M", iMin }, | 423 { L"M", iMin }, |
| 424 { L"s", iSec }, | 424 { L"s", iSec }, |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 int iSize = params.size(); | 636 int iSize = params.size(); |
| 637 if (iSize == 0) | 637 if (iSize == 0) |
| 638 return FALSE; | 638 return FALSE; |
| 639 int nByte = params[0].ToInt(); | 639 int nByte = params[0].ToInt(); |
| 640 unsigned char cByte = (unsigned char)nByte; | 640 unsigned char cByte = (unsigned char)nByte; |
| 641 CFX_WideString csValue; | 641 CFX_WideString csValue; |
| 642 csValue.Format(L"%c", cByte); | 642 csValue.Format(L"%c", cByte); |
| 643 vRet = csValue.c_str(); | 643 vRet = csValue.c_str(); |
| 644 return TRUE; | 644 return TRUE; |
| 645 } | 645 } |
| OLD | NEW |