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

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

Issue 1417033004: Merge to XFA: Add type cast definitions for CPDF_Name. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 months 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
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 "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 #include "doc_utils.h" 8 #include "doc_utils.h"
9 9
10 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) { 10 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 CFX_WideString opt_value = GetOptionValue(index); 522 CFX_WideString opt_value = GetOptionValue(index);
523 CPDF_Object* pValue = FPDF_GetFieldAttr(m_pDict, "V"); 523 CPDF_Object* pValue = FPDF_GetFieldAttr(m_pDict, "V");
524 if (pValue == NULL) { 524 if (pValue == NULL) {
525 pValue = FPDF_GetFieldAttr(m_pDict, "I"); 525 pValue = FPDF_GetFieldAttr(m_pDict, "I");
526 if (pValue == NULL) { 526 if (pValue == NULL) {
527 return FALSE; 527 return FALSE;
528 } 528 }
529 } 529 }
530 530
531 if (pValue->IsString()) 531 if (pValue->IsString())
532 return (pValue->GetUnicodeText() == opt_value); 532 return pValue->GetUnicodeText() == opt_value;
533 533
534 if (pValue->IsNumber()) { 534 if (pValue->IsNumber()) {
535 if (pValue->GetString().IsEmpty()) 535 if (pValue->GetString().IsEmpty())
536 return FALSE; 536 return FALSE;
537 return (pValue->GetInteger() == index); 537 return (pValue->GetInteger() == index);
538 } 538 }
539 539
540 if (pValue->GetType() != PDFOBJ_ARRAY) { 540 if (pValue->GetType() != PDFOBJ_ARRAY) {
541 return FALSE; 541 return FALSE;
542 } 542 }
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")) 1128 m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font"))
1129 pFontDict = m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")->GetDict( 1129 pFontDict = m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")->GetDict(
1130 font_name); 1130 font_name);
1131 1131
1132 if (pFontDict == NULL) { 1132 if (pFontDict == NULL) {
1133 return; 1133 return;
1134 } 1134 }
1135 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); 1135 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict);
1136 m_FontSize = FX_atof(syntax.GetWord()); 1136 m_FontSize = FX_atof(syntax.GetWord());
1137 } 1137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698