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/fpdfdoc/doc_utils.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo 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_form.cpp ('k') | core/fpdftext/fpdf_text_int.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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 10 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 CPDF_Dictionary* pFonts = pDR->GetDictBy("Font"); 597 CPDF_Dictionary* pFonts = pDR->GetDictBy("Font");
598 if (!pFonts) { 598 if (!pFonts) {
599 pFonts = new CPDF_Dictionary; 599 pFonts = new CPDF_Dictionary;
600 pDR->SetAt("Font", pFonts); 600 pDR->SetAt("Font", pFonts);
601 } 601 }
602 if (csNameTag.IsEmpty()) { 602 if (csNameTag.IsEmpty()) {
603 csNameTag = pFont->GetBaseFont(); 603 csNameTag = pFont->GetBaseFont();
604 } 604 }
605 csNameTag.Remove(' '); 605 csNameTag.Remove(' ');
606 csNameTag = 606 csNameTag = CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4,
607 CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4, csNameTag); 607 csNameTag.c_str());
608 pFonts->SetAtReference(csNameTag.AsStringC(), pDocument, 608 pFonts->SetAtReference(csNameTag.AsStringC(), pDocument,
609 pFont->GetFontDict()); 609 pFont->GetFontDict());
610 } 610 }
611 CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict, 611 CPDF_Font* AddNativeInterFormFont(CPDF_Dictionary*& pFormDict,
612 CPDF_Document* pDocument, 612 CPDF_Document* pDocument,
613 uint8_t charSet, 613 uint8_t charSet,
614 CFX_ByteString& csNameTag) { 614 CFX_ByteString& csNameTag) {
615 if (!pFormDict) { 615 if (!pFormDict) {
616 InitInterFormDict(pFormDict, pDocument); 616 InitInterFormDict(pFormDict, pDocument);
617 } 617 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 CPDF_Object* pAttr = pFieldDict->GetDirectObjectBy(name); 746 CPDF_Object* pAttr = pFieldDict->GetDirectObjectBy(name);
747 if (pAttr) { 747 if (pAttr) {
748 return pAttr; 748 return pAttr;
749 } 749 }
750 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent"); 750 CPDF_Dictionary* pParent = pFieldDict->GetDictBy("Parent");
751 if (!pParent) { 751 if (!pParent) {
752 return NULL; 752 return NULL;
753 } 753 }
754 return FPDF_GetFieldAttr(pParent, name, nLevel + 1); 754 return FPDF_GetFieldAttr(pParent, name, nLevel + 1);
755 } 755 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_form.cpp ('k') | core/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698