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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_ListBox.cpp

Issue 1108903002: Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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 | « fpdfsdk/src/formfiller/FFL_IFormFiller.cpp ('k') | fpdfsdk/src/formfiller/FFL_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 "../../include/formfiller/FormFiller.h" 7 #include "../../include/formfiller/FormFiller.h"
8 #include "../../include/formfiller/FFL_FormFiller.h" 8 #include "../../include/formfiller/FFL_FormFiller.h"
9 #include "../../include/formfiller/FFL_ListBox.h" 9 #include "../../include/formfiller/FFL_ListBox.h"
10 //#include "../../include/formfiller/FFL_Module.h" 10 //#include "../../include/formfiller/FFL_Module.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView * pPageView) 69 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView * pPageView)
70 { 70 {
71 CPWL_ListBox* pWnd = new CPWL_ListBox(); 71 CPWL_ListBox* pWnd = new CPWL_ListBox();
72 pWnd->AttachFFLData(this); 72 pWnd->AttachFFLData(this);
73 pWnd->Create(cp); 73 pWnd->Create(cp);
74 74
75 ASSERT(m_pApp != NULL); 75 ASSERT(m_pApp != NULL);
76 CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller(); 76 CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
77 pWnd->SetFillerNotify(pIFormFiller); 77 pWnd->SetFillerNotify(pIFormFiller);
78 78
79 ASSERT(m_pWidget != NULL);
80
81 for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++) 79 for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
82 » » pWnd->AddString(m_pWidget->GetOptionLabel(i)); 80 » » pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
83 » 81
84 if (pWnd->HasFlag(PLBS_MULTIPLESEL)) 82 if (pWnd->HasFlag(PLBS_MULTIPLESEL))
85 { 83 {
86 m_OriginSelections.RemoveAll(); 84 m_OriginSelections.RemoveAll();
87 85
88 FX_BOOL bSetCaret = FALSE; 86 FX_BOOL bSetCaret = FALSE;
89 for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++) 87 for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
90 { 88 {
91 if (m_pWidget->IsOptionSelected(i)) 89 if (m_pWidget->IsOptionSelected(i))
92 { 90 {
93 if (!bSetCaret) 91 if (!bSetCaret)
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 308
311 if (CommitData(pPageView, nFlag)) 309 if (CommitData(pPageView, nFlag))
312 { 310 {
313 DestroyPDFWindow(pPageView); 311 DestroyPDFWindow(pPageView);
314 m_bValid = FALSE; 312 m_bValid = FALSE;
315 } 313 }
316 } 314 }
317 } 315 }
318 } 316 }
319 317
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_IFormFiller.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698