summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cba_fontmap.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-25 21:55:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 21:55:24 +0000
commitb1ec280837cc6e1932754ef40de26d12b77aa910 (patch)
treeb1af6fdc4174eaf671cbd23f8f59b9bbf2428fb7 /fpdfsdk/formfiller/cba_fontmap.cpp
parentde579ab0092d43fe037c381710da998b9ff823e9 (diff)
downloadpdfium-b1ec280837cc6e1932754ef40de26d12b77aa910.tar.xz
Add proper const/non-const versions of CPDF_Dictionary::GetDictFor().
BUG=pdfium:234 Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2 Reviewed-on: https://pdfium-review.googlesource.com/32914 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cba_fontmap.cpp')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index 6b31de7b37..d219ca40b7 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -93,11 +93,11 @@ CPDF_Font* CBA_FontMap::FindFontSameCharset(ByteString* sFontAlias,
if (!pRootDict)
return nullptr;
- CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictFor("AcroForm");
+ const CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictFor("AcroForm");
if (!pAcroFormDict)
return nullptr;
- CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictFor("DR");
+ const CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictFor("DR");
if (!pDRDict)
return nullptr;
@@ -108,13 +108,13 @@ CPDF_Document* CBA_FontMap::GetDocument() {
return m_pDocument.Get();
}
-CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict,
+CPDF_Font* CBA_FontMap::FindResFontSameCharset(const CPDF_Dictionary* pResDict,
ByteString* sFontAlias,
int32_t nCharset) {
if (!pResDict)
return nullptr;
- CPDF_Dictionary* pFonts = pResDict->GetDictFor("Font");
+ const CPDF_Dictionary* pFonts = pResDict->GetDictFor("Font");
if (!pFonts)
return nullptr;
@@ -197,7 +197,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(ByteString* sAlias) {
CPDF_Dictionary* pAcroFormDict = nullptr;
const bool bWidget = (m_pAnnotDict->GetStringFor("Subtype") == "Widget");
if (bWidget) {
- const CPDF_Dictionary* pRootDict = m_pDocument->GetRoot();
+ CPDF_Dictionary* pRootDict = m_pDocument->GetRoot();
if (pRootDict)
pAcroFormDict = pRootDict->GetDictFor("AcroForm");
}