summaryrefslogtreecommitdiff
path: root/core/fpdfapi/cmaps/Korea1
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-15 18:49:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-15 18:49:42 +0000
commit98ac76ec09ce72526134ad75f1921a1691804dd1 (patch)
treeed95e75069dc4a5477ab1f1d5393f72dc02a29c9 /core/fpdfapi/cmaps/Korea1
parent21ce4ff1b684d3ca42217485737b26f4af21634b (diff)
downloadpdfium-98ac76ec09ce72526134ad75f1921a1691804dd1.tar.xz
Move CPDF_ModuleMgr methods into cpdf_modulemgr.cpp.
Some of them were implemented in core/fpdfapi/cmaps. Reorder CPDF_ModuleMgr private methods as well. Change-Id: I88b7c48049de83591c961dd9a74e01fefb211c0c Reviewed-on: https://pdfium-review.googlesource.com/c/43991 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/cmaps/Korea1')
-rw-r--r--core/fpdfapi/cmaps/Korea1/cmaps_korea1.cpp15
-rw-r--r--core/fpdfapi/cmaps/Korea1/cmaps_korea1.h4
2 files changed, 5 insertions, 14 deletions
diff --git a/core/fpdfapi/cmaps/Korea1/cmaps_korea1.cpp b/core/fpdfapi/cmaps/Korea1/cmaps_korea1.cpp
index 4c9201269c..a95ab3ee33 100644
--- a/core/fpdfapi/cmaps/Korea1/cmaps_korea1.cpp
+++ b/core/fpdfapi/cmaps/Korea1/cmaps_korea1.cpp
@@ -6,12 +6,7 @@
#include "core/fpdfapi/cmaps/Korea1/cmaps_korea1.h"
-#include "core/fpdfapi/cmaps/cmap_int.h"
-#include "core/fpdfapi/cpdf_modulemgr.h"
-#include "core/fpdfapi/font/cpdf_fontglobals.h"
-#include "core/fpdfapi/page/cpdf_pagemodule.h"
-
-static const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = {
+const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = {
{"KSC-EUC-H", g_FXCMAP_KSC_EUC_H_0, nullptr, 467, 0, FXCMAP_CMap::Range, 0},
{"KSC-EUC-V", g_FXCMAP_KSC_EUC_V_0, nullptr, 16, 0, FXCMAP_CMap::Range, -1},
{"KSCms-UHC-H", g_FXCMAP_KSCms_UHC_H_1, nullptr, 675, 0, FXCMAP_CMap::Range,
@@ -34,10 +29,4 @@ static const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = {
FXCMAP_CMap::Range, -1},
};
-void CPDF_ModuleMgr::LoadEmbeddedKorea1CMaps() {
- CPDF_FontGlobals* pFontGlobals =
- CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
- pFontGlobals->SetEmbeddedCharset(CIDSET_KOREA1, g_FXCMAP_Korea1_cmaps);
- pFontGlobals->SetEmbeddedToUnicode(CIDSET_KOREA1,
- g_FXCMAP_Korea1CID2Unicode_2);
-}
+const size_t g_FXCMAP_Korea1_cmaps_size = FX_ArraySize(g_FXCMAP_Korea1_cmaps);
diff --git a/core/fpdfapi/cmaps/Korea1/cmaps_korea1.h b/core/fpdfapi/cmaps/Korea1/cmaps_korea1.h
index 27b9b0b7c4..b60813504a 100644
--- a/core/fpdfapi/cmaps/Korea1/cmaps_korea1.h
+++ b/core/fpdfapi/cmaps/Korea1/cmaps_korea1.h
@@ -7,7 +7,7 @@
#ifndef CORE_FPDFAPI_CMAPS_KOREA1_CMAPS_KOREA1_H_
#define CORE_FPDFAPI_CMAPS_KOREA1_CMAPS_KOREA1_H_
-#include <stdint.h>
+#include "core/fpdfapi/cmaps/cmap_int.h"
extern const uint16_t g_FXCMAP_KSC_EUC_H_0[];
extern const uint16_t g_FXCMAP_KSC_EUC_V_0[];
@@ -20,5 +20,7 @@ extern const uint16_t g_FXCMAP_UniKS_UCS2_H_1[];
extern const uint16_t g_FXCMAP_UniKS_UCS2_V_1[];
extern const uint16_t g_FXCMAP_UniKS_UTF16_H_0[];
extern const uint16_t g_FXCMAP_Korea1CID2Unicode_2[18352];
+extern const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[];
+extern const size_t g_FXCMAP_Korea1_cmaps_size;
#endif // CORE_FPDFAPI_CMAPS_KOREA1_CMAPS_KOREA1_H_