Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: core/src/fpdfdoc/doc_form.cpp

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 2015-11-24 version Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 LPCSTR pcsFontName, 364 LPCSTR pcsFontName,
365 LOGFONTA& lf) { 365 LOGFONTA& lf) {
366 memset(&lf, 0, sizeof(LOGFONTA)); 366 memset(&lf, 0, sizeof(LOGFONTA));
367 lf.lfCharSet = charSet; 367 lf.lfCharSet = charSet;
368 lf.lfPitchAndFamily = pitchAndFamily; 368 lf.lfPitchAndFamily = pitchAndFamily;
369 if (pcsFontName != NULL) { 369 if (pcsFontName != NULL) {
370 strcpy(lf.lfFaceName, pcsFontName); 370 strcpy(lf.lfFaceName, pcsFontName);
371 } 371 }
372 return RetrieveSpecificFont(lf); 372 return RetrieveSpecificFont(lf);
373 } 373 }
374 #ifdef PDF_ENABLE_XFA
375 static FX_BOOL RetrieveStockFont(int iFontObject,
376 uint8_t charSet,
377 LOGFONTA& lf) {
378 HFONT hFont = (HFONT)::GetStockObject(iFontObject);
379 if (hFont != NULL) {
380 memset(&lf, 0, sizeof(LOGFONTA));
381 int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf);
382 if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) {
383 return RetrieveSpecificFont(lf);
384 }
385 }
386 return FALSE;
387 }
388 #endif
374 #endif 389 #endif
375 390
376 CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument, 391 CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument,
377 CFX_ByteString csFontName) { 392 CFX_ByteString csFontName) {
378 if (!pDocument || csFontName.IsEmpty()) 393 if (!pDocument || csFontName.IsEmpty())
379 return nullptr; 394 return nullptr;
380 395
381 if (csFontName == "ZapfDingbats") 396 if (csFontName == "ZapfDingbats")
382 return pDocument->AddStandardFont(csFontName.c_str(), nullptr); 397 return pDocument->AddStandardFont(csFontName.c_str(), nullptr);
383 398
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 FDF_ImportField(pField, L"", bNotify); 1272 FDF_ImportField(pField, L"", bNotify);
1258 } 1273 }
1259 if (bNotify && m_pFormNotify != NULL) { 1274 if (bNotify && m_pFormNotify != NULL) {
1260 m_pFormNotify->AfterFormImportData(this); 1275 m_pFormNotify->AfterFormImportData(this);
1261 } 1276 }
1262 return TRUE; 1277 return TRUE;
1263 } 1278 }
1264 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { 1279 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) {
1265 m_pFormNotify = (CPDF_FormNotify*)pNotify; 1280 m_pFormNotify = (CPDF_FormNotify*)pNotify;
1266 } 1281 }
OLDNEW
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698