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

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

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/fpdftext/fpdf_text_int.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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (!psub) 172 if (!psub)
173 return nullptr; 173 return nullptr;
174 if (CPDF_Stream* pStream = psub->AsStream()) 174 if (CPDF_Stream* pStream = psub->AsStream())
175 return pStream; 175 return pStream;
176 176
177 if (CPDF_Dictionary* pDict = psub->AsDictionary()) { 177 if (CPDF_Dictionary* pDict = psub->AsDictionary()) {
178 CFX_ByteString as = pAnnotDict->GetStringBy("AS"); 178 CFX_ByteString as = pAnnotDict->GetStringBy("AS");
179 if (as.IsEmpty()) { 179 if (as.IsEmpty()) {
180 CFX_ByteString value = pAnnotDict->GetStringBy("V"); 180 CFX_ByteString value = pAnnotDict->GetStringBy("V");
181 if (value.IsEmpty()) { 181 if (value.IsEmpty()) {
182 CPDF_Dictionary* pDict = pAnnotDict->GetDictBy("Parent"); 182 CPDF_Dictionary* pParentDict = pAnnotDict->GetDictBy("Parent");
183 value = pDict ? pDict->GetStringBy("V") : CFX_ByteString(); 183 value = pParentDict ? pParentDict->GetStringBy("V") : CFX_ByteString();
184 } 184 }
185 if (value.IsEmpty() || !pDict->KeyExist(value)) 185 if (value.IsEmpty() || !pDict->KeyExist(value))
186 as = "Off"; 186 as = "Off";
187 else 187 else
188 as = value; 188 as = value;
189 } 189 }
190 return pDict->GetStreamBy(as); 190 return pDict->GetStreamBy(as);
191 } 191 }
192 return nullptr; 192 return nullptr;
193 } 193 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 CFX_PathData path; 348 CFX_PathData path;
349 width /= 2; 349 width /= 2;
350 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, 350 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width,
351 rect.top - width); 351 rect.top - width);
352 int fill_type = 0; 352 int fill_type = 0;
353 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { 353 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) {
354 fill_type |= FXFILL_NOPATHSMOOTH; 354 fill_type |= FXFILL_NOPATHSMOOTH;
355 } 355 }
356 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); 356 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type);
357 } 357 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/fpdftext/fpdf_text_int.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698