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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_document.cpp

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit Created 4 years, 7 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_page/pageint.h ('k') | core/fpdfapi/fpdf_parser/cpdf_security_handler.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/cpdf_document.h" 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 return; 832 return;
833 833
834 m_PageList.RemoveAt(iPage); 834 m_PageList.RemoveAt(iPage);
835 } 835 }
836 836
837 CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font, 837 CPDF_Font* CPDF_Document::AddStandardFont(const FX_CHAR* font,
838 CPDF_FontEncoding* pEncoding) { 838 CPDF_FontEncoding* pEncoding) {
839 CFX_ByteString name(font); 839 CFX_ByteString name(font);
840 if (PDF_GetStandardFontName(&name) < 0) 840 if (PDF_GetStandardFontName(&name) < 0)
841 return nullptr; 841 return nullptr;
842 return GetPageData()->GetStandardFont(name.AsStringC(), pEncoding); 842 return GetPageData()->GetStandardFont(name, pEncoding);
843 } 843 }
844 844
845 CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) { 845 CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert) {
846 if (!pFont) 846 if (!pFont)
847 return nullptr; 847 return nullptr;
848 848
849 bool bCJK = charset == FXFONT_CHINESEBIG5_CHARSET || 849 bool bCJK = charset == FXFONT_CHINESEBIG5_CHARSET ||
850 charset == FXFONT_GB2312_CHARSET || 850 charset == FXFONT_GB2312_CHARSET ||
851 charset == FXFONT_HANGEUL_CHARSET || 851 charset == FXFONT_HANGEUL_CHARSET ||
852 charset == FXFONT_SHIFTJIS_CHARSET; 852 charset == FXFONT_SHIFTJIS_CHARSET;
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 } 1439 }
1440 } 1440 }
1441 pFontDesc->SetAtInteger("StemV", fStemV); 1441 pFontDesc->SetAtInteger("StemV", fStemV);
1442 AddIndirectObject(pFontDesc); 1442 AddIndirectObject(pFontDesc);
1443 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc); 1443 pFontDict->SetAtReference("FontDescriptor", this, pFontDesc);
1444 CFRelease(traits); 1444 CFRelease(traits);
1445 CFRelease(languages); 1445 CFRelease(languages);
1446 return LoadFont(pBaseDict); 1446 return LoadFont(pBaseDict);
1447 } 1447 }
1448 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 1448 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/pageint.h ('k') | core/fpdfapi/fpdf_parser/cpdf_security_handler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698