summaryrefslogtreecommitdiff
path: root/xfa/fgas/localization/fgas_locale.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-20 10:11:25 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-20 14:53:38 +0000
commit20df310406636d19a3238ea300bf303a7cd44d2e (patch)
treead8d732f412993f542b85d117914f8967846adec /xfa/fgas/localization/fgas_locale.cpp
parent85f019a8e7d33cbba368a6c6b75fd091269e14a1 (diff)
downloadpdfium-20df310406636d19a3238ea300bf303a7cd44d2e.tar.xz
Cleanup fgas_datetime code
This CL removes unused methods, removes default params and moves static methods into an anonymous namespace. Change-Id: I9a0d9907b46907ababbfb8730f1f6c76002d238a Reviewed-on: https://pdfium-review.googlesource.com/3091 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/localization/fgas_locale.cpp')
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index db0a25549a..253e8512e1 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -390,11 +390,11 @@ bool ParseLocaleDate(const CFX_WideString& wsDate,
cc += 2;
}
}
- if (cc < len) {
+ if (cc < len)
return false;
- }
+
CFX_Unitime ut;
- ut.Set(year, month, day);
+ ut.Set(year, month, day, 0, 0, 0, 0);
datetime = datetime + ut;
return !!cc;
}
@@ -1027,7 +1027,7 @@ bool FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime) {
}
}
CFX_Unitime ut;
- ut.Set(year, month, day);
+ ut.Set(year, month, day, 0, 0, 0, 0);
datetime = datetime + ut;
return true;
}
@@ -1035,9 +1035,9 @@ bool FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime) {
bool FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
CFX_Unitime& datetime,
IFX_Locale* pLocale) {
- if (wsTime.GetLength() == 0) {
+ if (wsTime.GetLength() == 0)
return false;
- }
+
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;