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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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_link.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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 CFX_ByteString DA; 1047 CFX_ByteString DA;
1048 if (CPDF_Object* pObj_t = FPDF_GetFieldAttr(m_pDict, "DA")) { 1048 if (CPDF_Object* pObj_t = FPDF_GetFieldAttr(m_pDict, "DA")) {
1049 DA = pObj_t->GetString(); 1049 DA = pObj_t->GetString();
1050 } 1050 }
1051 if (DA.IsEmpty() && m_pForm->m_pFormDict) { 1051 if (DA.IsEmpty() && m_pForm->m_pFormDict) {
1052 DA = m_pForm->m_pFormDict->GetStringBy("DA"); 1052 DA = m_pForm->m_pFormDict->GetStringBy("DA");
1053 } 1053 }
1054 if (DA.IsEmpty()) { 1054 if (DA.IsEmpty()) {
1055 return; 1055 return;
1056 } 1056 }
1057 CPDF_SimpleParser syntax(DA.AsByteStringC()); 1057 CPDF_SimpleParser syntax(DA.AsStringC());
1058 syntax.FindTagParamFromStart("Tf", 2); 1058 syntax.FindTagParamFromStart("Tf", 2);
1059 CFX_ByteString font_name = syntax.GetWord(); 1059 CFX_ByteString font_name = syntax.GetWord();
1060 CPDF_Dictionary* pFontDict = NULL; 1060 CPDF_Dictionary* pFontDict = NULL;
1061 if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDictBy("DR") && 1061 if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDictBy("DR") &&
1062 m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font")) 1062 m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font"))
1063 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR") 1063 pFontDict = m_pForm->m_pFormDict->GetDictBy("DR")
1064 ->GetDictBy("Font") 1064 ->GetDictBy("Font")
1065 ->GetDictBy(font_name.AsByteStringC()); 1065 ->GetDictBy(font_name.AsStringC());
1066 1066
1067 if (!pFontDict) { 1067 if (!pFontDict) {
1068 return; 1068 return;
1069 } 1069 }
1070 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict); 1070 m_pFont = m_pForm->m_pDocument->LoadFont(pFontDict);
1071 m_FontSize = FX_atof(syntax.GetWord()); 1071 m_FontSize = FX_atof(syntax.GetWord());
1072 } 1072 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_formcontrol.cpp ('k') | core/fpdfdoc/doc_link.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698