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

Side by Side Diff: core/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1800523005: Move core/src/ up to core/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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_font/font_int.h ('k') | core/fpdfapi/fpdf_font/fpdf_font_charset.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/src/fpdfapi/fpdf_font/font_int.h" 7 #include "core/fpdfapi/fpdf_font/font_int.h"
8 8
9 #include "core/fpdfapi/fpdf_page/pageint.h"
9 #include "core/include/fpdfapi/cpdf_array.h" 10 #include "core/include/fpdfapi/cpdf_array.h"
10 #include "core/include/fpdfapi/cpdf_dictionary.h" 11 #include "core/include/fpdfapi/cpdf_dictionary.h"
11 #include "core/include/fpdfapi/cpdf_document.h" 12 #include "core/include/fpdfapi/cpdf_document.h"
12 #include "core/include/fpdfapi/cpdf_name.h" 13 #include "core/include/fpdfapi/cpdf_name.h"
13 #include "core/include/fpdfapi/cpdf_number.h" 14 #include "core/include/fpdfapi/cpdf_number.h"
14 #include "core/include/fpdfapi/cpdf_simple_parser.h" 15 #include "core/include/fpdfapi/cpdf_simple_parser.h"
15 #include "core/include/fpdfapi/fpdf_module.h" 16 #include "core/include/fpdfapi/fpdf_module.h"
16 #include "core/include/fpdfapi/fpdf_page.h" 17 #include "core/include/fpdfapi/fpdf_page.h"
17 #include "core/include/fpdfapi/fpdf_pageobj.h" 18 #include "core/include/fpdfapi/fpdf_pageobj.h"
18 #include "core/include/fpdfapi/fpdf_resource.h" 19 #include "core/include/fpdfapi/fpdf_resource.h"
19 #include "core/include/fxcrt/fx_ext.h" 20 #include "core/include/fxcrt/fx_ext.h"
20 #include "core/include/fxge/fx_freetype.h" 21 #include "core/include/fxge/fx_freetype.h"
21 #include "core/src/fpdfapi/fpdf_page/pageint.h"
22 #include "third_party/base/stl_util.h" 22 #include "third_party/base/stl_util.h"
23 23
24 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 24 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
25 #include "core/src/fxge/apple/apple_int.h" 25 #include "core/fxge/apple/apple_int.h"
26 #endif 26 #endif
27 27
28 namespace { 28 namespace {
29 29
30 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 30 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
31 struct GlyphNameMap { 31 struct GlyphNameMap {
32 const FX_CHAR* m_pStrAdobe; 32 const FX_CHAR* m_pStrAdobe;
33 const FX_CHAR* m_pStrUnicode; 33 const FX_CHAR* m_pStrUnicode;
34 }; 34 };
35 35
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (index < 0 || index >= FX_ArraySize(m_StockFonts)) 131 if (index < 0 || index >= FX_ArraySize(m_StockFonts))
132 return; 132 return;
133 m_StockFonts[index].reset(font); 133 m_StockFonts[index].reset(font);
134 } 134 }
135 135
136 CPDF_FontGlobals::CPDF_FontGlobals() { 136 CPDF_FontGlobals::CPDF_FontGlobals() {
137 FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); 137 FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets));
138 FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); 138 FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes));
139 } 139 }
140 140
141 CPDF_FontGlobals::~CPDF_FontGlobals() { 141 CPDF_FontGlobals::~CPDF_FontGlobals() {}
142 }
143 142
144 CPDF_Font* CPDF_FontGlobals::Find(CPDF_Document* pDoc, int index) { 143 CPDF_Font* CPDF_FontGlobals::Find(CPDF_Document* pDoc, int index) {
145 auto it = m_StockMap.find(pDoc); 144 auto it = m_StockMap.find(pDoc);
146 if (it == m_StockMap.end()) 145 if (it == m_StockMap.end())
147 return nullptr; 146 return nullptr;
148 return it->second ? it->second->GetFont(index) : nullptr; 147 return it->second ? it->second->GetFont(index) : nullptr;
149 } 148 }
150 149
151 void CPDF_FontGlobals::Set(CPDF_Document* pDoc, int index, CPDF_Font* pFont) { 150 void CPDF_FontGlobals::Set(CPDF_Document* pDoc, int index, CPDF_Font* pFont) {
152 if (!pdfium::ContainsKey(m_StockMap, pDoc)) 151 if (!pdfium::ContainsKey(m_StockMap, pDoc))
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 return pChar ? pChar->m_BBox : FX_RECT(); 1805 return pChar ? pChar->m_BBox : FX_RECT();
1807 } 1806 }
1808 1807
1809 CPDF_Type3Char::CPDF_Type3Char(CPDF_Form* pForm) 1808 CPDF_Type3Char::CPDF_Type3Char(CPDF_Form* pForm)
1810 : m_pForm(pForm), m_pBitmap(nullptr), m_bColored(FALSE) {} 1809 : m_pForm(pForm), m_pBitmap(nullptr), m_bColored(FALSE) {}
1811 1810
1812 CPDF_Type3Char::~CPDF_Type3Char() { 1811 CPDF_Type3Char::~CPDF_Type3Char() {
1813 delete m_pForm; 1812 delete m_pForm;
1814 delete m_pBitmap; 1813 delete m_pBitmap;
1815 } 1814 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/font_int.h ('k') | core/fpdfapi/fpdf_font/fpdf_font_charset.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698