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

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

Issue 2381723002: Replace std::unique_ptr.reset() with WrapUnique assignment. (Closed)
Patch Set: build Created 4 years, 2 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/cpdfsdk_pageview.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 17 matching lines...) Expand all
28 28
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_pEnv->GetSysHandler())); 39 m_pFontMap =
40 WrapUnique(new CBA_FontMap(m_pWidget, m_pEnv->GetSysHandler()));
41 }
40 cp.pFontMap = m_pFontMap.get(); 42 cp.pFontMap = m_pFontMap.get();
41 43
42 return cp; 44 return cp;
43 } 45 }
44 46
45 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, 47 CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
46 CPDFSDK_PageView* pPageView) { 48 CPDFSDK_PageView* pPageView) {
47 CPWL_ListBox* pWnd = new CPWL_ListBox(); 49 CPWL_ListBox* pWnd = new CPWL_ListBox();
48 pWnd->AttachFFLData(this); 50 pWnd->AttachFFLData(this);
49 pWnd->Create(cp); 51 pWnd->Create(cp);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 RestoreState(pPageView); 198 RestoreState(pPageView);
197 pRet = GetPDFWindow(pPageView, FALSE); 199 pRet = GetPDFWindow(pPageView, FALSE);
198 } else { 200 } else {
199 pRet = GetPDFWindow(pPageView, TRUE); 201 pRet = GetPDFWindow(pPageView, TRUE);
200 } 202 }
201 203
202 m_pWidget->UpdateField(); 204 m_pWidget->UpdateField();
203 205
204 return pRet; 206 return pRet;
205 } 207 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_pageview.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698