| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |