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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 struct stru_TbConvert | 59 struct stru_TbConvert |
60 { | 60 { |
61 FX_LPCWSTR lpszJSMark; | 61 FX_LPCWSTR lpszJSMark; |
62 FX_LPCWSTR lpszCppMark; | 62 FX_LPCWSTR lpszCppMark; |
63 }; | 63 }; |
64 | 64 |
65 const stru_TbConvert fcTable[] = { | 65 const stru_TbConvert fcTable[] = { |
66 » (FX_LPCWSTR)L"mmmm", (FX_LPCWSTR)L"%B", | 66 » { (FX_LPCWSTR)L"mmmm", (FX_LPCWSTR)L"%B" }, |
67 » (FX_LPCWSTR)L"mmm", (FX_LPCWSTR)L"%b", | 67 » { (FX_LPCWSTR)L"mmm", (FX_LPCWSTR)L"%b" }, |
68 » (FX_LPCWSTR)L"mm", (FX_LPCWSTR)L"%m", | 68 » { (FX_LPCWSTR)L"mm", (FX_LPCWSTR)L"%m" }, |
69 //"m" | 69 //"m" |
70 » (FX_LPCWSTR)L"dddd", (FX_LPCWSTR)L"%A", | 70 » { (FX_LPCWSTR)L"dddd", (FX_LPCWSTR)L"%A" }, |
71 » (FX_LPCWSTR)L"ddd", (FX_LPCWSTR)L"%a", | 71 » { (FX_LPCWSTR)L"ddd", (FX_LPCWSTR)L"%a" }, |
72 » (FX_LPCWSTR)L"dd", (FX_LPCWSTR)L"%d", | 72 » { (FX_LPCWSTR)L"dd", (FX_LPCWSTR)L"%d" }, |
73 //"d", "%w", | 73 //"d", "%w", |
74 » (FX_LPCWSTR)L"yyyy", (FX_LPCWSTR)L"%Y", | 74 » { (FX_LPCWSTR)L"yyyy", (FX_LPCWSTR)L"%Y" }, |
75 » (FX_LPCWSTR)L"yy", (FX_LPCWSTR)L"%y", | 75 » { (FX_LPCWSTR)L"yy", (FX_LPCWSTR)L"%y" }, |
76 » (FX_LPCWSTR)L"HH", (FX_LPCWSTR)L"%H", | 76 » { (FX_LPCWSTR)L"HH", (FX_LPCWSTR)L"%H" }, |
77 //"H" | 77 //"H" |
78 » (FX_LPCWSTR)L"hh", (FX_LPCWSTR)L"%I", | 78 » { (FX_LPCWSTR)L"hh", (FX_LPCWSTR)L"%I" }, |
79 //"h" | 79 //"h" |
80 » (FX_LPCWSTR)L"MM", (FX_LPCWSTR)L"%M", | 80 » { (FX_LPCWSTR)L"MM", (FX_LPCWSTR)L"%M" }, |
81 //"M" | 81 //"M" |
82 » (FX_LPCWSTR)L"ss", (FX_LPCWSTR)L"%S", | 82 » { (FX_LPCWSTR)L"ss", (FX_LPCWSTR)L"%S" }, |
83 //"s | 83 //"s |
84 » (FX_LPCWSTR)L"TT", (FX_LPCWSTR)L"%p", | 84 » { (FX_LPCWSTR)L"TT", (FX_LPCWSTR)L"%p" }, |
85 //"t" | 85 //"t" |
86 #if defined(_WIN32) | 86 #if defined(_WIN32) |
87 » (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%p", | 87 » { (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%p" }, |
88 » (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%#I", | 88 » { (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%#I" }, |
89 #else | 89 #else |
90 » (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%P", | 90 » { (FX_LPCWSTR)L"tt", (FX_LPCWSTR)L"%P" }, |
91 » (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%l", | 91 » { (FX_LPCWSTR)L"h", (FX_LPCWSTR)L"%l" }, |
92 #endif | 92 #endif |
93 }; | 93 }; |
94 | 94 |
95 #define UTIL_INT 0 | 95 #define UTIL_INT 0 |
96 #define UTIL_DOUBLE 1 | 96 #define UTIL_DOUBLE 1 |
97 #define UTIL_STRING 2 | 97 #define UTIL_STRING 2 |
98 | 98 |
99 int util::ParstDataType(std::wstring* sFormat) | 99 int util::ParstDataType(std::wstring* sFormat) |
100 { | 100 { |
101 size_t i = 0; | 101 size_t i = 0; |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 int iSize = params.size(); | 640 int iSize = params.size(); |
641 if (iSize == 0) | 641 if (iSize == 0) |
642 return FALSE; | 642 return FALSE; |
643 int nByte = (int)params[0]; | 643 int nByte = (int)params[0]; |
644 unsigned char cByte = (unsigned char)nByte; | 644 unsigned char cByte = (unsigned char)nByte; |
645 CFX_WideString csValue; | 645 CFX_WideString csValue; |
646 csValue.Format((FX_LPCWSTR)L"%c", cByte); | 646 csValue.Format((FX_LPCWSTR)L"%c", cByte); |
647 vRet = csValue; | 647 vRet = csValue; |
648 return TRUE; | 648 return TRUE; |
649 } | 649 } |
OLD | NEW |