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

Side by Side Diff: core/fpdfapi/fpdf_edit/fpdf_edit_doc.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/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font.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 <limits.h> 7 #include <limits.h>
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" 10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h"
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 return NULL; 1117 return NULL;
1118 } 1118 }
1119 return pDict; 1119 return pDict;
1120 } 1120 }
1121 1121
1122 CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font, 1122 CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font,
1123 CPDF_FontEncoding* pEncoding) { 1123 CPDF_FontEncoding* pEncoding) {
1124 CFX_ByteString name(font); 1124 CFX_ByteString name(font);
1125 if (PDF_GetStandardFontName(&name) < 0) 1125 if (PDF_GetStandardFontName(&name) < 0)
1126 return nullptr; 1126 return nullptr;
1127 return GetPageData()->GetStandardFont(name.AsByteStringC(), pEncoding); 1127 return GetPageData()->GetStandardFont(name.AsStringC(), pEncoding);
1128 } 1128 }
1129 1129
1130 void CPDF_Document::DeletePage(int iPage) { 1130 void CPDF_Document::DeletePage(int iPage) {
1131 CPDF_Dictionary* pRoot = GetRoot(); 1131 CPDF_Dictionary* pRoot = GetRoot();
1132 if (!pRoot) { 1132 if (!pRoot) {
1133 return; 1133 return;
1134 } 1134 }
1135 CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages"); 1135 CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
1136 if (!pPages) { 1136 if (!pPages) {
1137 return; 1137 return;
(...skipping 13 matching lines...) Expand all
1151 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict, 1151 void FPDFAPI_FlatPageAttr(CPDF_Dictionary* pPageDict,
1152 const CFX_ByteStringC& name) { 1152 const CFX_ByteStringC& name) {
1153 if (pPageDict->KeyExist(name)) { 1153 if (pPageDict->KeyExist(name)) {
1154 return; 1154 return;
1155 } 1155 }
1156 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name); 1156 CPDF_Object* pObj = FPDFAPI_GetPageAttr(pPageDict, name);
1157 if (pObj) { 1157 if (pObj) {
1158 pPageDict->SetAt(name, pObj->Clone()); 1158 pPageDict->SetAt(name, pObj->Clone());
1159 } 1159 }
1160 } 1160 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698