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

Unified Diff: core/src/fpdfdoc/doc_utils.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: core/src/fpdfdoc/doc_utils.cpp
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index 10ca14697d7ea46c4553ccaba7fe54cd678bffc1..858e0429f3b5524d74dc6a904bfec2bb030ffbf6 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -298,7 +298,7 @@ FX_DWORD CountInterFormFonts(CPDF_Dictionary* pFormDict)
}
CPDF_Object* pDirect = pObj->GetDirect();
if (pDirect != NULL && pDirect->GetType() == PDFOBJ_DICTIONARY) {
- if (((CPDF_Dictionary*)pDirect)->GetString("Type") == "Font") {
+ if (((CPDF_Dictionary*)pDirect)->GetStringAt("Type") == "Font") {
dwCount ++;
}
}
@@ -332,7 +332,7 @@ CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pDocument
continue;
}
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") {
+ if (pElement->GetStringAt("Type") != "Font") {
continue;
}
if (dwCount == index) {
@@ -361,7 +361,7 @@ CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pDocument
if (pElement == NULL) {
return NULL;
}
- if (pElement->GetString("Type") == "Font") {
+ if (pElement->GetStringAt("Type") == "Font") {
return pDocument->LoadFont(pElement);
}
return NULL;
@@ -392,7 +392,7 @@ CPDF_Font* GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pDocument
continue;
}
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") {
+ if (pElement->GetStringAt("Type") != "Font") {
continue;
}
CPDF_Font* pFind = pDocument->LoadFont(pElement);
@@ -435,7 +435,7 @@ CPDF_Font* GetNativeInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pDo
continue;
}
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") {
+ if (pElement->GetStringAt("Type") != "Font") {
continue;
}
CPDF_Font* pFind = pDocument->LoadFont(pElement);
@@ -494,7 +494,7 @@ FX_BOOL FindInterFormFont(CPDF_Dictionary* pFormDict, const CPDF_Font* pFont, CF
continue;
}
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") {
+ if (pElement->GetStringAt("Type") != "Font") {
continue;
}
if (pFont->GetFontDict() == pElement) {
@@ -533,7 +533,7 @@ FX_BOOL FindInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pDocument,
continue;
}
CPDF_Dictionary* pElement = (CPDF_Dictionary*)pDirect;
- if (pElement->GetString("Type") != "Font") {
+ if (pElement->GetStringAt("Type") != "Font") {
continue;
}
pFont = pDocument->LoadFont(pElement);
@@ -647,7 +647,7 @@ CPDF_Font* GetDefaultInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Document* pD
if (pFormDict == NULL) {
return NULL;
}
- CPDF_DefaultAppearance cDA = pFormDict->GetString("DA");
+ CPDF_DefaultAppearance cDA = pFormDict->GetStringAt("DA");
CFX_ByteString csFontNameTag;
FX_FLOAT fFontSize;
cDA.GetFont(csFontNameTag, fFontSize);
@@ -658,7 +658,7 @@ CPDF_IconFit::ScaleMethod CPDF_IconFit::GetScaleMethod()
if (m_pDict == NULL) {
return Always;
}
- CFX_ByteString csSW = m_pDict->GetString("SW", "A");
+ CFX_ByteString csSW = m_pDict->GetStringAt("SW", "A");
if (csSW == "B") {
return Bigger;
} else if (csSW == "S") {
@@ -673,7 +673,7 @@ FX_BOOL CPDF_IconFit::IsProportionalScale()
if (m_pDict == NULL) {
return TRUE;
}
- return m_pDict->GetString("S", "P") != "A";
+ return m_pDict->GetStringAt("S", "P") != "A";
}
void CPDF_IconFit::GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom)
{

Powered by Google App Engine
This is Rietveld 408576698