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

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

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years 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 | « core/src/fxge/win32/fx_win32_print.cpp ('k') | fpdfsdk/src/formfiller/FFL_CheckBox.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/include/formfiller/FFL_CBA_Fontmap.h" 7 #include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h"
8 #include "fpdfsdk/include/formfiller/FormFiller.h" 8 #include "fpdfsdk/include/formfiller/FormFiller.h"
9 9
10 CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot, 10 CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot,
11 IFX_SystemHandler* pSystemHandler) 11 IFX_SystemHandler* pSystemHandler)
12 : CPWL_FontMap(pSystemHandler), 12 : CPWL_FontMap(pSystemHandler),
13 m_pDocument(NULL), 13 m_pDocument(NULL),
14 m_pAnnotDict(NULL), 14 m_pAnnotDict(NULL),
15 m_pDefaultFont(NULL), 15 m_pDefaultFont(NULL),
16 m_sAPType("N") { 16 m_sAPType("N") {
17 ASSERT(pAnnot != NULL);
18
19 CPDF_Page* pPage = pAnnot->GetPDFPage(); 17 CPDF_Page* pPage = pAnnot->GetPDFPage();
20 18
21 m_pDocument = pPage->m_pDocument; 19 m_pDocument = pPage->m_pDocument;
22 m_pAnnotDict = pAnnot->GetPDFAnnot()->GetAnnotDict(); 20 m_pAnnotDict = pAnnot->GetPDFAnnot()->GetAnnotDict();
23 } 21 }
24 22
25 CBA_FontMap::CBA_FontMap(CPDF_Document* pDocument, 23 CBA_FontMap::CBA_FontMap(CPDF_Document* pDocument,
26 CPDF_Dictionary* pAnnotDict, 24 CPDF_Dictionary* pAnnotDict,
27 IFX_SystemHandler* pSystemHandler) 25 IFX_SystemHandler* pSystemHandler)
28 : CPWL_FontMap(pSystemHandler), 26 : CPWL_FontMap(pSystemHandler),
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 273
276 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr; 274 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr;
277 } 275 }
278 276
279 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) { 277 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) {
280 m_sAPType = sAPType; 278 m_sAPType = sAPType;
281 279
282 Reset(); 280 Reset();
283 Initial(); 281 Initial();
284 } 282 }
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_print.cpp ('k') | fpdfsdk/src/formfiller/FFL_CheckBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698