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

Side by Side Diff: xfa/fwl/lightwidget/cfwl_combobox.h

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 | « no previous file | xfa/fwl/lightwidget/cfwl_combobox.cpp » ('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 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_
8 #define XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ 8 #define XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 12 matching lines...) Expand all
23 static CFWL_ComboBox* Create(); 23 static CFWL_ComboBox* Create();
24 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); 24 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
25 int32_t AddString(const CFX_WideStringC& wsText); 25 int32_t AddString(const CFX_WideStringC& wsText);
26 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon); 26 int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon);
27 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range. 27 bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range.
28 void RemoveAll(); 28 void RemoveAll();
29 int32_t CountItems(); 29 int32_t CountItems();
30 FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText); 30 FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText);
31 int32_t GetCurSel(); 31 int32_t GetCurSel();
32 FWL_ERR SetCurSel(int32_t iSel); 32 FWL_ERR SetCurSel(int32_t iSel);
33 FWL_ERR SetEditText(const CFX_WideStringC& wsText); 33 FWL_ERR SetEditText(const CFX_WideString& wsText);
34 int32_t GetEditTextLength() const; 34 int32_t GetEditTextLength() const;
35 FWL_ERR GetEditText(CFX_WideString& wsText, 35 FWL_ERR GetEditText(CFX_WideString& wsText,
36 int32_t nStart = 0, 36 int32_t nStart = 0,
37 int32_t nCount = -1) const; 37 int32_t nCount = -1) const;
38 FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1); 38 FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
39 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart); 39 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
40 int32_t GetEditLimit(); 40 int32_t GetEditLimit();
41 FWL_ERR SetEditLimit(int32_t nLimit); 41 FWL_ERR SetEditLimit(int32_t nLimit);
42 FWL_ERR EditDoClipboard(int32_t iCmd); 42 FWL_ERR EditDoClipboard(int32_t iCmd);
43 FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord); 43 FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 CFX_RectF m_rtItem; 134 CFX_RectF m_rtItem;
135 uint32_t m_dwStyles; 135 uint32_t m_dwStyles;
136 CFX_WideString m_wsText; 136 CFX_WideString m_wsText;
137 CFX_DIBitmap* m_pDIB; 137 CFX_DIBitmap* m_pDIB;
138 uint32_t m_dwCheckState; 138 uint32_t m_dwCheckState;
139 CFX_RectF m_rtCheckBox; 139 CFX_RectF m_rtCheckBox;
140 void* m_pData; 140 void* m_pData;
141 }; 141 };
142 142
143 #endif // XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_ 143 #endif // XFA_FWL_LIGHTWIDGET_CFWL_COMBOBOX_H_
OLDNEW
« no previous file with comments | « no previous file | xfa/fwl/lightwidget/cfwl_combobox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698