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

Side by Side Diff: core/src/fpdfdoc/doc_link.cpp

Issue 1171733003: Remove typdefs for pointer types in fx_system.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual fixes. Created 5 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/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_metadata.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 "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 #include "../../include/fxcrt/fx_safe_types.h" 8 #include "../../include/fxcrt/fx_safe_types.h"
9 9
10 CPDF_LinkList::~CPDF_LinkList() 10 CPDF_LinkList::~CPDF_LinkList()
11 { 11 {
12 FX_POSITION pos = m_PageMap.GetStartPosition(); 12 FX_POSITION pos = m_PageMap.GetStartPosition();
13 while (pos) { 13 while (pos) {
14 FX_LPVOID key, value; 14 void* key;
15 void* value;
15 m_PageMap.GetNextAssoc(pos, key, value); 16 m_PageMap.GetNextAssoc(pos, key, value);
16 delete (CFX_PtrArray*)value; 17 delete (CFX_PtrArray*)value;
17 } 18 }
18 } 19 }
19 CFX_PtrArray* CPDF_LinkList::GetPageLinks(CPDF_Page* pPage) 20 CFX_PtrArray* CPDF_LinkList::GetPageLinks(CPDF_Page* pPage)
20 { 21 {
21 FX_DWORD objnum = pPage->m_pFormDict->GetObjNum(); 22 FX_DWORD objnum = pPage->m_pFormDict->GetObjNum();
22 if (objnum == 0) { 23 if (objnum == 0) {
23 return NULL; 24 return NULL;
24 } 25 }
25 CFX_PtrArray* pPageLinkList = NULL; 26 CFX_PtrArray* pPageLinkList = NULL;
26 if (!m_PageMap.Lookup((FX_LPVOID)(uintptr_t)objnum, (FX_LPVOID&)pPageLinkLis t)) { 27 if (!m_PageMap.Lookup((void*)(uintptr_t)objnum, (void*&)pPageLinkList)) {
27 pPageLinkList = new CFX_PtrArray; 28 pPageLinkList = new CFX_PtrArray;
28 m_PageMap.SetAt((FX_LPVOID)(uintptr_t)objnum, pPageLinkList); 29 m_PageMap.SetAt((void*)(uintptr_t)objnum, pPageLinkList);
29 LoadPageLinks(pPage, pPageLinkList); 30 LoadPageLinks(pPage, pPageLinkList);
30 } 31 }
31 return pPageLinkList; 32 return pPageLinkList;
32 } 33 }
33 int CPDF_LinkList::CountLinks(CPDF_Page* pPage) 34 int CPDF_LinkList::CountLinks(CPDF_Page* pPage)
34 { 35 {
35 CFX_PtrArray* pPageLinkList = GetPageLinks(pPage); 36 CFX_PtrArray* pPageLinkList = GetPageLinks(pPage);
36 if (pPageLinkList == NULL) { 37 if (pPageLinkList == NULL) {
37 return 0; 38 return 0;
38 } 39 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 97 }
97 if (pDest->GetType() == PDFOBJ_ARRAY) { 98 if (pDest->GetType() == PDFOBJ_ARRAY) {
98 return CPDF_Dest((CPDF_Array*)pDest); 99 return CPDF_Dest((CPDF_Array*)pDest);
99 } 100 }
100 return CPDF_Dest(); 101 return CPDF_Dest();
101 } 102 }
102 CPDF_Action CPDF_Link::GetAction() 103 CPDF_Action CPDF_Link::GetAction()
103 { 104 {
104 return CPDF_Action(m_pDict->GetDict("A")); 105 return CPDF_Action(m_pDict->GetDict("A"));
105 } 106 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_metadata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698