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

Unified Diff: core/fpdfdoc/doc_ap.cpp

Issue 1860063002: Remove core/include/fpdfdoc/fpdf_vt.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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 | « core/fpdfdoc/ctypeset.h ('k') | core/fpdfdoc/doc_vt.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/doc_ap.cpp
diff --git a/core/fpdfdoc/doc_ap.cpp b/core/fpdfdoc/doc_ap.cpp
deleted file mode 100644
index 440979e2297b98ba4acb4549c3212d4be7a86924..0000000000000000000000000000000000000000
--- a/core/fpdfdoc/doc_ap.cpp
+++ /dev/null
@@ -1,70 +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/fpdf_font/include/cpdf_font.h"
-#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
-#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
-#include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h"
-#include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h"
-#include "core/fpdfdoc/cpvt_provider.h"
-#include "core/fpdfdoc/doc_utils.h"
-#include "core/fpdfdoc/pdf_vt.h"
-#include "core/include/fpdfdoc/fpdf_doc.h"
-#include "core/include/fpdfdoc/fpdf_vt.h"
-
-CPVT_Provider::CPVT_Provider(IPVT_FontMap* pFontMap) : m_pFontMap(pFontMap) {
- ASSERT(m_pFontMap);
-}
-CPVT_Provider::~CPVT_Provider() {}
-int32_t CPVT_Provider::GetCharWidth(int32_t nFontIndex,
- uint16_t word,
- int32_t nWordStyle) {
- if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) {
- uint32_t charcode = pPDFFont->CharCodeFromUnicode(word);
- if (charcode != CPDF_Font::kInvalidCharCode) {
- return pPDFFont->GetCharWidthF(charcode);
- }
- }
- return 0;
-}
-int32_t CPVT_Provider::GetTypeAscent(int32_t nFontIndex) {
- if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) {
- return pPDFFont->GetTypeAscent();
- }
- return 0;
-}
-int32_t CPVT_Provider::GetTypeDescent(int32_t nFontIndex) {
- if (CPDF_Font* pPDFFont = m_pFontMap->GetPDFFont(nFontIndex)) {
- return pPDFFont->GetTypeDescent();
- }
- return 0;
-}
-int32_t CPVT_Provider::GetWordFontIndex(uint16_t word,
- int32_t charset,
- int32_t nFontIndex) {
- if (CPDF_Font* pDefFont = m_pFontMap->GetPDFFont(0)) {
- if (pDefFont->CharCodeFromUnicode(word) != CPDF_Font::kInvalidCharCode) {
- return 0;
- }
- }
- if (CPDF_Font* pSysFont = m_pFontMap->GetPDFFont(1)) {
- if (pSysFont->CharCodeFromUnicode(word) != CPDF_Font::kInvalidCharCode) {
- return 1;
- }
- }
- return -1;
-}
-FX_BOOL CPVT_Provider::IsLatinWord(uint16_t word) {
- if ((word >= 0x61 && word <= 0x7A) || (word >= 0x41 && word <= 0x5A) ||
- word == 0x2D || word == 0x27) {
- return TRUE;
- }
- return FALSE;
-}
-int32_t CPVT_Provider::GetDefaultFontIndex() {
- return 0;
-}
-
« no previous file with comments | « core/fpdfdoc/ctypeset.h ('k') | core/fpdfdoc/doc_vt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698