Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: xfa/fgas/localization/fgas_localeimp.h

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fgas/localization/fgas_locale.cpp ('k') | xfa/fwl/core/cfwl_barcode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 class CFX_LCNumeric; 12 class CFX_LCNumeric;
13 13
14 class CFX_FormatString { 14 class CFX_FormatString {
15 public: 15 public:
16 CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID); 16 CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, bool bUseLCID);
17 17
18 void Release() { delete this; } 18 void Release() { delete this; }
19 19
20 void SplitFormatString(const CFX_WideString& wsFormatString, 20 void SplitFormatString(const CFX_WideString& wsFormatString,
21 CFX_WideStringArray& wsPatterns); 21 CFX_WideStringArray& wsPatterns);
22 FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern); 22 FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
23 uint16_t GetLCID(const CFX_WideString& wsPattern); 23 uint16_t GetLCID(const CFX_WideString& wsPattern);
24 CFX_WideString GetLocaleName(const CFX_WideString& wsPattern); 24 CFX_WideString GetLocaleName(const CFX_WideString& wsPattern);
25 FX_BOOL ParseText(const CFX_WideString& wsSrcText, 25 bool ParseText(const CFX_WideString& wsSrcText,
26 const CFX_WideString& wsPattern, 26 const CFX_WideString& wsPattern,
27 CFX_WideString& wsValue); 27 CFX_WideString& wsValue);
28 FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, 28 bool ParseNum(const CFX_WideString& wsSrcNum,
29 const CFX_WideString& wsPattern, 29 const CFX_WideString& wsPattern,
30 FX_FLOAT& fValue); 30 FX_FLOAT& fValue);
31 FX_BOOL ParseNum(const CFX_WideString& wsSrcNum, 31 bool ParseNum(const CFX_WideString& wsSrcNum,
32 const CFX_WideString& wsPattern, 32 const CFX_WideString& wsPattern,
33 CFX_WideString& wsValue); 33 CFX_WideString& wsValue);
34 FX_BOOL ParseDateTime(const CFX_WideString& wsSrcDateTime, 34 bool ParseDateTime(const CFX_WideString& wsSrcDateTime,
35 const CFX_WideString& wsPattern,
36 FX_DATETIMETYPE eDateTimeType,
37 CFX_Unitime& dtValue);
38 FX_BOOL ParseZero(const CFX_WideString& wsSrcText,
39 const CFX_WideString& wsPattern);
40 FX_BOOL ParseNull(const CFX_WideString& wsSrcText,
41 const CFX_WideString& wsPattern);
42 FX_BOOL FormatText(const CFX_WideString& wsSrcText,
43 const CFX_WideString& wsPattern, 35 const CFX_WideString& wsPattern,
44 CFX_WideString& wsOutput); 36 FX_DATETIMETYPE eDateTimeType,
45 FX_BOOL FormatNum(const CFX_WideString& wsSrcNum, 37 CFX_Unitime& dtValue);
46 const CFX_WideString& wsPattern, 38 bool ParseZero(const CFX_WideString& wsSrcText,
47 CFX_WideString& wsOutput); 39 const CFX_WideString& wsPattern);
48 FX_BOOL FormatNum(FX_FLOAT fNum, 40 bool ParseNull(const CFX_WideString& wsSrcText,
49 const CFX_WideString& wsPattern, 41 const CFX_WideString& wsPattern);
50 CFX_WideString& wsOutput); 42 bool FormatText(const CFX_WideString& wsSrcText,
51 FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, 43 const CFX_WideString& wsPattern,
52 const CFX_WideString& wsPattern, 44 CFX_WideString& wsOutput);
53 CFX_WideString& wsOutput); 45 bool FormatNum(const CFX_WideString& wsSrcNum,
54 FX_BOOL FormatDateTime(const CFX_WideString& wsSrcDateTime, 46 const CFX_WideString& wsPattern,
55 const CFX_WideString& wsPattern, 47 CFX_WideString& wsOutput);
56 CFX_WideString& wsOutput, 48 bool FormatNum(FX_FLOAT fNum,
57 FX_DATETIMETYPE eDateTimeType); 49 const CFX_WideString& wsPattern,
58 FX_BOOL FormatDateTime(const CFX_Unitime& dt, 50 CFX_WideString& wsOutput);
59 const CFX_WideString& wsPattern, 51 bool FormatDateTime(const CFX_WideString& wsSrcDateTime,
60 CFX_WideString& wsOutput); 52 const CFX_WideString& wsPattern,
61 FX_BOOL FormatZero(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); 53 CFX_WideString& wsOutput);
62 FX_BOOL FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput); 54 bool FormatDateTime(const CFX_WideString& wsSrcDateTime,
55 const CFX_WideString& wsPattern,
56 CFX_WideString& wsOutput,
57 FX_DATETIMETYPE eDateTimeType);
58 bool FormatDateTime(const CFX_Unitime& dt,
59 const CFX_WideString& wsPattern,
60 CFX_WideString& wsOutput);
61 bool FormatZero(const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
62 bool FormatNull(const CFX_WideString& wsPattern, CFX_WideString& wsOutput);
63 63
64 protected: 64 protected:
65 ~CFX_FormatString(); 65 ~CFX_FormatString();
66 66
67 IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern, 67 IFX_Locale* GetTextFormat(const CFX_WideString& wsPattern,
68 const CFX_WideStringC& wsCategory, 68 const CFX_WideStringC& wsCategory,
69 CFX_WideString& wsPurgePattern); 69 CFX_WideString& wsPurgePattern);
70 IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern, 70 IFX_Locale* GetNumericFormat(const CFX_WideString& wsPattern,
71 int32_t& iDotIndex, 71 int32_t& iDotIndex,
72 uint32_t& dwStyle, 72 uint32_t& dwStyle,
73 CFX_WideString& wsPurgePattern); 73 CFX_WideString& wsPurgePattern);
74 FX_BOOL FormatStrNum(const CFX_WideStringC& wsInputNum, 74 bool FormatStrNum(const CFX_WideStringC& wsInputNum,
75 const CFX_WideString& wsPattern,
76 CFX_WideString& wsOutput);
77 bool FormatLCNumeric(CFX_LCNumeric& lcNum,
75 const CFX_WideString& wsPattern, 78 const CFX_WideString& wsPattern,
76 CFX_WideString& wsOutput); 79 CFX_WideString& wsOutput);
77 FX_BOOL FormatLCNumeric(CFX_LCNumeric& lcNum,
78 const CFX_WideString& wsPattern,
79 CFX_WideString& wsOutput);
80 FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern, 80 FX_DATETIMETYPE GetDateTimeFormat(const CFX_WideString& wsPattern,
81 IFX_Locale*& pLocale, 81 IFX_Locale*& pLocale,
82 CFX_WideString& wsDatePattern, 82 CFX_WideString& wsDatePattern,
83 CFX_WideString& wsTimePattern); 83 CFX_WideString& wsTimePattern);
84 IFX_Locale* GetPatternLocale(const CFX_WideString& wsLocale); 84 IFX_Locale* GetPatternLocale(const CFX_WideString& wsLocale);
85 85
86 IFX_LocaleMgr* m_pLocaleMgr; 86 IFX_LocaleMgr* m_pLocaleMgr;
87 FX_BOOL m_bUseLCID; 87 bool m_bUseLCID;
88 }; 88 };
89 89
90 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_ 90 #endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALEIMP_H_
OLDNEW
« no previous file with comments | « xfa/fgas/localization/fgas_locale.cpp ('k') | xfa/fwl/core/cfwl_barcode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698