| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_SRC_FXFA_PARSER_XFA_LOCALE_H_ | |
| 8 #define XFA_SRC_FXFA_PARSER_XFA_LOCALE_H_ | |
| 9 | |
| 10 #include "xfa/src/fgas/localization/fgas_locale.h" | |
| 11 #include "xfa/src/fxfa/parser/xfa_object.h" | |
| 12 | |
| 13 class CXFA_XMLLocale : public IFX_Locale { | |
| 14 public: | |
| 15 CXFA_XMLLocale(CXML_Element* pLocaleData); | |
| 16 virtual void Release(); | |
| 17 virtual CFX_WideString GetName(); | |
| 18 virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, | |
| 19 CFX_WideString& wsNumSymbol) const; | |
| 20 | |
| 21 virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const; | |
| 22 virtual void GetMonthName(int32_t nMonth, | |
| 23 CFX_WideString& wsMonthName, | |
| 24 FX_BOOL bAbbr = TRUE) const; | |
| 25 virtual void GetDayName(int32_t nWeek, | |
| 26 CFX_WideString& wsDayName, | |
| 27 FX_BOOL bAbbr = TRUE) const; | |
| 28 virtual void GetMeridiemName(CFX_WideString& wsMeridiemName, | |
| 29 FX_BOOL bAM = TRUE) const; | |
| 30 virtual void GetTimeZone(FX_TIMEZONE& tz) const; | |
| 31 virtual void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const; | |
| 32 | |
| 33 virtual void GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | |
| 34 CFX_WideString& wsPattern) const; | |
| 35 virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | |
| 36 CFX_WideString& wsPattern) const; | |
| 37 virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, | |
| 38 CFX_WideString& wsPattern) const; | |
| 39 | |
| 40 protected: | |
| 41 ~CXFA_XMLLocale(); | |
| 42 void GetPattern(CXML_Element* pElement, | |
| 43 const CFX_ByteStringC& bsTag, | |
| 44 const CFX_WideStringC& wsName, | |
| 45 CFX_WideString& wsPattern) const; | |
| 46 CFX_WideString GetCalendarSymbol(const CFX_ByteStringC& symbol, | |
| 47 int index, | |
| 48 FX_BOOL bAbbr) const; | |
| 49 | |
| 50 private: | |
| 51 CXML_Element* m_pLocaleData; | |
| 52 }; | |
| 53 class CXFA_NodeLocale : public IFX_Locale { | |
| 54 public: | |
| 55 CXFA_NodeLocale(CXFA_Node* pLocale); | |
| 56 virtual void Release(); | |
| 57 virtual CFX_WideString GetName(); | |
| 58 virtual void GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, | |
| 59 CFX_WideString& wsNumSymbol) const; | |
| 60 | |
| 61 virtual void GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const; | |
| 62 virtual void GetMonthName(int32_t nMonth, | |
| 63 CFX_WideString& wsMonthName, | |
| 64 FX_BOOL bAbbr = TRUE) const; | |
| 65 virtual void GetDayName(int32_t nWeek, | |
| 66 CFX_WideString& wsDayName, | |
| 67 FX_BOOL bAbbr = TRUE) const; | |
| 68 virtual void GetMeridiemName(CFX_WideString& wsMeridiemName, | |
| 69 FX_BOOL bAM = TRUE) const; | |
| 70 virtual void GetTimeZone(FX_TIMEZONE& tz) const; | |
| 71 virtual void GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD = TRUE) const; | |
| 72 | |
| 73 virtual void GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | |
| 74 CFX_WideString& wsPattern) const; | |
| 75 virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | |
| 76 CFX_WideString& wsPattern) const; | |
| 77 virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, | |
| 78 CFX_WideString& wsPattern) const; | |
| 79 | |
| 80 protected: | |
| 81 ~CXFA_NodeLocale(); | |
| 82 CXFA_Node* GetNodeByName(CXFA_Node* pParent, | |
| 83 const CFX_WideStringC& wsName) const; | |
| 84 CFX_WideString GetSymbol(XFA_ELEMENT eElement, | |
| 85 const CFX_WideStringC& symbol_type) const; | |
| 86 CFX_WideString GetCalendarSymbol(XFA_ELEMENT eElement, | |
| 87 int index, | |
| 88 FX_BOOL bAbbr) const; | |
| 89 | |
| 90 CXFA_Node* m_pLocale; | |
| 91 }; | |
| 92 | |
| 93 #endif // XFA_SRC_FXFA_PARSER_XFA_LOCALE_H_ | |
| OLD | NEW |