diff options
author | tsepez <tsepez@chromium.org> | 2016-04-15 16:04:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-15 16:04:24 -0700 |
commit | 31e446374a7cf3f3353e42a03b6d5297e5cd60ec (patch) | |
tree | 4897c8f76e3ad9b4f6eff3097e752247e8b41047 /xfa/fxfa/app/xfa_fftextedit.cpp | |
parent | 2ba3dc72f73f8e6cdd0423d02a12528096c2d90a (diff) | |
download | pdfium-31e446374a7cf3f3353e42a03b6d5297e5cd60ec.tar.xz |
Avoid narrowing of strings in FWL SetEditText methods.
Review URL: https://codereview.chromium.org/1892813004
Diffstat (limited to 'xfa/fxfa/app/xfa_fftextedit.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fftextedit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index 3232dbdac2..5b543db14d 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -593,7 +593,7 @@ FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() { m_pNormalWidget->LockUpdate(); CFX_WideString wsText; m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); - pWidget->SetEditText(wsText.AsStringC()); + pWidget->SetEditText(wsText); if (CXFA_Value value = m_pDataAcc->GetFormValue()) { switch (value.GetChildValueClassID()) { case XFA_ELEMENT_Date: { @@ -693,7 +693,7 @@ FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() { } CFX_WideString wsText; m_pDataAcc->GetValue(wsText, eType); - ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText.AsStringC()); + ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText); if (IsFocused() && !wsText.IsEmpty()) { CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc); CFX_Unitime date = lcValue.GetDate(); @@ -776,7 +776,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget* pWidget, date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(), XFA_VALUEPICTURE_Edit); CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget; - pDateTime->SetEditText(wsDate.AsStringC()); + pDateTime->SetEditText(wsDate); pDateTime->Update(); GetDoc()->GetDocProvider()->SetFocusWidget(GetDoc(), NULL); CXFA_EventParam eParam; |