summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
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/fxfa/app
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/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index 094839f486..50685c7e40 100644
--- a/xfa/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/fxfa/app/xfa_fftextedit.cpp
@@ -522,9 +522,8 @@ bool CXFA_FFDateTimeEdit::LoadWidget() {
if (!wsText.IsEmpty()) {
CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc);
CFX_Unitime date = lcValue.GetDate();
- if ((FX_UNITIME)date != 0) {
+ if (date.ToInt64() != 0)
pWidget->SetCurSel(date.GetYear(), date.GetMonth(), date.GetDay());
- }
}
} break;
default:
@@ -620,7 +619,7 @@ bool CXFA_FFDateTimeEdit::UpdateFWLData() {
CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc);
CFX_Unitime date = lcValue.GetDate();
if (lcValue.IsValid()) {
- if ((FX_UNITIME)date != 0) {
+ if (date.ToInt64() != 0) {
((CFWL_DateTimePicker*)m_pNormalWidget)
->SetCurSel(date.GetYear(), date.GetMonth(), date.GetDay());
}
@@ -648,7 +647,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(CFWL_Widget* pWidget,
m_pDataAcc->GetPictureContent(wsPicture, XFA_VALUEPICTURE_Edit);
CXFA_LocaleValue date(XFA_VT_DATE, GetDoc()->GetXFADoc()->GetLocalMgr());
CFX_Unitime dt;
- dt.Set(iYear, iMonth, iDay);
+ dt.Set(iYear, iMonth, iDay, 0, 0, 0, 0);
date.SetDate(dt);
CFX_WideString wsDate;
date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(),