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