summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-05 16:46:58 -0800
committerLei Zhang <thestig@chromium.org>2016-01-05 16:46:58 -0800
commitc2fb35f2bbcf6c8fcf37380000544ae39d9a8cec (patch)
tree6b8da05d1624cbbe5a0c7042c9820f02180f442c /fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
parent62664cee15230d6cbe08ed010721a4557b36dc22 (diff)
downloadpdfium-c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec.tar.xz
Merge to XFA: Remove header files that only have includes.
Also do some cleanups in affected files. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1552583002 . (cherry picked from commit d794d34b5deb6ad691c19af758090f9ce46015a3) Review URL: https://codereview.chromium.org/1566583002 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_FontMap.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index fadea905d4..e418e8b380 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -4,14 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/include/pdfwindow/PDFWindow.h"
#include "fpdfsdk/include/pdfwindow/PWL_FontMap.h"
+
+#include "core/include/fpdfapi/fpdf_module.h"
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
#define DEFAULT_FONT_NAME "Helvetica"
-/* ------------------------------ CPWL_FontMap ------------------------------ */
-
CPWL_FontMap::CPWL_FontMap(IFX_SystemHandler* pSystemHandler)
: m_pPDFDoc(NULL), m_pSystemHandler(pSystemHandler) {
ASSERT(m_pSystemHandler);
@@ -239,13 +238,6 @@ int32_t CPWL_FontMap::GetPWLFontIndex(FX_WORD word, int32_t nCharset) {
if (!pNewFont)
return -1;
- /*
- if (CPDF_Font* pFont = GetPDFFont(nFind))
- {
- PWLFont.AddWordToFontDict(pFontDict, word);
- }
- */
-
CFX_ByteString sAlias = EncodeFontAlias("Arial_Chrome", nCharset);
AddedFont(pNewFont, sAlias);
@@ -313,9 +305,9 @@ CPDF_Font* CPWL_FontMap::AddStandardFont(CPDF_Document* pDoc,
CPDF_Font* pFont = NULL;
- if (sFontName == "ZapfDingbats")
+ if (sFontName == "ZapfDingbats") {
pFont = pDoc->AddStandardFont(sFontName, NULL);
- else {
+ } else {
CPDF_FontEncoding fe(PDFFONT_ENCODING_WINANSI);
pFont = pDoc->AddStandardFont(sFontName, &fe);
}
@@ -499,8 +491,6 @@ int32_t CPWL_FontMap::CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) {
return ANSI_CHARSET;
}
-/* ------------------------ CPWL_DocFontMap ------------------------ */
-
CPWL_DocFontMap::CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler,
CPDF_Document* pAttachedDoc)
: CPWL_FontMap(pSystemHandler), m_pAttachedDoc(pAttachedDoc) {}