summaryrefslogtreecommitdiff
path: root/core/fpdftext/unicodenormalization.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-19 10:39:24 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-19 10:39:24 -0700
commita28ae388f3859c52630deb6ef3d0ea468e5177e3 (patch)
tree1ab55ded754a5d1fc6ab5702e9d2244e5830ed68 /core/fpdftext/unicodenormalization.cpp
parent11178284eccf22306338cf0d252b8dbb946feb16 (diff)
downloadpdfium-a28ae388f3859c52630deb6ef3d0ea468e5177e3.tar.xz
Remove IPDF_TextPage, IPDF_TextPageFind and IPDF_LinkExtract interfaces.
Each was only used by one subclass. Removed and used the concrete classes. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1897993002
Diffstat (limited to 'core/fpdftext/unicodenormalization.cpp')
-rw-r--r--core/fpdftext/unicodenormalization.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/core/fpdftext/unicodenormalization.cpp b/core/fpdftext/unicodenormalization.cpp
deleted file mode 100644
index 67ab57cb5d..0000000000
--- a/core/fpdftext/unicodenormalization.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "core/fpdftext/unicodenormalization.h"
-
-#include "core/fpdftext/unicodenormalizationdata.h"
-#include "core/fxcrt/include/fx_string.h"
-
-namespace {
-
-const uint16_t* const g_UnicodeData_Normalization_Maps[5] = {
- nullptr, g_UnicodeData_Normalization_Map1, g_UnicodeData_Normalization_Map2,
- g_UnicodeData_Normalization_Map3, g_UnicodeData_Normalization_Map4};
-
-} // namespace
-
-FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst) {
- wch = wch & 0xFFFF;
- FX_WCHAR wFind = g_UnicodeData_Normalization[wch];
- if (!wFind) {
- if (pDst) {
- *pDst = wch;
- }
- return 1;
- }
- if (wFind >= 0x8000) {
- wch = wFind - 0x8000;
- wFind = 1;
- } else {
- wch = wFind & 0x0FFF;
- wFind >>= 12;
- }
- const uint16_t* pMap = g_UnicodeData_Normalization_Maps[wFind];
- if (pMap == g_UnicodeData_Normalization_Map4) {
- pMap = g_UnicodeData_Normalization_Map4 + wch;
- wFind = (FX_WCHAR)(*pMap++);
- } else {
- pMap += wch;
- }
- if (pDst) {
- FX_WCHAR n = wFind;
- while (n--) {
- *pDst++ = *pMap++;
- }
- }
- return (FX_STRSIZE)wFind;
-}