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 9253563c3897640465588b6913c24283e82ce4ca..7f5fd9430d28dfa63eae2262be2660e20e7b54f0 100644 |
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
@@ -77,7 +77,7 @@ CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, |
int32_t nCharset) { |
ASSERT(m_pAnnotDict != NULL); |
- if (m_pAnnotDict->GetString("Subtype") == "Widget") { |
+ if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") { |
CPDF_Document* pDocument = GetDocument(); |
ASSERT(pDocument != NULL); |
@@ -85,11 +85,11 @@ CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, |
if (!pRootDict) |
return NULL; |
- CPDF_Dictionary* pAcroFormDict = pRootDict->GetDict("AcroForm"); |
+ CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm"); |
if (!pAcroFormDict) |
return NULL; |
- CPDF_Dictionary* pDRDict = pAcroFormDict->GetDict("DR"); |
+ CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"); |
if (!pDRDict) |
return NULL; |
@@ -112,7 +112,7 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, |
CPDF_Document* pDocument = GetDocument(); |
ASSERT(pDocument != NULL); |
- CPDF_Dictionary* pFonts = pResDict->GetDict("Font"); |
+ CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font"); |
if (!pFonts) |
return NULL; |
@@ -127,7 +127,7 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, |
CPDF_Dictionary* pElement = ToDictionary(pObj->GetDirect()); |
if (!pElement) |
continue; |
- if (pElement->GetString("Type") != "Font") |
+ if (pElement->GetStringBy("Type") != "Font") |
continue; |
CPDF_Font* pFont = pDocument->LoadFont(pElement); |
@@ -157,7 +157,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, |
ASSERT(m_pAnnotDict != NULL); |
ASSERT(m_pDocument != NULL); |
- CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDict("AP"); |
+ CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"); |
if (!pAPDict) { |
pAPDict = new CPDF_Dictionary; |
@@ -169,7 +169,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, |
if (ToDictionary(pObject)) |
return; |
- CPDF_Stream* pStream = pAPDict->GetStream(m_sAPType); |
+ CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType); |
if (!pStream) { |
pStream = new CPDF_Stream(NULL, 0, NULL); |
int32_t objnum = m_pDocument->AddIndirectObject(pStream); |
@@ -184,14 +184,14 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, |
} |
if (pStreamDict) { |
- CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources"); |
+ CPDF_Dictionary* pStreamResList = pStreamDict->GetDictBy("Resources"); |
if (!pStreamResList) { |
pStreamResList = new CPDF_Dictionary(); |
pStreamDict->SetAt("Resources", pStreamResList); |
} |
if (pStreamResList) { |
- CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDict("Font"); |
+ CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictBy("Font"); |
if (!pStreamResFontList) { |
pStreamResFontList = new CPDF_Dictionary; |
int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList); |
@@ -210,11 +210,11 @@ 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->GetStringBy("Subtype") == "Widget"); |
if (bWidget) { |
if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot()) |
- pAcroFormDict = pRootDict->GetDict("AcroForm"); |
+ pAcroFormDict = pRootDict->GetDictBy("AcroForm"); |
} |
CFX_ByteString sDA; |
@@ -237,24 +237,25 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { |
CFX_ByteString sFontName = syntax.GetWord(); |
sAlias = PDF_NameDecode(sFontName).Mid(1); |
- if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDict("DR")) |
- if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDict("Font")) |
- pFontDict = pDRFontDict->GetDict(sAlias); |
+ if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR")) |
+ if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font")) |
+ pFontDict = pDRFontDict->GetDictBy(sAlias); |
if (!pFontDict) |
- if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDict("AP")) |
- if (CPDF_Dictionary* pNormalDict = pAPDict->GetDict("N")) |
+ if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP")) |
+ if (CPDF_Dictionary* pNormalDict = pAPDict->GetDictBy("N")) |
if (CPDF_Dictionary* pNormalResDict = |
- pNormalDict->GetDict("Resources")) |
- if (CPDF_Dictionary* pResFontDict = pNormalResDict->GetDict("Font")) |
- pFontDict = pResFontDict->GetDict(sAlias); |
+ pNormalDict->GetDictBy("Resources")) |
+ if (CPDF_Dictionary* pResFontDict = |
+ pNormalResDict->GetDictBy("Font")) |
+ pFontDict = pResFontDict->GetDictBy(sAlias); |
if (bWidget) { |
if (!pFontDict) { |
if (pAcroFormDict) { |
- if (CPDF_Dictionary* pDRDict = pAcroFormDict->GetDict("DR")) |
- if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDict("Font")) |
- pFontDict = pDRFontDict->GetDict(sAlias); |
+ if (CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR")) |
+ if (CPDF_Dictionary* pDRFontDict = pDRDict->GetDictBy("Font")) |
+ pFontDict = pDRFontDict->GetDictBy(sAlias); |
} |
} |
} |