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

Side by Side Diff: core/fpdfdoc/doc_annot.cpp

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. 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/fpdfdoc/doc_action.cpp ('k') | core/fpdfdoc/doc_basic.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 "core/fpdfapi/fpdf_page/include/cpdf_form.h" 7 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 8 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return pStream; 174 return pStream;
175 175
176 if (CPDF_Dictionary* pDict = psub->AsDictionary()) { 176 if (CPDF_Dictionary* pDict = psub->AsDictionary()) {
177 CFX_ByteString as = pAnnotDict->GetStringBy("AS"); 177 CFX_ByteString as = pAnnotDict->GetStringBy("AS");
178 if (as.IsEmpty()) { 178 if (as.IsEmpty()) {
179 CFX_ByteString value = pAnnotDict->GetStringBy("V"); 179 CFX_ByteString value = pAnnotDict->GetStringBy("V");
180 if (value.IsEmpty()) { 180 if (value.IsEmpty()) {
181 CPDF_Dictionary* pDict = pAnnotDict->GetDictBy("Parent"); 181 CPDF_Dictionary* pDict = pAnnotDict->GetDictBy("Parent");
182 value = pDict ? pDict->GetStringBy("V") : CFX_ByteString(); 182 value = pDict ? pDict->GetStringBy("V") : CFX_ByteString();
183 } 183 }
184 if (value.IsEmpty() || !pDict->KeyExist(value.AsByteStringC())) 184 if (value.IsEmpty() || !pDict->KeyExist(value.AsStringC()))
185 as = "Off"; 185 as = "Off";
186 else 186 else
187 as = value; 187 as = value;
188 } 188 }
189 return pDict->GetStreamBy(as.AsByteStringC()); 189 return pDict->GetStreamBy(as.AsStringC());
190 } 190 }
191 return nullptr; 191 return nullptr;
192 } 192 }
193 193
194 CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) { 194 CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) {
195 CPDF_Stream* pStream = FPDFDOC_GetAnnotAP(m_pAnnotDict, mode); 195 CPDF_Stream* pStream = FPDFDOC_GetAnnotAP(m_pAnnotDict, mode);
196 if (!pStream) 196 if (!pStream)
197 return nullptr; 197 return nullptr;
198 198
199 auto it = m_APMap.find(pStream); 199 auto it = m_APMap.find(pStream);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 CFX_PathData path; 347 CFX_PathData path;
348 width /= 2; 348 width /= 2;
349 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, 349 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width,
350 rect.top - width); 350 rect.top - width);
351 int fill_type = 0; 351 int fill_type = 0;
352 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { 352 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) {
353 fill_type |= FXFILL_NOPATHSMOOTH; 353 fill_type |= FXFILL_NOPATHSMOOTH;
354 } 354 }
355 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); 355 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type);
356 } 356 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_action.cpp ('k') | core/fpdfdoc/doc_basic.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698