| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 HFONT hFont = (HFONT)::GetStockObject(iFontObject); | 378 HFONT hFont = (HFONT)::GetStockObject(iFontObject); |
| 379 if (hFont != NULL) { | 379 if (hFont != NULL) { |
| 380 memset(&lf, 0, sizeof(LOGFONTA)); | 380 memset(&lf, 0, sizeof(LOGFONTA)); |
| 381 int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf); | 381 int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf); |
| 382 if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) { | 382 if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) { |
| 383 return RetrieveSpecificFont(lf); | 383 return RetrieveSpecificFont(lf); |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 return FALSE; | 386 return FALSE; |
| 387 } | 387 } |
| 388 #endif | 388 #endif // PDF_ENABLE_XFA |
| 389 #endif | 389 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 390 | 390 |
| 391 CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument, | 391 CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument, |
| 392 CFX_ByteString csFontName) { | 392 CFX_ByteString csFontName) { |
| 393 if (!pDocument || csFontName.IsEmpty()) | 393 if (!pDocument || csFontName.IsEmpty()) |
| 394 return nullptr; | 394 return nullptr; |
| 395 | 395 |
| 396 if (csFontName == "ZapfDingbats") | 396 if (csFontName == "ZapfDingbats") |
| 397 return pDocument->AddStandardFont(csFontName.c_str(), nullptr); | 397 return pDocument->AddStandardFont(csFontName.c_str(), nullptr); |
| 398 | 398 |
| 399 CPDF_FontEncoding encoding(PDFFONT_ENCODING_WINANSI); | 399 CPDF_FontEncoding encoding(PDFFONT_ENCODING_WINANSI); |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 FDF_ImportField(pField, L"", bNotify); | 1272 FDF_ImportField(pField, L"", bNotify); |
| 1273 } | 1273 } |
| 1274 if (bNotify && m_pFormNotify != NULL) { | 1274 if (bNotify && m_pFormNotify != NULL) { |
| 1275 m_pFormNotify->AfterFormImportData(this); | 1275 m_pFormNotify->AfterFormImportData(this); |
| 1276 } | 1276 } |
| 1277 return TRUE; | 1277 return TRUE; |
| 1278 } | 1278 } |
| 1279 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1279 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1280 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1280 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1281 } | 1281 } |
| OLD | NEW |