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

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

Issue 2357293002: Rename m_pApp to m_pEnv (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_iformfiller.cpp ('k') | fpdfsdk/formfiller/cffl_radiobutton.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 18 matching lines...) Expand all
29 if (dwFieldFlag & FIELDFLAG_MULTISELECT) { 29 if (dwFieldFlag & FIELDFLAG_MULTISELECT) {
30 cp.dwFlags |= PLBS_MULTIPLESEL; 30 cp.dwFlags |= PLBS_MULTIPLESEL;
31 } 31 }
32 32
33 cp.dwFlags |= PWS_VSCROLL; 33 cp.dwFlags |= PWS_VSCROLL;
34 34
35 if (cp.dwFlags & PWS_AUTOFONTSIZE) 35 if (cp.dwFlags & PWS_AUTOFONTSIZE)
36 cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE; 36 cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE;
37 37
38 if (!m_pFontMap) 38 if (!m_pFontMap)
39 m_pFontMap.reset(new CBA_FontMap(m_pWidget, m_pApp->GetSysHandler())); 39 m_pFontMap.reset(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
40 cp.pFontMap = m_pFontMap.get(); 40 cp.pFontMap = m_pFontMap.get();
41 41
42 return cp; 42 return cp;
43 } 43 }
44 44
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_pEnv->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)); 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++) {
(...skipping 136 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_iformfiller.cpp ('k') | fpdfsdk/formfiller/cffl_radiobutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698