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_FXFA_PARSER_XFA_LOCALEMGR_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_LOCALEMGR_H_ |
8 #define XFA_FXFA_PARSER_XFA_LOCALEMGR_H_ | 8 #define XFA_FXFA_PARSER_XFA_LOCALEMGR_H_ |
9 | 9 |
10 #include "xfa/fgas/localization/fgas_datetime.h" | 10 #include "xfa/fgas/localization/fgas_datetime.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #define XFA_LANGID_fr_FR 0x040c | 28 #define XFA_LANGID_fr_FR 0x040c |
29 #define XFA_LANGID_it_IT 0x0410 | 29 #define XFA_LANGID_it_IT 0x0410 |
30 #define XFA_LANGID_pt_BR 0x0416 | 30 #define XFA_LANGID_pt_BR 0x0416 |
31 #define XFA_LANGID_nl_NL 0x0413 | 31 #define XFA_LANGID_nl_NL 0x0413 |
32 #define XFA_LANGID_ru_RU 0x0419 | 32 #define XFA_LANGID_ru_RU 0x0419 |
33 | 33 |
34 class CXFA_LocaleMgr : public IFX_LocaleMgr { | 34 class CXFA_LocaleMgr : public IFX_LocaleMgr { |
35 public: | 35 public: |
36 CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid); | 36 CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid); |
37 virtual void Release(); | 37 virtual void Release(); |
38 virtual FX_WORD GetDefLocaleID(); | 38 virtual uint16_t GetDefLocaleID(); |
39 virtual IFX_Locale* GetDefLocale(); | 39 virtual IFX_Locale* GetDefLocale(); |
40 virtual IFX_Locale* GetLocale(FX_WORD lcid); | 40 virtual IFX_Locale* GetLocale(uint16_t lcid); |
41 virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName); | 41 virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName); |
42 ~CXFA_LocaleMgr(); | 42 ~CXFA_LocaleMgr(); |
43 void SetDefLocale(IFX_Locale* pLocale); | 43 void SetDefLocale(IFX_Locale* pLocale); |
44 CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig); | 44 CFX_WideStringC GetConfigLocaleName(CXFA_Node* pConfig); |
45 | 45 |
46 protected: | 46 protected: |
47 CFX_PtrArray m_LocaleArray; | 47 CFX_PtrArray m_LocaleArray; |
48 CFX_PtrArray m_XMLLocaleArray; | 48 CFX_PtrArray m_XMLLocaleArray; |
49 IFX_Locale* m_pDefLocale; | 49 IFX_Locale* m_pDefLocale; |
50 CFX_WideString m_wsConfigLocale; | 50 CFX_WideString m_wsConfigLocale; |
51 FX_WORD m_dwDeflcid; | 51 uint16_t m_dwDeflcid; |
52 FX_WORD m_dwLocaleFlags; | 52 uint16_t m_dwLocaleFlags; |
53 }; | 53 }; |
54 | 54 |
55 class IXFA_TimeZoneProvider { | 55 class IXFA_TimeZoneProvider { |
56 public: | 56 public: |
57 static IXFA_TimeZoneProvider* Create(); | 57 static IXFA_TimeZoneProvider* Create(); |
58 static IXFA_TimeZoneProvider* Get(); | 58 static IXFA_TimeZoneProvider* Get(); |
59 static void Destroy(); | 59 static void Destroy(); |
60 | 60 |
61 virtual ~IXFA_TimeZoneProvider() {} | 61 virtual ~IXFA_TimeZoneProvider() {} |
62 | 62 |
63 virtual void SetTimeZone(FX_TIMEZONE& tz) = 0; | 63 virtual void SetTimeZone(FX_TIMEZONE& tz) = 0; |
64 | 64 |
65 virtual void GetTimeZone(FX_TIMEZONE& tz) = 0; | 65 virtual void GetTimeZone(FX_TIMEZONE& tz) = 0; |
66 }; | 66 }; |
67 class CXFA_TimeZoneProvider : public IXFA_TimeZoneProvider { | 67 class CXFA_TimeZoneProvider : public IXFA_TimeZoneProvider { |
68 public: | 68 public: |
69 CXFA_TimeZoneProvider(); | 69 CXFA_TimeZoneProvider(); |
70 virtual ~CXFA_TimeZoneProvider(); | 70 virtual ~CXFA_TimeZoneProvider(); |
71 virtual void SetTimeZone(FX_TIMEZONE& tz); | 71 virtual void SetTimeZone(FX_TIMEZONE& tz); |
72 virtual void GetTimeZone(FX_TIMEZONE& tz); | 72 virtual void GetTimeZone(FX_TIMEZONE& tz); |
73 | 73 |
74 private: | 74 private: |
75 FX_TIMEZONE m_tz; | 75 FX_TIMEZONE m_tz; |
76 }; | 76 }; |
77 | 77 |
78 #endif // XFA_FXFA_PARSER_XFA_LOCALEMGR_H_ | 78 #endif // XFA_FXFA_PARSER_XFA_LOCALEMGR_H_ |
OLD | NEW |