| 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 "core/include/fpdfdoc/fpdf_doc.h" | 7 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 8 #include "doc_utils.h" | 8 #include "doc_utils.h" |
| 9 | 9 |
| 10 const int nMaxRecursion = 32; | 10 const int nMaxRecursion = 32; |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 CPDF_Font* CPDF_InterForm::AddNativeFont(uint8_t charSet, | 510 CPDF_Font* CPDF_InterForm::AddNativeFont(uint8_t charSet, |
| 511 CPDF_Document* pDocument) { | 511 CPDF_Document* pDocument) { |
| 512 if (!pDocument) | 512 if (!pDocument) |
| 513 return nullptr; | 513 return nullptr; |
| 514 | 514 |
| 515 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 515 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 516 LOGFONTA lf; | 516 LOGFONTA lf; |
| 517 CFX_ByteString csFontName = GetNativeFont(charSet, &lf); | 517 CFX_ByteString csFontName = GetNativeFont(charSet, &lf); |
| 518 if (!csFontName.IsEmpty()) { | 518 if (!csFontName.IsEmpty()) { |
| 519 if (csFontName == "Helvetica") | 519 if (csFontName == "Helvetica") |
| 520 return pFont = AddStandardFont(pDocument, csFontName); | 520 return AddStandardFont(pDocument, csFontName); |
| 521 return pDocument->AddWindowsFont(&lf, FALSE, TRUE); | 521 return pDocument->AddWindowsFont(&lf, FALSE, TRUE); |
| 522 } | 522 } |
| 523 #endif | 523 #endif |
| 524 return nullptr; | 524 return nullptr; |
| 525 } | 525 } |
| 526 | 526 |
| 527 CPDF_Font* CPDF_InterForm::AddNativeFont(CPDF_Document* pDocument) { | 527 CPDF_Font* CPDF_InterForm::AddNativeFont(CPDF_Document* pDocument) { |
| 528 return pDocument ? AddNativeFont(GetNativeCharSet(), pDocument) : nullptr; | 528 return pDocument ? AddNativeFont(GetNativeCharSet(), pDocument) : nullptr; |
| 529 } | 529 } |
| 530 | 530 |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 FDF_ImportField(pField, L"", bNotify); | 1270 FDF_ImportField(pField, L"", bNotify); |
| 1271 } | 1271 } |
| 1272 if (bNotify && m_pFormNotify != NULL) { | 1272 if (bNotify && m_pFormNotify != NULL) { |
| 1273 m_pFormNotify->AfterFormImportData(this); | 1273 m_pFormNotify->AfterFormImportData(this); |
| 1274 } | 1274 } |
| 1275 return TRUE; | 1275 return TRUE; |
| 1276 } | 1276 } |
| 1277 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1277 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1278 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1278 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1279 } | 1279 } |
| OLD | NEW |