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

Side by Side Diff: fpdfsdk/formfiller/cffl_listbox.cpp

Issue 2338553002: Stop converting widestring -> c_str -> widestring in several places. (Closed)
Patch Set: Created 4 years, 3 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 | « fpdfsdk/formfiller/cffl_combobox.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.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 #include "fpdfsdk/formfiller/cffl_listbox.h" 7 #include "fpdfsdk/formfiller/cffl_listbox.h"
8 8
9 #include "fpdfsdk/formfiller/cba_fontmap.h" 9 #include "fpdfsdk/formfiller/cba_fontmap.h"
10 #include "fpdfsdk/formfiller/cffl_formfiller.h" 10 #include "fpdfsdk/formfiller/cffl_formfiller.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, 45 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
46 CPDFSDK_PageView* pPageView) { 46 CPDFSDK_PageView* pPageView) {
47 CPWL_ListBox* pWnd = new CPWL_ListBox(); 47 CPWL_ListBox* pWnd = new CPWL_ListBox();
48 pWnd->AttachFFLData(this); 48 pWnd->AttachFFLData(this);
49 pWnd->Create(cp); 49 pWnd->Create(cp);
50 50
51 CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller(); 51 CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
52 pWnd->SetFillerNotify(pIFormFiller); 52 pWnd->SetFillerNotify(pIFormFiller);
53 53
54 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) 54 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++)
55 pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str()); 55 pWnd->AddString(m_pWidget->GetOptionLabel(i));
56 56
57 if (pWnd->HasFlag(PLBS_MULTIPLESEL)) { 57 if (pWnd->HasFlag(PLBS_MULTIPLESEL)) {
58 m_OriginSelections.clear(); 58 m_OriginSelections.clear();
59 59
60 FX_BOOL bSetCaret = FALSE; 60 FX_BOOL bSetCaret = FALSE;
61 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) { 61 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) {
62 if (m_pWidget->IsOptionSelected(i)) { 62 if (m_pWidget->IsOptionSelected(i)) {
63 if (!bSetCaret) { 63 if (!bSetCaret) {
64 pWnd->SetCaret(i); 64 pWnd->SetCaret(i);
65 bSetCaret = TRUE; 65 bSetCaret = TRUE;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 RestoreState(pPageView); 198 RestoreState(pPageView);
199 pRet = GetPDFWindow(pPageView, FALSE); 199 pRet = GetPDFWindow(pPageView, FALSE);
200 } else { 200 } else {
201 pRet = GetPDFWindow(pPageView, TRUE); 201 pRet = GetPDFWindow(pPageView, TRUE);
202 } 202 }
203 203
204 m_pWidget->UpdateField(); 204 m_pWidget->UpdateField();
205 205
206 return pRet; 206 return pRet;
207 } 207 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cffl_combobox.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698