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 "public/fpdfview.h" | 7 #include "public/fpdfview.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 | 234 |
235 CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr); | 235 CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr); |
236 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); | 236 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); |
237 | 237 |
238 CPDF_ModuleMgr::Create(); | 238 CPDF_ModuleMgr::Create(); |
239 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); | 239 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); |
240 pModuleMgr->SetCodecModule(g_pCodecModule); | 240 pModuleMgr->SetCodecModule(g_pCodecModule); |
241 pModuleMgr->InitPageModule(); | 241 pModuleMgr->InitPageModule(); |
242 pModuleMgr->InitRenderModule(); | 242 pModuleMgr->InitRenderModule(); |
243 #ifdef PDF_ENABLE_XFA | 243 #ifdef PDF_ENABLE_XFA |
244 CPDFXFA_App::GetInstance()->Initialize(); | 244 CPDFXFA_App::GetInstance()->Initialize( |
245 (cfg && cfg->version >= 2) ? (FXJSE_HRUNTIME)cfg->m_pIsolate : nullptr); | |
jun_fang
2016/02/01 11:01:19
Use C++ style cast.
jun_fang
2016/02/01 11:01:19
currently, we don't have the version which is larg
Jim Wang
2016/02/02 03:43:17
Follow the code in line 252.
Jim Wang
2016/02/02 03:43:17
Done.
| |
245 #else // PDF_ENABLE_XFA | 246 #else // PDF_ENABLE_XFA |
246 pModuleMgr->LoadEmbeddedGB1CMaps(); | 247 pModuleMgr->LoadEmbeddedGB1CMaps(); |
247 pModuleMgr->LoadEmbeddedJapan1CMaps(); | 248 pModuleMgr->LoadEmbeddedJapan1CMaps(); |
248 pModuleMgr->LoadEmbeddedCNS1CMaps(); | 249 pModuleMgr->LoadEmbeddedCNS1CMaps(); |
249 pModuleMgr->LoadEmbeddedKorea1CMaps(); | 250 pModuleMgr->LoadEmbeddedKorea1CMaps(); |
250 #endif // PDF_ENABLE_XFA | 251 #endif // PDF_ENABLE_XFA |
251 if (cfg && cfg->version >= 2) | 252 if (cfg && cfg->version >= 2) |
252 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate); | 253 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate); |
253 } | 254 } |
254 | 255 |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1193 if (!buffer) { | 1194 if (!buffer) { |
1194 *buflen = len; | 1195 *buflen = len; |
1195 } else if (*buflen >= len) { | 1196 } else if (*buflen >= len) { |
1196 memcpy(buffer, utf16Name.c_str(), len); | 1197 memcpy(buffer, utf16Name.c_str(), len); |
1197 *buflen = len; | 1198 *buflen = len; |
1198 } else { | 1199 } else { |
1199 *buflen = -1; | 1200 *buflen = -1; |
1200 } | 1201 } |
1201 return (FPDF_DEST)pDestObj; | 1202 return (FPDF_DEST)pDestObj; |
1202 } | 1203 } |
OLD | NEW |