OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |