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

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

Issue 2488403004: Add fpdfppo_embeddertest.cpp. (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 side-by-side diff with in-line comments
Download patch
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..34a5b5b4c6af63b5ac351f7c7d8b6d8fa086da92 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -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)
Lei Zhang 2016/11/11 23:56:48 mins %= 1440?
Tom Sepez 2016/11/12 00:35:46 leave for now, no functional changes til another c
+ mins -= 1440;
+
+ while (mins < 0)
Lei Zhang 2016/11/11 23:56:48 And then just if (mins < 0) ?
Tom Sepez 2016/11/12 00:35:46 ditto
+ mins += 1440;
+
+ hour = mins / 60;
+ min = mins % 60;
args.GetReturnValue()->SetInteger(hour * 3600000 + min * 60000 +
second * 1000 + milSecond + 1);
}

Powered by Google App Engine
This is Rietveld 408576698