summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_ap.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-24 08:57:35 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-24 13:32:10 +0000
commitc08dc39850188d96ad81f5800c7a51d2663eeb44 (patch)
tree9e132af2dd7989ea3375013c1109dd6dadb4cd55 /fpdfsdk/fxedit/fxet_ap.cpp
parent677275efd05ce5dcbbd62f474db1f0a59e45cce8 (diff)
downloadpdfium-c08dc39850188d96ad81f5800c7a51d2663eeb44.tar.xz
Remove fx_edit.h
This CL moves GetPDFWordString to be a method on CFX_Edit. The FX_EDIT_ISLATINWORD define is moved into fx_edit.h. CFWL_Edit::FX_EDIT_ISLATINWORD is renamed to FxEditIsLatinWord to make less confusing with the define. Change-Id: I47d12d41447b268894a1d0376ac4b2bdb409e2df Reviewed-on: https://pdfium-review.googlesource.com/8531 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fxedit/fxet_ap.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_ap.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp
deleted file mode 100644
index 1576efa89a..0000000000
--- a/fpdfsdk/fxedit/fxet_ap.cpp
+++ /dev/null
@@ -1,36 +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/fpdfapi/font/cpdf_font.h"
-#include "core/fpdfapi/parser/fpdf_parser_decode.h"
-#include "core/fpdfdoc/cpvt_word.h"
-#include "core/fpdfdoc/ipvt_fontmap.h"
-#include "fpdfsdk/fxedit/fx_edit.h"
-#include "fpdfsdk/fxedit/fxet_edit.h"
-
-CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap,
- int32_t nFontIndex,
- uint16_t Word,
- uint16_t SubWord) {
- CPDF_Font* pPDFFont = pFontMap->GetPDFFont(nFontIndex);
- if (!pPDFFont)
- return CFX_ByteString();
-
- CFX_ByteString sWord;
- if (SubWord > 0) {
- Word = SubWord;
- } else {
- uint32_t dwCharCode = pPDFFont->IsUnicodeCompatible()
- ? pPDFFont->CharCodeFromUnicode(Word)
- : pFontMap->CharCodeFromUnicode(nFontIndex, Word);
- if (dwCharCode > 0) {
- pPDFFont->AppendChar(&sWord, dwCharCode);
- return sWord;
- }
- }
- pPDFFont->AppendChar(&sWord, Word);
- return sWord;
-}