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

Unified Diff: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp

Issue 2488403004: Add fpdfppo_embeddertest.cpp. (Closed)
Patch Set: One last suggestion 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffapp.cpp ('k') | xfa/fxfa/parser/xfa_locale.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 947ef7941ec7bccbeda26cccfeac220dee8891ef..5c267717a3adf0c49ccb467fe5f9629824bcb929 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -1182,7 +1182,7 @@ void CXFA_FM2JSContext::IsoTime2Num(CFXJSE_Value* pThis,
int32_t milSecond = uniTime.GetMillisecond();
FX_TIMEZONE tzLocale;
- pMgr->GetDefLocale()->GetTimeZone(tzLocale);
+ pMgr->GetDefLocale()->GetTimeZone(&tzLocale);
// TODO(dsinclair): See if there is other time conversion code in pdfium and
// consolidate.
@@ -1605,19 +1605,19 @@ void CXFA_FM2JSContext::Time2Num(CFXJSE_Value* pThis,
int32_t second = uniTime.GetSecond();
int32_t milSecond = uniTime.GetMillisecond();
int32_t mins = hour * 60 + min;
- CXFA_TimeZoneProvider* pProvider = CXFA_TimeZoneProvider::Get();
- if (pProvider) {
- FX_TIMEZONE tz;
- pProvider->GetTimeZone(tz);
- mins -= (tz.tzHour * 60);
- while (mins > 1440)
- mins -= 1440;
- while (mins < 0)
- mins += 1440;
-
- hour = mins / 60;
- min = mins % 60;
- }
+
+ FX_TIMEZONE tz;
+ CXFA_TimeZoneProvider provider;
+ provider.GetTimeZone(&tz);
+ mins -= (tz.tzHour * 60);
+ while (mins > 1440)
+ mins -= 1440;
+
+ while (mins < 0)
+ mins += 1440;
+
+ hour = mins / 60;
+ min = mins % 60;
args.GetReturnValue()->SetInteger(hour * 3600000 + min * 60000 +
second * 1000 + milSecond + 1);
}
« no previous file with comments | « xfa/fxfa/app/xfa_ffapp.cpp ('k') | xfa/fxfa/parser/xfa_locale.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698