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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 } | 461 } |
462 CPDF_Font* CPDF_InterForm::AddSystemFont(const CPDF_Document* pDocument, CFX_Wid
eString csFontName, FX_BYTE iCharSet) | 462 CPDF_Font* CPDF_InterForm::AddSystemFont(const CPDF_Document* pDocument, CFX_Wid
eString csFontName, FX_BYTE iCharSet) |
463 { | 463 { |
464 if (pDocument == NULL || csFontName.IsEmpty()) { | 464 if (pDocument == NULL || csFontName.IsEmpty()) { |
465 return NULL; | 465 return NULL; |
466 } | 466 } |
467 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 467 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
468 if (iCharSet == 1) { | 468 if (iCharSet == 1) { |
469 iCharSet = GetNativeCharSet(); | 469 iCharSet = GetNativeCharSet(); |
470 } | 470 } |
471 HFONT hFont = ::CreateFontW(0, 0, 0, 0, 0, 0, 0, 0, iCharSet, OUT_DEFAULT_PR
ECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, csFontN
ame); | 471 HFONT hFont = ::CreateFontW(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()); |
472 if (hFont != NULL) { | 472 if (hFont != NULL) { |
473 LOGFONTA lf; | 473 LOGFONTA lf; |
474 memset(&lf, 0, sizeof(LOGFONTA)); | 474 memset(&lf, 0, sizeof(LOGFONTA)); |
475 ::GetObject(hFont, sizeof(LOGFONTA), &lf); | 475 ::GetObject(hFont, sizeof(LOGFONTA), &lf); |
476 ::DeleteObject(hFont); | 476 ::DeleteObject(hFont); |
477 if (strlen(lf.lfFaceName) > 0) { | 477 if (strlen(lf.lfFaceName) > 0) { |
478 return ((CPDF_Document*)pDocument)->AddWindowsFont(&lf, FALSE, TRUE)
; | 478 return ((CPDF_Document*)pDocument)->AddWindowsFont(&lf, FALSE, TRUE)
; |
479 } | 479 } |
480 } | 480 } |
481 #endif | 481 #endif |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 continue; | 1656 continue; |
1657 } | 1657 } |
1658 CPDF_FormControl* pControl = NULL; | 1658 CPDF_FormControl* pControl = NULL; |
1659 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { | 1659 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { |
1660 return iNewPage; | 1660 return iNewPage; |
1661 } | 1661 } |
1662 } | 1662 } |
1663 } while (TRUE); | 1663 } while (TRUE); |
1664 return -1; | 1664 return -1; |
1665 } | 1665 } |
OLD | NEW |