| 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 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" | 7 #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" |
| 8 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" | 8 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" |
| 9 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" | 9 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" |
| 10 #include "fpdfsdk/include/formfiller/FFL_ListBox.h" | 10 #include "fpdfsdk/include/formfiller/FFL_ListBox.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 if (dwFieldFlag & FIELDFLAG_MULTISELECT) { | 30 if (dwFieldFlag & FIELDFLAG_MULTISELECT) { |
| 31 cp.dwFlags |= PLBS_MULTIPLESEL; | 31 cp.dwFlags |= PLBS_MULTIPLESEL; |
| 32 } | 32 } |
| 33 | 33 |
| 34 cp.dwFlags |= PWS_VSCROLL; | 34 cp.dwFlags |= PWS_VSCROLL; |
| 35 | 35 |
| 36 if (cp.dwFlags & PWS_AUTOFONTSIZE) | 36 if (cp.dwFlags & PWS_AUTOFONTSIZE) |
| 37 cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE; | 37 cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE; |
| 38 | 38 |
| 39 if (!m_pFontMap) { | 39 if (!m_pFontMap) |
| 40 m_pFontMap = new CBA_FontMap(m_pWidget, m_pApp->GetSysHandler()); | 40 m_pFontMap = new CBA_FontMap(m_pWidget, m_pApp->GetSysHandler()); |
| 41 m_pFontMap->Initial(); | |
| 42 } | |
| 43 cp.pFontMap = m_pFontMap; | 41 cp.pFontMap = m_pFontMap; |
| 44 | 42 |
| 45 return cp; | 43 return cp; |
| 46 } | 44 } |
| 47 | 45 |
| 48 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, | 46 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, |
| 49 CPDFSDK_PageView* pPageView) { | 47 CPDFSDK_PageView* pPageView) { |
| 50 CPWL_ListBox* pWnd = new CPWL_ListBox(); | 48 CPWL_ListBox* pWnd = new CPWL_ListBox(); |
| 51 pWnd->AttachFFLData(this); | 49 pWnd->AttachFFLData(this); |
| 52 pWnd->Create(cp); | 50 pWnd->Create(cp); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 if (bRestoreValue) { | 213 if (bRestoreValue) { |
| 216 RestoreState(pPageView); | 214 RestoreState(pPageView); |
| 217 pRet = GetPDFWindow(pPageView, FALSE); | 215 pRet = GetPDFWindow(pPageView, FALSE); |
| 218 } else | 216 } else |
| 219 pRet = GetPDFWindow(pPageView, TRUE); | 217 pRet = GetPDFWindow(pPageView, TRUE); |
| 220 | 218 |
| 221 m_pWidget->UpdateField(); | 219 m_pWidget->UpdateField(); |
| 222 | 220 |
| 223 return pRet; | 221 return pRet; |
| 224 } | 222 } |
| OLD | NEW |