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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_ListBox.cpp

Issue 1235753006: Merge to XFA: Cleanup: Do not check pointers before deleting them, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 5 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/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_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 "../../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"
11 #include "../../include/formfiller/FFL_IFormFiller.h" 11 #include "../../include/formfiller/FFL_IFormFiller.h"
12 //#include "../../include/formfiller/FFL_Undo.h" 12 //#include "../../include/formfiller/FFL_Undo.h"
13 #include "../../include/formfiller/FFL_CBA_Fontmap.h" 13 #include "../../include/formfiller/FFL_CBA_Fontmap.h"
14 14
15 15
16 #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f 16 #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f
17 17
18 18
19 /* ------------------------------- CFFL_ListBox ------------------------------- */ 19 /* ------------------------------- CFFL_ListBox ------------------------------- */
20 20
21 CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) : 21 CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) :
22 CFFL_FormFiller(pApp, pWidget), 22 CFFL_FormFiller(pApp, pWidget),
23 m_pFontMap(NULL) 23 m_pFontMap(NULL)
24 { 24 {
25 } 25 }
26 26
27 CFFL_ListBox::~CFFL_ListBox() 27 CFFL_ListBox::~CFFL_ListBox()
28 { 28 {
29 » if (m_pFontMap) 29 delete m_pFontMap;
30 » {
31 » » delete m_pFontMap;
32 » » m_pFontMap = NULL;
33 » }
34 } 30 }
35 31
36 PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() 32 PWL_CREATEPARAM CFFL_ListBox::GetCreateParam()
37 { 33 {
38 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); 34 PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
39 35
40 ASSERT(m_pWidget != NULL); 36 ASSERT(m_pWidget != NULL);
41 FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags(); 37 FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags();
42 38
43 if (dwFieldFlag & FIELDFLAG_MULTISELECT) 39 if (dwFieldFlag & FIELDFLAG_MULTISELECT)
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 288
293 if (CommitData(pPageView, nFlag)) 289 if (CommitData(pPageView, nFlag))
294 { 290 {
295 DestroyPDFWindow(pPageView); 291 DestroyPDFWindow(pPageView);
296 m_bValid = FALSE; 292 m_bValid = FALSE;
297 } 293 }
298 } 294 }
299 } 295 }
300 } 296 }
301 297
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698