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

Side by Side Diff: fpdfsdk/src/fpdfdoc.cpp

Issue 1417893003: Add type cast definitions for CPDF_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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/src/fpdf_transformpage.cpp ('k') | fpdfsdk/src/fpdfppo.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 "../../public/fpdf_doc.h" 7 #include "../../public/fpdf_doc.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 9
10 namespace { 10 namespace {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return len; 190 return len;
191 } 191 }
192 192
193 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, 193 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document,
194 FPDF_DEST pDict) { 194 FPDF_DEST pDict) {
195 if (!pDict) 195 if (!pDict)
196 return 0; 196 return 0;
197 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); 197 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
198 if (!pDoc) 198 if (!pDoc)
199 return 0; 199 return 0;
200 CPDF_Dest dest((CPDF_Array*)pDict); 200 CPDF_Dest dest(static_cast<CPDF_Array*>(pDict));
201 return dest.GetPageIndex(pDoc); 201 return dest.GetPageIndex(pDoc);
202 } 202 }
203 203
204 DLLEXPORT FPDF_LINK STDCALL 204 DLLEXPORT FPDF_LINK STDCALL
205 FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y) { 205 FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y) {
206 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); 206 CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
207 if (!pPage) 207 if (!pPage)
208 return nullptr; 208 return nullptr;
209 209
210 CPDF_LinkList* pLinkList = GetLinkList(pPage); 210 CPDF_LinkList* pLinkList = GetLinkList(pPage);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 return 0; 345 return 0;
346 CFX_WideString text = pInfo->GetUnicodeText(tag); 346 CFX_WideString text = pInfo->GetUnicodeText(tag);
347 // Use UTF-16LE encoding 347 // Use UTF-16LE encoding
348 CFX_ByteString encodedText = text.UTF16LE_Encode(); 348 CFX_ByteString encodedText = text.UTF16LE_Encode();
349 unsigned long len = encodedText.GetLength(); 349 unsigned long len = encodedText.GetLength();
350 if (buffer && buflen >= len) { 350 if (buffer && buflen >= len) {
351 FXSYS_memcpy(buffer, encodedText.c_str(), len); 351 FXSYS_memcpy(buffer, encodedText.c_str(), len);
352 } 352 }
353 return len; 353 return len;
354 } 354 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdf_transformpage.cpp ('k') | fpdfsdk/src/fpdfppo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698