| 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/include/fxcrt/fx_xml.h" | 10 #include "core/include/fxcrt/fx_xml.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | 80 virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, |
| 81 CFX_WideString& wsPattern) const = 0; | 81 CFX_WideString& wsPattern) const = 0; |
| 82 virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, | 82 virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, |
| 83 CFX_WideString& wsPattern) const = 0; | 83 CFX_WideString& wsPattern) const = 0; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 class IFX_LocaleMgr { | 86 class IFX_LocaleMgr { |
| 87 public: | 87 public: |
| 88 virtual ~IFX_LocaleMgr() {} | 88 virtual ~IFX_LocaleMgr() {} |
| 89 virtual void Release() = 0; | 89 virtual void Release() = 0; |
| 90 virtual FX_WORD GetDefLocaleID() = 0; | 90 virtual uint16_t GetDefLocaleID() = 0; |
| 91 virtual IFX_Locale* GetDefLocale() = 0; | 91 virtual IFX_Locale* GetDefLocale() = 0; |
| 92 virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0; | 92 virtual IFX_Locale* GetLocale(uint16_t lcid) = 0; |
| 93 virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0; | 93 virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0; |
| 94 }; | 94 }; |
| 95 IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, | 95 IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, |
| 96 FX_WORD wDefaultLCID); | 96 uint16_t wDefaultLCID); |
| 97 void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult); | 97 void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult); |
| 98 FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, | 98 FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate, |
| 99 CFX_Unitime& datetime); | 99 CFX_Unitime& datetime); |
| 100 FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, | 100 FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime, |
| 101 CFX_Unitime& datetime, | 101 CFX_Unitime& datetime, |
| 102 IFX_Locale* pLocale); | 102 IFX_Locale* pLocale); |
| 103 class IFX_FormatString { | 103 class IFX_FormatString { |
| 104 public: | 104 public: |
| 105 static IFX_FormatString* Create(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID); | 105 static IFX_FormatString* Create(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID); |
| 106 | 106 |
| 107 virtual ~IFX_FormatString() {} | 107 virtual ~IFX_FormatString() {} |
| 108 virtual void Release() = 0; | 108 virtual void Release() = 0; |
| 109 virtual void SplitFormatString(const CFX_WideString& wsFormatString, | 109 virtual void SplitFormatString(const CFX_WideString& wsFormatString, |
| 110 CFX_WideStringArray& wsPatterns) = 0; | 110 CFX_WideStringArray& wsPatterns) = 0; |
| 111 virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern) = 0; | 111 virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern) = 0; |
| 112 virtual FX_WORD GetLCID(const CFX_WideString& wsPattern) = 0; | 112 virtual uint16_t GetLCID(const CFX_WideString& wsPattern) = 0; |
| 113 virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern) = 0; | 113 virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern) = 0; |
| 114 virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText, | 114 virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText, |
| 115 const CFX_WideString& wsPattern, | 115 const CFX_WideString& wsPattern, |
| 116 CFX_WideString& wsValue) = 0; | 116 CFX_WideString& wsValue) = 0; |
| 117 virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 117 virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, |
| 118 const CFX_WideString& wsPattern, | 118 const CFX_WideString& wsPattern, |
| 119 FX_FLOAT& fValue) = 0; | 119 FX_FLOAT& fValue) = 0; |
| 120 virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 120 virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, |
| 121 const CFX_WideString& wsPattern, | 121 const CFX_WideString& wsPattern, |
| 122 CFX_WideString& wsValue) = 0; | 122 CFX_WideString& wsValue) = 0; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 CFX_Decimal Multiply(const CFX_Decimal& val) const; | 197 CFX_Decimal Multiply(const CFX_Decimal& val) const; |
| 198 CFX_Decimal Divide(const CFX_Decimal& val) const; | 198 CFX_Decimal Divide(const CFX_Decimal& val) const; |
| 199 CFX_Decimal Modulus(const CFX_Decimal& val) const; | 199 CFX_Decimal Modulus(const CFX_Decimal& val) const; |
| 200 uint32_t m_uFlags; | 200 uint32_t m_uFlags; |
| 201 uint32_t m_uHi; | 201 uint32_t m_uHi; |
| 202 uint32_t m_uLo; | 202 uint32_t m_uLo; |
| 203 uint32_t m_uMid; | 203 uint32_t m_uMid; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ | 206 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALE_H_ |
| OLD | NEW |