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

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

Issue 1889863002: Make CPDF_Dictionary methods take CFX_ByteString arguments (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: One last caller. Created 4 years, 8 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/fpdfdoc/doc_formcontrol.cpp ('k') | core/fpdfdoc/doc_ocg.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/fpdfapi/fpdf_parser/include/cfdf_document.h" 7 #include "core/fpdfapi/fpdf_parser/include/cfdf_document.h"
8 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 8 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h"
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 DA = m_pForm->m_pFormDict->GetStringBy("DA"); 1058 DA = m_pForm->m_pFormDict->GetStringBy("DA");
1059 } 1059 }
1060 if (DA.IsEmpty()) { 1060 if (DA.IsEmpty()) {
1061 return; 1061 return;
1062 } 1062 }
1063 CPDF_SimpleParser syntax(DA.AsStringC()); 1063 CPDF_SimpleParser syntax(DA.AsStringC());
1064 syntax.FindTagParamFromStart("Tf", 2); 1064 syntax.FindTagParamFromStart("Tf", 2);
1065 CFX_ByteString font_name = syntax.GetWord(); 1065 CFX_ByteString font_name = syntax.GetWord();
1066 CPDF_Dictionary* pFontDict = NULL; 1066 CPDF_Dictionary* pFontDict = NULL;
1067 if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDictBy("DR") && 1067 if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDictBy("DR") &&
1068 m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font")) 1068 m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font")) {
1069 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR") 1069 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR")
1070 ->GetDictBy("Font") 1070 ->GetDictBy("Font")
1071 ->GetDictBy(font_name.AsStringC()); 1071 ->GetDictBy(font_name);
1072 1072 }
1073 if (!pFontDict) { 1073 if (!pFontDict) {
1074 return; 1074 return;
1075 } 1075 }
1076 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); 1076 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict);
1077 m_FontSize = FX_atof(syntax.GetWord()); 1077 m_FontSize = FX_atof(syntax.GetWord());
1078 } 1078 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_formcontrol.cpp ('k') | core/fpdfdoc/doc_ocg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698