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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_combobox.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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/lightwidget/cfwl_combobox.h" 7 #include "xfa/fwl/lightwidget/cfwl_combobox.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return -1; 81 return -1;
82 return static_cast<IFWL_ComboBox*>(m_pIface)->GetCurSel(); 82 return static_cast<IFWL_ComboBox*>(m_pIface)->GetCurSel();
83 } 83 }
84 84
85 FWL_ERR CFWL_ComboBox::SetCurSel(int32_t iSel) { 85 FWL_ERR CFWL_ComboBox::SetCurSel(int32_t iSel) {
86 if (!m_pIface) 86 if (!m_pIface)
87 return FWL_ERR_Indefinite; 87 return FWL_ERR_Indefinite;
88 return static_cast<IFWL_ComboBox*>(m_pIface)->SetCurSel(iSel); 88 return static_cast<IFWL_ComboBox*>(m_pIface)->SetCurSel(iSel);
89 } 89 }
90 90
91 FWL_ERR CFWL_ComboBox::SetEditText(const CFX_WideStringC& wsText) { 91 FWL_ERR CFWL_ComboBox::SetEditText(const CFX_WideString& wsText) {
92 if (!m_pIface) 92 if (!m_pIface)
93 return FWL_ERR_Indefinite; 93 return FWL_ERR_Indefinite;
94 return static_cast<IFWL_ComboBox*>(m_pIface)->SetEditText(wsText); 94 return static_cast<IFWL_ComboBox*>(m_pIface)->SetEditText(wsText);
95 } 95 }
96 96
97 int32_t CFWL_ComboBox::GetEditTextLength() const { 97 int32_t CFWL_ComboBox::GetEditTextLength() const {
98 if (!m_pIface) 98 if (!m_pIface)
99 return 0; 99 return 0;
100 return static_cast<IFWL_ComboBox*>(m_pIface)->GetEditTextLength(); 100 return static_cast<IFWL_ComboBox*>(m_pIface)->GetEditTextLength();
101 } 101 }
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 FWL_HLISTITEM hItem, 423 FWL_HLISTITEM hItem,
424 uint32_t dwCheckState) { 424 uint32_t dwCheckState) {
425 CFWL_ComboBoxItem* pItem = reinterpret_cast<CFWL_ComboBoxItem*>(hItem); 425 CFWL_ComboBoxItem* pItem = reinterpret_cast<CFWL_ComboBoxItem*>(hItem);
426 pItem->m_dwCheckState = dwCheckState; 426 pItem->m_dwCheckState = dwCheckState;
427 return FWL_ERR_Succeeded; 427 return FWL_ERR_Succeeded;
428 } 428 }
429 429
430 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) { 430 FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetListHeight(IFWL_Widget* pWidget) {
431 return m_fMaxListHeight; 431 return m_fMaxListHeight;
432 } 432 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698