summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2014-12-12 16:42:18 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2014-12-12 16:42:18 -0800
commit217ecf3b39f8d5c01260684848a8886c8ed2bf89 (patch)
tree1ab05e729480f2d8fab6882285c2e169c8ba007e /fpdfsdk/src/fpdfview.cpp
parent239955073722582152d9ab190794317dd775a1c1 (diff)
downloadpdfium-217ecf3b39f8d5c01260684848a8886c8ed2bf89.tar.xz
Simplify PDFium by removing code that's not used in the open source repo.
-remove parameter from FPDF_InitLibrary -remove a bunch of ifdefs that are unused R=tsepez@chromium.org Review URL: https://codereview.chromium.org/801913002
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp65
1 files changed, 1 insertions, 64 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index bd49862e1c..d8ec8c676a 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -106,40 +106,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();
@@ -149,7 +117,6 @@ 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 )
{
@@ -158,30 +125,6 @@ DLLEXPORT void STDCALL FPDF_InitLibrary(FX_LPVOID hInstance)
pModuleMgr->LoadEmbeddedCNS1CMaps();
pModuleMgr->LoadEmbeddedKorea1CMaps();
}
-#endif
-#endif
-
-#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
}
@@ -198,11 +141,6 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary()
CFX_GEModule::Destroy();
g_pCodecModule->Destroy();
#endif
-#ifndef _FXSDK_OPENSOURCE_
- FXMEM_CollectAll(FXMEM_GetDefaultMgr());
-#else
-
-#endif
}
#ifndef _WIN32
@@ -733,7 +671,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 = (CPDF_Page*)page;
if (pPage == NULL) return;