| 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_LOCALEIMP_H_ | 7 #ifndef XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ | 
| 8 #define XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ | 8 #define XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ | 
| 9 | 9 | 
| 10 #include "xfa/fgas/localization/fgas_locale.h" | 10 #include "xfa/fgas/localization/fgas_locale.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 37   virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | 37   virtual void GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, | 
| 38                               CFX_WideString& wsPattern) const; | 38                               CFX_WideString& wsPattern) const; | 
| 39   virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, | 39   virtual void GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, | 
| 40                              CFX_WideString& wsPattern) const; | 40                              CFX_WideString& wsPattern) const; | 
| 41 | 41 | 
| 42  protected: | 42  protected: | 
| 43   virtual ~CFX_Locale(); | 43   virtual ~CFX_Locale(); | 
| 44   CXML_Element* m_pElement; | 44   CXML_Element* m_pElement; | 
| 45 }; | 45 }; | 
| 46 | 46 | 
| 47 class CFX_FormatString : public IFX_FormatString { | 47 class CFX_FormatString { | 
| 48  public: | 48  public: | 
| 49   CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID); | 49   CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID); | 
| 50   virtual void Release() { delete this; } |  | 
| 51 | 50 | 
| 52   virtual void SplitFormatString(const CFX_WideString& wsFormatString, | 51   void Release() { delete this; } | 
| 53                                  CFX_WideStringArray& wsPatterns); | 52 | 
| 54   virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern); | 53   void SplitFormatString(const CFX_WideString& wsFormatString, | 
| 55   virtual uint16_t GetLCID(const CFX_WideString& wsPattern); | 54                          CFX_WideStringArray& wsPatterns); | 
| 56   virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern); | 55   FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern); | 
| 57   virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText, | 56   uint16_t GetLCID(const CFX_WideString& wsPattern); | 
| 58                             const CFX_WideString& wsPattern, | 57   CFX_WideString GetLocaleName(const CFX_WideString& wsPattern); | 
| 59                             CFX_WideString& wsValue); | 58   FX_BOOL ParseText(const CFX_WideString& wsSrcText, | 
| 60   virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 59                     const CFX_WideString& wsPattern, | 
| 61                            const CFX_WideString& wsPattern, | 60                     CFX_WideString& wsValue); | 
| 62                            FX_FLOAT& fValue); | 61   FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 
| 63   virtual FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 62                    const CFX_WideString& wsPattern, | 
| 64                            const CFX_WideString& wsPattern, | 63                    FX_FLOAT& fValue); | 
| 65                            CFX_WideString& wsValue); | 64   FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, | 
| 66   virtual FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime, | 65                    const CFX_WideString& wsPattern, | 
| 67                                 const CFX_WideString& wsPattern, | 66                    CFX_WideString& wsValue); | 
| 68                                 FX_DATETIMETYPE eDateTimeType, | 67   FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime, | 
| 69                                 CFX_Unitime& dtValue); | 68                         const CFX_WideString& wsPattern, | 
| 70   virtual FX_BOOL ParseZero(const CFX_WideString& wsSrcText, | 69                         FX_DATETIMETYPE eDateTimeType, | 
| 71                             const CFX_WideString& wsPattern); | 70                         CFX_Unitime& dtValue); | 
| 72   virtual FX_BOOL ParseNull(const CFX_WideString& wsSrcText, | 71   FX_BOOL ParseZero(const CFX_WideString& wsSrcText, | 
| 73                             const CFX_WideString& wsPattern); | 72                     const CFX_WideString& wsPattern); | 
| 74   virtual FX_BOOL FormatText(const CFX_WideString& wsSrcText, | 73   FX_BOOL ParseNull(const CFX_WideString& wsSrcText, | 
| 75                              const CFX_WideString& wsPattern, | 74                     const CFX_WideString& wsPattern); | 
| 76                              CFX_WideString& wsOutput); | 75   FX_BOOL FormatText(const CFX_WideString& wsSrcText, | 
| 77   virtual FX_BOOL FormatNum(const CFX_WideString& wsSrcNum, | 76                      const CFX_WideString& wsPattern, | 
| 78                             const CFX_WideString& wsPattern, | 77                      CFX_WideString& wsOutput); | 
| 79                             CFX_WideString& wsOutput); | 78   FX_BOOL FormatNum(const CFX_WideString& wsSrcNum, | 
| 80   virtual FX_BOOL FormatNum(FX_FLOAT fNum, | 79                     const CFX_WideString& wsPattern, | 
| 81                             const CFX_WideString& wsPattern, | 80                     CFX_WideString& wsOutput); | 
| 82                             CFX_WideString& wsOutput); | 81   FX_BOOL FormatNum(FX_FLOAT fNum, | 
| 83   virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, | 82                     const CFX_WideString& wsPattern, | 
| 84                                  const CFX_WideString& wsPattern, | 83                     CFX_WideString& wsOutput); | 
| 85                                  CFX_WideString& wsOutput); | 84   FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, | 
| 86   virtual FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, | 85                          const CFX_WideString& wsPattern, | 
| 87                                  const CFX_WideString& wsPattern, | 86                          CFX_WideString& wsOutput); | 
| 88                                  CFX_WideString& wsOutput, | 87   FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, | 
| 89                                  FX_DATETIMETYPE eDateTimeType); | 88                          const CFX_WideString& wsPattern, | 
| 90   virtual FX_BOOL FormatDateTime(const CFX_Unitime& dt, | 89                          CFX_WideString& wsOutput, | 
| 91                                  const CFX_WideString& wsPattern, | 90                          FX_DATETIMETYPE eDateTimeType); | 
| 92                                  CFX_WideString& wsOutput); | 91   FX_BOOL FormatDateTime(const CFX_Unitime& dt, | 
| 93   virtual FX_BOOL FormatZero(const CFX_WideString& wsPattern, | 92                          const CFX_WideString& wsPattern, | 
| 94                              CFX_WideString& wsOutput); | 93                          CFX_WideString& wsOutput); | 
| 95   virtual FX_BOOL FormatNull(const CFX_WideString& wsPattern, | 94   FX_BOOL FormatZero(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); | 
| 96                              CFX_WideString& wsOutput); | 95   FX_BOOL FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); | 
| 97 | 96 | 
| 98  protected: | 97  protected: | 
| 99   virtual ~CFX_FormatString(); | 98   ~CFX_FormatString(); | 
|  | 99 | 
| 100   IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern, | 100   IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern, | 
| 101                             const CFX_WideStringC& wsCategory, | 101                             const CFX_WideStringC& wsCategory, | 
| 102                             CFX_WideString& wsPurgePattern); | 102                             CFX_WideString& wsPurgePattern); | 
| 103   IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern, | 103   IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern, | 
| 104                                int32_t& iDotIndex, | 104                                int32_t& iDotIndex, | 
| 105                                uint32_t& dwStyle, | 105                                uint32_t& dwStyle, | 
| 106                                CFX_WideString& wsPurgePattern); | 106                                CFX_WideString& wsPurgePattern); | 
| 107   FX_BOOL FormatStrNum(const CFX_WideStringC& wsInputNum, | 107   FX_BOOL FormatStrNum(const CFX_WideStringC& wsInputNum, | 
| 108                        const CFX_WideString& wsPattern, | 108                        const CFX_WideString& wsPattern, | 
| 109                        CFX_WideString& wsOutput); | 109                        CFX_WideString& wsOutput); | 
| 110   FX_BOOL FormatLCNumeric(CFX_LCNumeric& lcNum, | 110   FX_BOOL FormatLCNumeric(CFX_LCNumeric& lcNum, | 
| 111                           const CFX_WideString& wsPattern, | 111                           const CFX_WideString& wsPattern, | 
| 112                           CFX_WideString& wsOutput); | 112                           CFX_WideString& wsOutput); | 
| 113   FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern, | 113   FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern, | 
| 114                                     IFX_Locale*& pLocale, | 114                                     IFX_Locale*& pLocale, | 
| 115                                     CFX_WideString& wsDatePattern, | 115                                     CFX_WideString& wsDatePattern, | 
| 116                                     CFX_WideString& wsTimePattern); | 116                                     CFX_WideString& wsTimePattern); | 
| 117   IFX_Locale* GetPatternLocale(const CFX_WideStringC& wsLocale); | 117   IFX_Locale* GetPatternLocale(const CFX_WideStringC& wsLocale); | 
| 118   IFX_LocaleMgr* m_pLocaleMgr; | 118   IFX_LocaleMgr* m_pLocaleMgr; | 
| 119   FX_BOOL m_bUseLCID; | 119   FX_BOOL m_bUseLCID; | 
| 120 }; | 120 }; | 
| 121 | 121 | 
| 122 #endif  // XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ | 122 #endif  // XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ | 
| OLD | NEW | 
|---|