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

Unified Diff: xfa/fxfa/app/xfa_fftextedit.cpp

Issue 1892813004: Avoid narrowing of strings in FWL SetEditText methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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_ffdocview.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_fftextedit.cpp
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index 3232dbdac2a5ef409907ad8e3802aae3a47587be..5b543db14d3b252e44ed643ee4d4d98bd37c2807 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;
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698