| 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 "core/src/fpdfdoc/doc_utils.h" | 8 #include "core/src/fpdfdoc/doc_utils.h" |
| 9 #include "third_party/base/stl_util.h" | 9 #include "third_party/base/stl_util.h" |
| 10 | 10 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 if (pcsFontName) { | 386 if (pcsFontName) { |
| 387 strcpy(lf.lfFaceName, pcsFontName); | 387 strcpy(lf.lfFaceName, pcsFontName); |
| 388 } | 388 } |
| 389 return RetrieveSpecificFont(lf); | 389 return RetrieveSpecificFont(lf); |
| 390 } | 390 } |
| 391 #ifdef PDF_ENABLE_XFA | 391 #ifdef PDF_ENABLE_XFA |
| 392 static FX_BOOL RetrieveStockFont(int iFontObject, | 392 static FX_BOOL RetrieveStockFont(int iFontObject, |
| 393 uint8_t charSet, | 393 uint8_t charSet, |
| 394 LOGFONTA& lf) { | 394 LOGFONTA& lf) { |
| 395 HFONT hFont = (HFONT)::GetStockObject(iFontObject); | 395 HFONT hFont = (HFONT)::GetStockObject(iFontObject); |
| 396 if (hFont != NULL) { | 396 if (hFont) { |
| 397 memset(&lf, 0, sizeof(LOGFONTA)); | 397 memset(&lf, 0, sizeof(LOGFONTA)); |
| 398 int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf); | 398 int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf); |
| 399 if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) { | 399 if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) { |
| 400 return RetrieveSpecificFont(lf); | 400 return RetrieveSpecificFont(lf); |
| 401 } | 401 } |
| 402 } | 402 } |
| 403 return FALSE; | 403 return FALSE; |
| 404 } | 404 } |
| 405 #endif // PDF_ENABLE_XFA | 405 #endif // PDF_ENABLE_XFA |
| 406 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 406 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 FDF_ImportField(pField, L"", bNotify); | 1207 FDF_ImportField(pField, L"", bNotify); |
| 1208 } | 1208 } |
| 1209 if (bNotify && m_pFormNotify) { | 1209 if (bNotify && m_pFormNotify) { |
| 1210 m_pFormNotify->AfterFormImportData(this); | 1210 m_pFormNotify->AfterFormImportData(this); |
| 1211 } | 1211 } |
| 1212 return TRUE; | 1212 return TRUE; |
| 1213 } | 1213 } |
| 1214 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1214 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1215 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1215 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1216 } | 1216 } |
| OLD | NEW |