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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "core/fxcrt/include/fx_xml.h" | 10 #include "core/fxcrt/include/fx_xml.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 int16_t iMinute; | 49 int16_t iMinute; |
50 }; | 50 }; |
51 | 51 |
52 static const FX_LOCALETIMEZONEINFO g_FXLocaleTimeZoneData[] = { | 52 static const FX_LOCALETIMEZONEINFO g_FXLocaleTimeZoneData[] = { |
53 {FXBSTR_ID(0, 'C', 'D', 'T'), -5, 0}, {FXBSTR_ID(0, 'C', 'S', 'T'), -6, 0}, | 53 {FXBSTR_ID(0, 'C', 'D', 'T'), -5, 0}, {FXBSTR_ID(0, 'C', 'S', 'T'), -6, 0}, |
54 {FXBSTR_ID(0, 'E', 'D', 'T'), -4, 0}, {FXBSTR_ID(0, 'E', 'S', 'T'), -5, 0}, | 54 {FXBSTR_ID(0, 'E', 'D', 'T'), -4, 0}, {FXBSTR_ID(0, 'E', 'S', 'T'), -5, 0}, |
55 {FXBSTR_ID(0, 'M', 'D', 'T'), -6, 0}, {FXBSTR_ID(0, 'M', 'S', 'T'), -7, 0}, | 55 {FXBSTR_ID(0, 'M', 'D', 'T'), -6, 0}, {FXBSTR_ID(0, 'M', 'S', 'T'), -7, 0}, |
56 {FXBSTR_ID(0, 'P', 'D', 'T'), -7, 0}, {FXBSTR_ID(0, 'P', 'S', 'T'), -8, 0}, | 56 {FXBSTR_ID(0, 'P', 'D', 'T'), -7, 0}, {FXBSTR_ID(0, 'P', 'S', 'T'), -8, 0}, |
57 }; | 57 }; |
58 | 58 |
59 static const CFX_WideStringC gs_wsTextSymbols = FX_WSTRC(L"AXO09"); | 59 static const FX_WCHAR gs_wsTimeSymbols[] = L"hHkKMSFAzZ"; |
60 static const CFX_WideStringC gs_wsTimeSymbols = FX_WSTRC(L"hHkKMSFAzZ"); | 60 static const FX_WCHAR gs_wsDateSymbols[] = L"DJMEeGgYwW"; |
61 static const CFX_WideStringC gs_wsDateSymbols = FX_WSTRC(L"DJMEeGgYwW"); | 61 static const FX_WCHAR gs_wsConstChars[] = L",-:/. "; |
62 static const CFX_WideStringC gs_wsConstChars = FX_WSTRC(L",-:/. "); | |
63 | 62 |
64 static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols, | 63 static FX_STRSIZE FX_Local_Find(const CFX_WideStringC& wsSymbols, |
65 FX_WCHAR ch, | 64 FX_WCHAR ch, |
66 FX_STRSIZE nStart = 0) { | 65 FX_STRSIZE nStart = 0) { |
67 FX_STRSIZE nLength = wsSymbols.GetLength(); | 66 FX_STRSIZE nLength = wsSymbols.GetLength(); |
68 if (nLength < 1 || nStart > nLength) { | 67 if (nLength < 1 || nStart > nLength) { |
69 return -1; | 68 return -1; |
70 } | 69 } |
71 const FX_WCHAR* lpsz = | 70 const FX_WCHAR* lpsz = |
72 (const FX_WCHAR*)FXSYS_wcschr(wsSymbols.GetPtr() + nStart, ch); | 71 (const FX_WCHAR*)FXSYS_wcschr(wsSymbols.GetPtr() + nStart, ch); |
(...skipping 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5021 } | 5020 } |
5022 CFX_Decimal CFX_Decimal::operator*(const CFX_Decimal& val) const { | 5021 CFX_Decimal CFX_Decimal::operator*(const CFX_Decimal& val) const { |
5023 return Multiply(val); | 5022 return Multiply(val); |
5024 } | 5023 } |
5025 CFX_Decimal CFX_Decimal::operator/(const CFX_Decimal& val) const { | 5024 CFX_Decimal CFX_Decimal::operator/(const CFX_Decimal& val) const { |
5026 return Divide(val); | 5025 return Divide(val); |
5027 } | 5026 } |
5028 CFX_Decimal CFX_Decimal::operator%(const CFX_Decimal& val) const { | 5027 CFX_Decimal CFX_Decimal::operator%(const CFX_Decimal& val) const { |
5029 return Modulus(val); | 5028 return Modulus(val); |
5030 } | 5029 } |
OLD | NEW |