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

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

Issue 884873002: Merge to Master: Cover fpdftext.h API with embeddertests. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 10 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/include/fpdftext.h ('k') | fpdfsdk/src/fpdftext_embeddertest.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/fsdk_define.h" 7 #include "../include/fsdk_define.h"
8 #include "../include/fpdftext.h" 8 #include "../include/fpdftext.h"
9 9
10 #ifdef _WIN32 10 #ifdef _WIN32
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 pageLink->GetRects(link_index,rectArray); 228 pageLink->GetRects(link_index,rectArray);
229 return rectArray.GetSize(); 229 return rectArray.GetSize();
230 } 230 }
231 DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,int link_index, int rect_index, double* left, 231 DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,int link_index, int rect_index, double* left,
232 double* top,double* right, double* bottom) 232 double* top,double* right, double* bottom)
233 { 233 {
234 if (!link_page) return; 234 if (!link_page) return;
235 IPDF_LinkExtract* pageLink=(IPDF_LinkExtract*)link_page; 235 IPDF_LinkExtract* pageLink=(IPDF_LinkExtract*)link_page;
236 CFX_RectArray rectArray; 236 CFX_RectArray rectArray;
237 pageLink->GetRects(link_index,rectArray); 237 pageLink->GetRects(link_index,rectArray);
238 » CFX_FloatRect rect; 238 » if (rect_index >= 0 && rect_index < rectArray.GetSize()) {
239 » rect=rectArray.GetAt(rect_index); 239 » » CFX_FloatRect rect=rectArray.GetAt(rect_index);
240 » *left=rect.left; 240 » » *left=rect.left;
241 » *right=rect.right; 241 » » *right=rect.right;
242 » *top=rect.top; 242 » » *top=rect.top;
243 » *bottom=rect.bottom; 243 » » *bottom=rect.bottom;
244 » }
244 } 245 }
245 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) 246 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page)
246 { 247 {
247 if (!link_page) return; 248 if (!link_page) return;
248 IPDF_LinkExtract* pageLink=(IPDF_LinkExtract*)link_page; 249 IPDF_LinkExtract* pageLink=(IPDF_LinkExtract*)link_page;
249 delete pageLink; 250 delete pageLink;
250 pageLink =NULL; 251 pageLink =NULL;
251 } 252 }
252 253
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdftext.h ('k') | fpdfsdk/src/fpdftext_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698