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 #ifndef XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ | 7 #ifndef XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ |
8 #define XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ | 8 #define XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_xml.h" | 10 #include "core/fxcrt/include/fx_xml.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 enum FX_DATETIMETYPE { | 47 enum FX_DATETIMETYPE { |
48 FX_DATETIMETYPE_Unknown, | 48 FX_DATETIMETYPE_Unknown, |
49 FX_DATETIMETYPE_Date, | 49 FX_DATETIMETYPE_Date, |
50 FX_DATETIMETYPE_Time, | 50 FX_DATETIMETYPE_Time, |
51 FX_DATETIMETYPE_DateTime, | 51 FX_DATETIMETYPE_DateTime, |
52 FX_DATETIMETYPE_TimeDate, | 52 FX_DATETIMETYPE_TimeDate, |
53 }; | 53 }; |
54 | 54 |
55 class IFX_Locale { | 55 class IFX_Locale { |
56 public: | 56 public: |
57 static IFX_Locale* Create(CXML_Element* pLocaleData); | |
58 | 57 |
59 virtual ~IFX_Locale() {} | 58 virtual ~IFX_Locale() {} |
60 virtual void Release() = 0; | 59 virtual void Release() = 0; |
61 | 60 |
62 virtual CFX_WideString GetName() = 0; | 61 virtual CFX_WideString GetName() = 0; |
63 | 62 |
64 virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, | 63 virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, |
65 CFX_WideString& wsNumSymbol) const = 0; | 64 CFX_WideString& wsNumSymbol) const = 0; |
66 virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const = 0; | 65 virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const = 0; |
67 virtual void GetMonthName(int32_t nMonth, | 66 virtual void GetMonthName(int32_t nMonth, |
(...skipping 17 matching lines...) Expand all Loading... |
85 | 84 |
86 class IFX_LocaleMgr { | 85 class IFX_LocaleMgr { |
87 public: | 86 public: |
88 virtual ~IFX_LocaleMgr() {} | 87 virtual ~IFX_LocaleMgr() {} |
89 virtual void Release() = 0; | 88 virtual void Release() = 0; |
90 virtual uint16_t GetDefLocaleID() = 0; | 89 virtual uint16_t GetDefLocaleID() = 0; |
91 virtual IFX_Locale* GetDefLocale() = 0; | 90 virtual IFX_Locale* GetDefLocale() = 0; |
92 virtual IFX_Locale* GetLocale(uint16_t lcid) = 0; | 91 virtual IFX_Locale* GetLocale(uint16_t lcid) = 0; |
93 virtual IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) = 0; | 92 virtual IFX_Locale* GetLocaleByName(const CFX_WideString& wsLocaleName) = 0; |
94 }; | 93 }; |
95 IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, | 94 |
96 uint16_t wDefaultLCID); | |
97 void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult); | |
98 FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, | 95 FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, |
99 CFX_Unitime& datetime); | 96 CFX_Unitime& datetime); |
100 FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, | 97 FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, |
101 CFX_Unitime& datetime, | 98 CFX_Unitime& datetime, |
102 IFX_Locale* pLocale); | 99 IFX_Locale* pLocale); |
103 class CFX_Decimal { | 100 class CFX_Decimal { |
104 public: | 101 public: |
105 CFX_Decimal(); | 102 CFX_Decimal(); |
106 CFX_Decimal(uint32_t val); | 103 CFX_Decimal(uint32_t val); |
107 CFX_Decimal(uint64_t val); | 104 CFX_Decimal(uint64_t val); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 CFX_Decimal Multiply(const CFX_Decimal& val) const; | 142 CFX_Decimal Multiply(const CFX_Decimal& val) const; |
146 CFX_Decimal Divide(const CFX_Decimal& val) const; | 143 CFX_Decimal Divide(const CFX_Decimal& val) const; |
147 CFX_Decimal Modulus(const CFX_Decimal& val) const; | 144 CFX_Decimal Modulus(const CFX_Decimal& val) const; |
148 uint32_t m_uFlags; | 145 uint32_t m_uFlags; |
149 uint32_t m_uHi; | 146 uint32_t m_uHi; |
150 uint32_t m_uLo; | 147 uint32_t m_uLo; |
151 uint32_t m_uMid; | 148 uint32_t m_uMid; |
152 }; | 149 }; |
153 | 150 |
154 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ | 151 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ |
OLD | NEW |