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

Side by Side Diff: fpdfsdk/cpdfsdk_pageview.cpp

Issue 2334323005: Rename dictionary set and get methods (Closed)
Patch Set: Created 4 years, 3 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 | « fpdfsdk/cpdfsdk_interform.cpp ('k') | fpdfsdk/cpdfsdk_widget.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/include/cpdfsdk_pageview.h" 7 #include "fpdfsdk/include/cpdfsdk_pageview.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
10 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" 10 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this); 224 pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this);
225 if (!pSDKAnnot) 225 if (!pSDKAnnot)
226 return nullptr; 226 return nullptr;
227 227
228 m_fxAnnotArray.push_back(pSDKAnnot); 228 m_fxAnnotArray.push_back(pSDKAnnot);
229 return pSDKAnnot; 229 return pSDKAnnot;
230 } 230 }
231 #endif // PDF_ENABLE_XFA 231 #endif // PDF_ENABLE_XFA
232 232
233 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary* pDict) { 233 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary* pDict) {
234 return pDict ? AddAnnot(pDict->GetStringBy("Subtype").c_str(), pDict) 234 return pDict ? AddAnnot(pDict->GetStringFor("Subtype").c_str(), pDict)
235 : nullptr; 235 : nullptr;
236 } 236 }
237 237
238 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType, 238 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,
239 CPDF_Dictionary* pDict) { 239 CPDF_Dictionary* pDict) {
240 return nullptr; 240 return nullptr;
241 } 241 }
242 242
243 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) { 243 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
244 #ifdef PDF_ENABLE_XFA 244 #ifdef PDF_ENABLE_XFA
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return pAnnot; 578 return pAnnot;
579 } 579 }
580 return nullptr; 580 return nullptr;
581 } 581 }
582 582
583 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { 583 int CPDFSDK_PageView::GetPageIndexForStaticPDF() const {
584 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict; 584 CPDF_Dictionary* pDict = GetPDFPage()->m_pFormDict;
585 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument(); 585 CPDF_Document* pDoc = m_pSDKDoc->GetPDFDocument();
586 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; 586 return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1;
587 } 587 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_interform.cpp ('k') | fpdfsdk/cpdfsdk_widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698