OLD | NEW |
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 "../../include/formfiller/FormFiller.h" | 7 #include "../../include/formfiller/FormFiller.h" |
8 #include "../../include/formfiller/FFL_CBA_Fontmap.h" | 8 #include "../../include/formfiller/FFL_CBA_Fontmap.h" |
9 | 9 |
10 CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandle
r) : | 10 CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot, IFX_SystemHandler* pSystemHandle
r) : |
(...skipping 25 matching lines...) Expand all Loading... |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 void CBA_FontMap::Reset() | 39 void CBA_FontMap::Reset() |
40 { | 40 { |
41 Empty(); | 41 Empty(); |
42 m_pDefaultFont = NULL; | 42 m_pDefaultFont = NULL; |
43 m_sDefaultFontName = ""; | 43 m_sDefaultFontName = ""; |
44 } | 44 } |
45 | 45 |
46 void CBA_FontMap::Initial(FX_LPCSTR fontname) | 46 void CBA_FontMap::Initial(const FX_CHAR* fontname) |
47 { | 47 { |
48 int32_t nCharset = DEFAULT_CHARSET; | 48 int32_t nCharset = DEFAULT_CHARSET; |
49 | 49 |
50 if (!m_pDefaultFont) | 50 if (!m_pDefaultFont) |
51 { | 51 { |
52 m_pDefaultFont = GetAnnotDefaultFont(m_sDefaultFontName); | 52 m_pDefaultFont = GetAnnotDefaultFont(m_sDefaultFontName); |
53 if (m_pDefaultFont) | 53 if (m_pDefaultFont) |
54 { | 54 { |
55 if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->Ge
tSubstFont()) | 55 if (const CFX_SubstFont* pSubstFont = m_pDefaultFont->Ge
tSubstFont()) |
56 nCharset = pSubstFont->m_Charset; | 56 nCharset = pSubstFont->m_Charset; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } | 293 } |
294 | 294 |
295 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) | 295 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) |
296 { | 296 { |
297 m_sAPType = sAPType; | 297 m_sAPType = sAPType; |
298 | 298 |
299 Reset(); | 299 Reset(); |
300 Initial(); | 300 Initial(); |
301 } | 301 } |
302 | 302 |
OLD | NEW |