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

Side by Side Diff: fpdfsdk/formfiller/cba_fontmap.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | fpdfsdk/fpdf_ext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "fpdfsdk/formfiller/cba_fontmap.h" 7 #include "fpdfsdk/formfiller/cba_fontmap.h"
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return; 152 return;
153 153
154 CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"); 154 CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP");
155 155
156 if (!pAPDict) { 156 if (!pAPDict) {
157 pAPDict = new CPDF_Dictionary; 157 pAPDict = new CPDF_Dictionary;
158 m_pAnnotDict->SetAt("AP", pAPDict); 158 m_pAnnotDict->SetAt("AP", pAPDict);
159 } 159 }
160 160
161 // to avoid checkbox and radiobutton 161 // to avoid checkbox and radiobutton
162 CPDF_Object* pObject = pAPDict->GetElement(m_sAPType); 162 CPDF_Object* pObject = pAPDict->GetObjectBy(m_sAPType);
163 if (ToDictionary(pObject)) 163 if (ToDictionary(pObject))
164 return; 164 return;
165 165
166 CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType); 166 CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType);
167 if (!pStream) { 167 if (!pStream) {
168 pStream = new CPDF_Stream(NULL, 0, NULL); 168 pStream = new CPDF_Stream(NULL, 0, NULL);
169 int32_t objnum = m_pDocument->AddIndirectObject(pStream); 169 int32_t objnum = m_pDocument->AddIndirectObject(pStream);
170 pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum); 170 pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum);
171 } 171 }
172 172
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr; 253 return pFontDict ? m_pDocument->LoadFont(pFontDict) : nullptr;
254 } 254 }
255 255
256 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) { 256 void CBA_FontMap::SetAPType(const CFX_ByteString& sAPType) {
257 m_sAPType = sAPType; 257 m_sAPType = sAPType;
258 258
259 Reset(); 259 Reset();
260 Initialize(); 260 Initialize();
261 } 261 }
OLDNEW
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | fpdfsdk/fpdf_ext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698