diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-25 21:55:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 21:55:24 +0000 |
commit | b1ec280837cc6e1932754ef40de26d12b77aa910 (patch) | |
tree | b1af6fdc4174eaf671cbd23f8f59b9bbf2428fb7 /fpdfsdk/formfiller | |
parent | de579ab0092d43fe037c381710da998b9ff823e9 (diff) | |
download | pdfium-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')
-rw-r--r-- | fpdfsdk/formfiller/cba_fontmap.cpp | 10 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cba_fontmap.h | 2 |
2 files changed, 6 insertions, 6 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"); } diff --git a/fpdfsdk/formfiller/cba_fontmap.h b/fpdfsdk/formfiller/cba_fontmap.h index 45df8c82ad..9d9f2e002a 100644 --- a/fpdfsdk/formfiller/cba_fontmap.h +++ b/fpdfsdk/formfiller/cba_fontmap.h @@ -30,7 +30,7 @@ class CBA_FontMap : public CPWL_FontMap { int32_t nCharset) override; void AddedFont(CPDF_Font* pFont, const ByteString& sFontAlias) override; - CPDF_Font* FindResFontSameCharset(CPDF_Dictionary* pResDict, + CPDF_Font* FindResFontSameCharset(const CPDF_Dictionary* pResDict, ByteString* sFontAlias, int32_t nCharset); CPDF_Font* GetAnnotDefaultFont(ByteString* csNameTag); |