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

Unified Diff: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp

Issue 1194933003: Make CPDF_Object::GetString() a virtual method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 5 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
Index: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 699a7e4ffeea90cc9847ed712dea12f0192fa33d..6c0742dcc8b82d8a8c84a19cfeb5b6f4c34bd451 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -93,7 +93,7 @@ CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t
{
ASSERT(m_pAnnotDict != NULL);
- if (m_pAnnotDict->GetString("Subtype") == "Widget")
+ if (m_pAnnotDict->GetStringAt("Subtype") == "Widget")
{
CPDF_Document* pDocument = GetDocument();
ASSERT(pDocument != NULL);
@@ -143,7 +143,8 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_By
if (pDirect == NULL || pDirect->GetType() != PDFOBJ_DICTIONARY) continue;
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") continue;
+ if (pElement->GetStringAt("Type") != "Font")
+ continue;
CPDF_Font* pFont = pDocument->LoadFont(pElement);
if (pFont == NULL) continue;
@@ -230,7 +231,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
CPDF_Dictionary* pAcroFormDict = NULL;
- FX_BOOL bWidget = (m_pAnnotDict->GetString("Subtype") == "Widget");
+ FX_BOOL bWidget = (m_pAnnotDict->GetStringAt("Subtype") == "Widget");
if (bWidget)
{

Powered by Google App Engine
This is Rietveld 408576698