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

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 809513002: XFA: merge patch from issue 801913002 and 804463003 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index ae8f3ccd911a52b5215c491740e99eb3db0bc4fc..5ff201f1707be55b7cadba31d0c0c6442d8d93cc 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -211,40 +211,8 @@ public:
CFontMapper* g_pFontMapper = NULL;
#endif // #if _FX_OS_ == _FX_LINUX_EMBEDDED_
-DLLEXPORT void STDCALL FPDF_InitLibrary(FX_LPVOID hInstance)
+DLLEXPORT void STDCALL FPDF_InitLibrary()
{
-#ifdef API5
- CPDF_ModuleMgr::Create();
- g_pModuleMgr = CPDF_ModuleMgr::Get();
- #if _FX_OS_ == _FX_WIN32_MOBILE_ || _FX_OS_ == _FX_LINUX_EMBEDDED_
- g_pModuleMgr->InitEmbedded();
- #ifdef _GB1_CMAPS_
- g_pModuleMgr->LoadEmbeddedGB1CMaps();
- #endif
- #ifdef _GB1_CMAPS_4_
- g_pModuleMgr->LoadEmbeddedGB1CMaps_4();
- #endif
- #ifdef _CNS1_CMAPS_
- g_pModuleMgr->LoadEmbeddedCNS1CMaps();
- #endif
- #ifdef _JAPAN1_CMAPS_
- g_pModuleMgr->LoadEmbeddedJapan1CMaps();
- #endif
- #ifdef _JAPAN1_CMAPS_6_
- g_pModuleMgr->LoadEmbeddedJapan1CMaps_6();
- #endif
- #ifdef _KOREA1_CMAPS_
- g_pModuleMgr->LoadEmbeddedKorea1CMaps();
- #endif
- #ifdef _JPX_DECODER_
- g_pModuleMgr->InitJpxModule();
- g_pModuleMgr->InitJbig2Module();
- // g_pModuleMgr->InitIccModule();
- #endif
- #else
- g_pModuleMgr->InitDesktop();
- #endif
-#else
g_pCodecModule = CCodec_ModuleMgr::Create();
CFX_GEModule::Create();
@@ -254,42 +222,9 @@ DLLEXPORT void STDCALL FPDF_InitLibrary(FX_LPVOID hInstance)
CPDF_ModuleMgr::Get()->SetCodecModule(g_pCodecModule);
CPDF_ModuleMgr::Get()->InitPageModule();
CPDF_ModuleMgr::Get()->InitRenderModule();
-#ifdef FOXIT_CHROME_BUILD
- CPDF_ModuleMgr * pModuleMgr = CPDF_ModuleMgr::Get();
- if ( pModuleMgr )
- {
- pModuleMgr->LoadEmbeddedGB1CMaps();
- pModuleMgr->LoadEmbeddedJapan1CMaps();
- pModuleMgr->LoadEmbeddedCNS1CMaps();
- pModuleMgr->LoadEmbeddedKorea1CMaps();
- }
-#endif
-#endif
CPDFXFA_App* pAppProvider = FPDFXFA_GetApp();
pAppProvider->Initialize();
-
-#ifdef _WIN32
- // Get module path
- TCHAR app_path[MAX_PATH];
- ::GetModuleFileName((HINSTANCE)hInstance, app_path, MAX_PATH);
- size_t len = _tcslen(app_path);
- for (size_t i = len; i >= 0; i --)
- if (app_path[i] == '\\') {
- app_path[i] = 0;
- break;
- }
-
-#ifdef _UNICODE
- #ifndef _FXSDK_OPENSOURCE_
- CPDF_ModuleMgr::Get()->SetModulePath(NULL, CFX_ByteString::FromUnicode(app_path));
- #endif
-#else
-#ifndef _FXSDK_OPENSOURCE_
- CPDF_ModuleMgr::Get()->SetModulePath(NULL, app_path);
-#endif
-#endif
-#endif
}
@@ -307,11 +242,6 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary()
CFX_GEModule::Destroy();
g_pCodecModule->Destroy();
#endif
-#ifndef _FXSDK_OPENSOURCE_
- FXMEM_CollectAll(FXMEM_GetDefaultMgr());
-#else
-
-#endif
}
#ifndef _WIN32
@@ -864,7 +794,6 @@ DLLEXPORT void STDCALL FPDFBitmap_Destroy(FPDF_BITMAP bitmap)
void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,
int rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause )
{
-//#ifdef _LICENSED_BUILD_
CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
if (pPage == NULL) return;
« no previous file with comments | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698