summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
committerWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
commit9b76113ae4567eb998618d049afde26d3f0175d5 (patch)
treeede02b9835770dafe91eaee727e328765e4ffd52 /fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
parent47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff)
downloadpdfium-9b76113ae4567eb998618d049afde26d3f0175d5.tar.xz
Merge to XFA: Member function name refactoring
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 9253563c38..7f5fd9430d 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);
}
}
}