| 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 "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "../../include/fpdfdoc/fpdf_doc.h" |
| 8 #include "../../include/fxcrt/fx_xml.h" | 8 #include "../../include/fxcrt/fx_xml.h" |
| 9 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); | 9 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); |
| 10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu
ment* pDocument); | 10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu
ment* pDocument); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 439 } |
| 440 CPDF_Font* CPDF_InterForm::AddSystemFont(const CPDF_Document* pDocument, CFX_Byt
eString csFontName, FX_BYTE iCharSet) | 440 CPDF_Font* CPDF_InterForm::AddSystemFont(const CPDF_Document* pDocument, CFX_Byt
eString csFontName, FX_BYTE iCharSet) |
| 441 { | 441 { |
| 442 if (pDocument == NULL || csFontName.IsEmpty()) { | 442 if (pDocument == NULL || csFontName.IsEmpty()) { |
| 443 return NULL; | 443 return NULL; |
| 444 } | 444 } |
| 445 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 445 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 446 if (iCharSet == 1) { | 446 if (iCharSet == 1) { |
| 447 iCharSet = GetNativeCharSet(); | 447 iCharSet = GetNativeCharSet(); |
| 448 } | 448 } |
| 449 HFONT hFont = ::CreateFontA(0, 0, 0, 0, 0, 0, 0, 0, iCharSet, OUT_DEFAULT_PR
ECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, (FX_LPC
STR)csFontName); | 449 HFONT hFont = ::CreateFontA(0, 0, 0, 0, 0, 0, 0, 0, iCharSet, OUT_DEFAULT_PR
ECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, csFontN
ame.c_str()); |
| 450 if (hFont != NULL) { | 450 if (hFont != NULL) { |
| 451 LOGFONTA lf; | 451 LOGFONTA lf; |
| 452 memset(&lf, 0, sizeof(LOGFONTA)); | 452 memset(&lf, 0, sizeof(LOGFONTA)); |
| 453 ::GetObjectA(hFont, sizeof(LOGFONTA), &lf); | 453 ::GetObjectA(hFont, sizeof(LOGFONTA), &lf); |
| 454 ::DeleteObject(hFont); | 454 ::DeleteObject(hFont); |
| 455 if (strlen(lf.lfFaceName) > 0) { | 455 if (strlen(lf.lfFaceName) > 0) { |
| 456 return ((CPDF_Document*)pDocument)->AddWindowsFont(&lf, FALSE, TRUE)
; | 456 return ((CPDF_Document*)pDocument)->AddWindowsFont(&lf, FALSE, TRUE)
; |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 #endif | 459 #endif |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 continue; | 1655 continue; |
| 1656 } | 1656 } |
| 1657 CPDF_FormControl* pControl = NULL; | 1657 CPDF_FormControl* pControl = NULL; |
| 1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { | 1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { |
| 1659 return iNewPage; | 1659 return iNewPage; |
| 1660 } | 1660 } |
| 1661 } | 1661 } |
| 1662 } while (TRUE); | 1662 } while (TRUE); |
| 1663 return -1; | 1663 return -1; |
| 1664 } | 1664 } |
| OLD | NEW |