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

Side by Side Diff: xfa/src/fgas/include/fx_datetime.h

Issue 1087053002: Merge to XFA: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months 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/src/fee/src/fx_wordbreak/fx_wordbreak_impl.h ('k') | xfa/src/fgas/include/fx_fnt.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 _FX_DATETIME_H_ 7 #ifndef _FX_DATETIME_H_
8 #define _FX_DATETIME_H_ 8 #define _FX_DATETIME_H_
9 class CFX_Unitime; 9 class CFX_Unitime;
10 class CFX_DateTime; 10 class CFX_DateTime;
11 typedef FX_INT64 FX_UNITIME; 11 typedef FX_INT64 FX_UNITIME;
12 enum FX_WEEKDAY { 12 enum FX_WEEKDAY {
13 FX_Sunday = 0, 13 FX_Sunday = 0,
14 FX_Monday , 14 FX_Monday ,
15 FX_Tuesday , 15 FX_Tuesday ,
16 FX_Wednesday , 16 FX_Wednesday ,
17 FX_Thursday , 17 FX_Thursday ,
18 FX_Friday , 18 FX_Friday ,
19 FX_Saturday , 19 FX_Saturday ,
20 }; 20 };
21 FX_BOOL FX_IsLeapYear(FX_INT32 iYear); 21 FX_BOOL FX_IsLeapYear(FX_INT32 iYear);
22 FX_INT32 FX_DaysInYear(FX_INT32 iYear); 22 FX_INT32 FX_DaysInYear(FX_INT32 iYear);
23 FX_BYTE FX_DaysInMonth(FX_INT32 iYear, FX_BYTE iMonth); 23 FX_BYTE FX_DaysInMonth(FX_INT32 iYear, FX_BYTE iMonth);
24 class CFX_Unitime : public CFX_Object 24 class CFX_Unitime
25 { 25 {
26 public: 26 public:
27 CFX_Unitime() 27 CFX_Unitime()
28 { 28 {
29 m_iUnitime = 0; 29 m_iUnitime = 0;
30 } 30 }
31 CFX_Unitime(FX_UNITIME iUnitime) 31 CFX_Unitime(FX_UNITIME iUnitime)
32 { 32 {
33 m_iUnitime = iUnitime; 33 m_iUnitime = iUnitime;
34 } 34 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 FX_INT8 tzHour; 271 FX_INT8 tzHour;
272 FX_BYTE tzMinute; 272 FX_BYTE tzMinute;
273 }; 273 };
274 FX_TIMEZONE tz; 274 FX_TIMEZONE tz;
275 }; 275 };
276 } FX_DATETIMEZONE, * FX_LPDATETIMEZONE; 276 } FX_DATETIMEZONE, * FX_LPDATETIMEZONE;
277 typedef FX_DATETIMEZONE const * FX_LPCDATETIMEZONE; 277 typedef FX_DATETIMEZONE const * FX_LPCDATETIMEZONE;
278 #if _FX_OS_ != _FX_ANDROID_ 278 #if _FX_OS_ != _FX_ANDROID_
279 #pragma pack(pop) 279 #pragma pack(pop)
280 #endif 280 #endif
281 class CFX_DateTime : public CFX_Object 281 class CFX_DateTime
282 { 282 {
283 public: 283 public:
284 CFX_DateTime() {} 284 CFX_DateTime() {}
285 CFX_DateTime(const FX_DATETIME &dt) 285 CFX_DateTime(const FX_DATETIME &dt)
286 { 286 {
287 m_DateTime = dt; 287 m_DateTime = dt;
288 } 288 }
289 CFX_DateTime(const CFX_DateTime &dt) 289 CFX_DateTime(const CFX_DateTime &dt)
290 { 290 {
291 m_DateTime = dt.m_DateTime; 291 m_DateTime = dt.m_DateTime;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 return dt1.ToUnitime() <= ((const CFX_DateTime&)dt2).ToUnitime(); 461 return dt1.ToUnitime() <= ((const CFX_DateTime&)dt2).ToUnitime();
462 } 462 }
463 friend FX_BOOL operator <= (const FX_DATETIME &dt1, con st CFX_DateTime &dt2) 463 friend FX_BOOL operator <= (const FX_DATETIME &dt1, con st CFX_DateTime &dt2)
464 { 464 {
465 return ((const CFX_DateTime&)dt1).ToUnitime() <= dt2.ToUnitime(); 465 return ((const CFX_DateTime&)dt1).ToUnitime() <= dt2.ToUnitime();
466 } 466 }
467 private: 467 private:
468 FX_DATETIME m_DateTime; 468 FX_DATETIME m_DateTime;
469 }; 469 };
470 #endif 470 #endif
OLDNEW
« no previous file with comments | « xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.h ('k') | xfa/src/fgas/include/fx_fnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698