summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-02-25 11:35:42 -0800
committerWei Li <weili@chromium.org>2016-02-25 11:35:42 -0800
commit6b7b5a52f42aa9b37be5307915885d5f4566c326 (patch)
tree61c031f3c1f6c7858b04a645f310f41ca0cf42f5 /core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
parentea1ae9915d1702ab62af520b1487f70a553fc6ae (diff)
downloadpdfium-6b7b5a52f42aa9b37be5307915885d5f4566c326.tar.xz
refactor CPDF_Font and subclasses
Get rid of types; use virutal functions instead of type based checking; remove unused functions; change casts; simplify load()/UnicodeFromCharCode()/CharCodeFromUnicode() calling. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729823004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 3018630463..465c74a425 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1258,9 +1258,9 @@ CPDF_Font* CPDF_StreamContentParser::FindFont(const CFX_ByteString& name) {
}
CPDF_Font* pFont = m_pDocument->LoadFont(pFontDict);
- if (pFont && pFont->GetType3Font()) {
- pFont->GetType3Font()->SetPageResources(m_pResources);
- pFont->GetType3Font()->CheckType3FontMetrics();
+ if (pFont && pFont->IsType3Font()) {
+ pFont->AsType3Font()->SetPageResources(m_pResources);
+ pFont->AsType3Font()->CheckType3FontMetrics();
}
return pFont;
}
@@ -1336,7 +1336,7 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
return;
}
int textmode;
- if (pFont->GetFontType() == PDFFONT_TYPE3) {
+ if (pFont->IsType3Font()) {
textmode = 0;
} else {
textmode = m_pCurStates->m_TextState.GetObject()->m_TextMode;