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

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

Issue 1636503006: Merge to XFA: War on #defines, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Dircet -> Direct typo. Created 4 years, 11 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
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | core/src/fpdftext/fpdf_text.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 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) { 10 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 if (!pValue && m_Type != Text) { 294 if (!pValue && m_Type != Text) {
295 pValue = FPDF_GetFieldAttr(m_pDict, "DV"); 295 pValue = FPDF_GetFieldAttr(m_pDict, "DV");
296 } 296 }
297 } 297 }
298 if (!pValue) { 298 if (!pValue) {
299 return CFX_WideString(); 299 return CFX_WideString();
300 } 300 }
301 } 301 }
302 switch (pValue->GetType()) { 302 switch (pValue->GetType()) {
303 case PDFOBJ_STRING: 303 case CPDF_Object::STRING:
304 case PDFOBJ_STREAM: 304 case CPDF_Object::STREAM:
305 return pValue->GetUnicodeText(); 305 return pValue->GetUnicodeText();
306 case PDFOBJ_ARRAY: 306 case CPDF_Object::ARRAY:
307 pValue = pValue->AsArray()->GetElementValue(0); 307 pValue = pValue->AsArray()->GetElementValue(0);
308 if (pValue) 308 if (pValue)
309 return pValue->GetUnicodeText(); 309 return pValue->GetUnicodeText();
310 break; 310 break;
311 default:
312 break;
311 } 313 }
312 return CFX_WideString(); 314 return CFX_WideString();
313 } 315 }
314 CFX_WideString CPDF_FormField::GetValue() { 316 CFX_WideString CPDF_FormField::GetValue() {
315 return GetValue(FALSE); 317 return GetValue(FALSE);
316 } 318 }
317 CFX_WideString CPDF_FormField::GetDefaultValue() { 319 CFX_WideString CPDF_FormField::GetDefaultValue() {
318 return GetValue(TRUE); 320 return GetValue(TRUE);
319 } 321 }
320 FX_BOOL CPDF_FormField::SetValue(const CFX_WideString& value, 322 FX_BOOL CPDF_FormField::SetValue(const CFX_WideString& value,
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")) 1094 m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font"))
1093 pFontDict = m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")->GetDict( 1095 pFontDict = m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")->GetDict(
1094 font_name); 1096 font_name);
1095 1097
1096 if (!pFontDict) { 1098 if (!pFontDict) {
1097 return; 1099 return;
1098 } 1100 }
1099 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); 1101 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict);
1100 m_FontSize = FX_atof(syntax.GetWord()); 1102 m_FontSize = FX_atof(syntax.GetWord());
1101 } 1103 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | core/src/fpdftext/fpdf_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698