Chromium Code Reviews| 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 "../../core/include/fxcodec/fx_codec.h" | 7 #include "../../core/include/fxcodec/fx_codec.h" |
| 8 #include "../../core/include/fxcrt/fx_safe_types.h" | 8 #include "../../core/include/fxcrt/fx_safe_types.h" |
| 9 #include "../../public/fpdf_ext.h" | 9 #include "../../public/fpdf_ext.h" |
| 10 #include "../../public/fpdf_progressive.h" | 10 #include "../../public/fpdf_progressive.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 CPDF_SubstFont* pSubstFont // [OUT] Subst font data | 84 CPDF_SubstFont* pSubstFont // [OUT] Subst font data |
| 85 ); | 85 ); |
| 86 | 86 |
| 87 FT_Face m_SysFace; | 87 FT_Face m_SysFace; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 CFontMapper* g_pFontMapper = NULL; | 90 CFontMapper* g_pFontMapper = NULL; |
| 91 #endif // #if _FX_OS_ == _FX_LINUX_EMBEDDED_ | 91 #endif // #if _FX_OS_ == _FX_LINUX_EMBEDDED_ |
| 92 | 92 |
| 93 DLLEXPORT void STDCALL FPDF_InitLibrary() { | 93 DLLEXPORT void STDCALL FPDF_InitLibrary() { |
| 94 FPDF_InitLibraryWithConfig(nullptr); | |
| 95 } | |
| 96 | |
| 97 DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig( | |
| 98 const FPDF_LIBRARY_CONFIG* cfg) { | |
|
Nico
2015/08/13 22:02:06
This too isn't clang-formatted. How do you upload
| |
| 94 g_pCodecModule = new CCodec_ModuleMgr(); | 99 g_pCodecModule = new CCodec_ModuleMgr(); |
| 95 | 100 |
| 96 CFX_GEModule::Create(); | 101 CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr); |
| 97 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); | 102 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); |
| 98 | 103 |
| 99 CPDF_ModuleMgr::Create(); | 104 CPDF_ModuleMgr::Create(); |
| 100 CPDF_ModuleMgr::Get()->SetCodecModule(g_pCodecModule); | 105 CPDF_ModuleMgr::Get()->SetCodecModule(g_pCodecModule); |
| 101 CPDF_ModuleMgr::Get()->InitPageModule(); | 106 CPDF_ModuleMgr::Get()->InitPageModule(); |
| 102 CPDF_ModuleMgr::Get()->InitRenderModule(); | 107 CPDF_ModuleMgr::Get()->InitRenderModule(); |
| 103 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); | 108 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); |
| 104 if (pModuleMgr) { | 109 if (pModuleMgr) { |
| 105 pModuleMgr->LoadEmbeddedGB1CMaps(); | 110 pModuleMgr->LoadEmbeddedGB1CMaps(); |
| 106 pModuleMgr->LoadEmbeddedJapan1CMaps(); | 111 pModuleMgr->LoadEmbeddedJapan1CMaps(); |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 907 if (!buffer) { | 912 if (!buffer) { |
| 908 *buflen = len; | 913 *buflen = len; |
| 909 } else if (*buflen >= len) { | 914 } else if (*buflen >= len) { |
| 910 memcpy(buffer, utf16Name.c_str(), len); | 915 memcpy(buffer, utf16Name.c_str(), len); |
| 911 *buflen = len; | 916 *buflen = len; |
| 912 } else { | 917 } else { |
| 913 *buflen = -1; | 918 *buflen = -1; |
| 914 } | 919 } |
| 915 return (FPDF_DEST)pDestObj; | 920 return (FPDF_DEST)pDestObj; |
| 916 } | 921 } |
| OLD | NEW |