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

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

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase Created 4 years, 6 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_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"
11 #include "fpdfsdk/formfiller/cffl_iformfiller.h" 11 #include "fpdfsdk/formfiller/cffl_iformfiller.h"
12 #include "fpdfsdk/include/fsdk_common.h" 12 #include "fpdfsdk/include/fsdk_common.h"
13 #include "fpdfsdk/include/fsdk_mgr.h" 13 #include "fpdfsdk/include/fsdk_mgr.h"
14 #include "fpdfsdk/pdfwindow/PWL_ListBox.h" 14 #include "fpdfsdk/pdfwindow/PWL_ListBox.h"
15 15
16 #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f 16 #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f
17 17
18 CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) 18 CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget)
19 : CFFL_FormFiller(pApp, pWidget), m_pFontMap(NULL) {} 19 : CFFL_FormFiller(pApp, pWidget), m_pFontMap(nullptr) {}
20 20
21 CFFL_ListBox::~CFFL_ListBox() { 21 CFFL_ListBox::~CFFL_ListBox() {
22 delete m_pFontMap; 22 delete m_pFontMap;
23 } 23 }
24 24
25 PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() { 25 PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() {
26 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); 26 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
27 27
28 uint32_t dwFieldFlag = m_pWidget->GetFieldFlags(); 28 uint32_t dwFieldFlag = m_pWidget->GetFieldFlags();
29 29
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 } 187 }
188 188
189 CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, 189 CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView,
190 FX_BOOL bRestoreValue) { 190 FX_BOOL bRestoreValue) {
191 if (bRestoreValue) 191 if (bRestoreValue)
192 SaveState(pPageView); 192 SaveState(pPageView);
193 193
194 DestroyPDFWindow(pPageView); 194 DestroyPDFWindow(pPageView);
195 195
196 CPWL_Wnd* pRet = NULL; 196 CPWL_Wnd* pRet = nullptr;
197 197
198 if (bRestoreValue) { 198 if (bRestoreValue) {
199 RestoreState(pPageView); 199 RestoreState(pPageView);
200 pRet = GetPDFWindow(pPageView, FALSE); 200 pRet = GetPDFWindow(pPageView, FALSE);
201 } else { 201 } else {
202 pRet = GetPDFWindow(pPageView, TRUE); 202 pRet = GetPDFWindow(pPageView, TRUE);
203 } 203 }
204 204
205 m_pWidget->UpdateField(); 205 m_pWidget->UpdateField();
206 206
207 return pRet; 207 return pRet;
208 } 208 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cffl_iformfiller.cpp ('k') | fpdfsdk/formfiller/cffl_textfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698